JBoss Community

is it possible to add a subprocess to a workitem dynamically?

created by Ted Pan in jBPM - View the full discussion

hi,

 

by using

         DynamicNodeInstance dynamicNodeInstance = (DynamicNodeInstance)processInstance.getNodeInstances().iterator().next();

           DynamicUtils.addDynamicSubProcess(dynamicNodeInstance, session, subProcessId , parameters);

in the executeWorkItem() of WorkItemHandler, I was able to execute a subprocess on-the-fly when the process instance enters this workitem.

But it requires that this workitem is inside a dynamic node, in my case, it is ad-hoc subprocess.

 

My question is, without using the ad-hoc subprocess, how could I add the dynamic subprocess to current workitem?

 

Thanks

 

 

Ted

Reply to this message by going to Community

Start a new discussion in jBPM at Community