0 Replies Latest reply on Mar 22, 2012 9:01 AM by Evgene Ostapenko

    How to get data from Multiple-instance subprocess node?

    Evgene Ostapenko Newbie

      I have a Multiple-instance node for which i have specified CollectionExpression and VariableName parameters:

       

      CollectionExpression: list

      VariableName: item

       

      After starting a system creates several subproceses. Each of them can access its own element from the collection by using a variable given as VariableName. I pass an Object elements in collection and use such parameter mapping:

       


      Sub-process variableProcess variable
      username                    item.username

       

       

      It works. I can use "username" in the subprocess. But when i tried to return its value to the main process and set a result mapping

       

       

      Sub-process variableProcess variable
      username                    item.username

       

      i get the message at start of the application:

       

      There is no ID/IDREF binding for IDREF 'item.username'.

       

      After executing a subprocess, exception happens:

       

      ould not find variable scope for variable item.username

      when trying to complete SubProcess node Sub-Process

      Continuing without setting variable.

      Could not find variable scope for variable item.outcoming_doc_id

      when trying to complete SubProcess node Sub-Process

      Continuing without setting variable.

      java.lang.NullPointerException

                at com.sample.BPMTaskHandler.executeWorkItem(BPMTaskHandler.java:32)

                at org.drools.process.instance.impl.DefaultWorkItemManager.internalExecuteWorkItem(DefaultWorkItemManager.java:70)

                at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:105)

                at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)

       

      How can i write a working result mapping in this case?