0 Replies Latest reply on Nov 29, 2012 8:52 AM by Ted Pan

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

    Ted Pan Newbie



      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?