cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How can you start a business process ?

4,876

How can you st business process ? what are the possible ways?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

You can start the business service via typical java code using BusinessProcessService and using following groovy code snippet

 import de . hybris . platform . servicelayer . model . ModelService
 import de . hybris . platform . processengine . BusinessProcessService
 
 ModelService modelService = spring . getBean(”modelService”)
 BusinessProcessService bpService = spring . getBean(”businessProcessService”)
 
 MyProcessModel myprocess = bpService . createProcess (”myProcess” +
 System . currentTimeMillis () , ”myProcess”)
 myprocess . setFail ( true )
 myprocess . setError ( true )
 
 modelService . save (myprocess)
 bpService . startProcess (myprocess)
 
 modelService . refresh (myprocess)
 println myprocess . state

Answers (1)

Answers (1)

vinay_malempati
Active Participant
0 Likes

You can do it from code using BusinessProcessService class methods to create and start business process. from bac koffice you can search for process and repair as well.

Former Member
0 Likes

True. But his question was about starting the process. repairing doesn't count. hence using BusinessProcessService via scripting and java