Online Tutorials & Training Materials | STechies.com
Register Login
Advertisement

NoSuchProcessDefinitionException error in Hybris

|| 0

NoSuchProcessDefinitionException error in Hybris
Stechies

While changing yacceleratorfulfilmentprocessesourcesy acceleratorfulfilmentprocessprocessorder-process.xml a NoSuchProcessDefinition Exception is thrown in SAP Hybris.

This issue can be regenerated on Hybris OOTB by performing the steps given below:

  • First create order process definition in file yacceleratorfulfilmentprocessesourcesyacceleratorfulfilmentprocessprocessorder-process.xml
  • Now create some orders on storefront
  • Now please in the file yacceleratorfulfilmentprocessesourcesyacceleratorfulfilmentprocessprocessorder-process.xml enhance order process definition
  • Now at last re-deploy and restart the server.

You will notice that Order Processes will fail with error NoSuchProcessDefinitionException: No process definition known by name 'order-process'.

When the changes are made directly in order-process.xml file by stopping the hybris server but still there are some order processes which are not complete that use the previous order process definition and it is impossible for hybris to find the process definition version and therefore it throws the NoSuchProcessDefinitionException.

But if dynamic Process Definition is created/updated(through hMC) for such process which are already running, the historical version of the process definition is used until the process has finished and new definition is used when the process restarts

SOLUTION

Note: User can enhance Order process definition by updating file order-process.xml. But it should be confirmed that there are no order processes running before making enhancement order-process.xml

Please follow the steps below to Enhance the process definition dynamically at runtime in hMC without restarting the server.

1) First Go to Scripting > Dynamic Process Definition by logging in to hMC as admin.
2) Now please check if the process definition of your choice is already defined in hMC
3) Now please select the process in the Results section and open it for editing
4) Now if the Results don't show any entry then you must create a dynamic process definition.For that do the following

  • First go to New > DynamicProcessDefinition
  • Paste your process definition (process.xml ) in the Content field of the Create section.
  • At last click on the Create button and then save.


Advertisement
Advertisement
Advertisement