AnsweredAssumed Answered

Programmatically Accessing Call Activity's Extension elements

Question asked by jorell on Jan 23, 2014
Latest reply on Jan 23, 2014 by jorell
Since activiti doesnt support out parameters for call activity nodes that use multiInstanceLoops I am trying to implement my own solution to this. Basically every subprocess would right back its out variable in a Map. I have hit a snag though. I can' t figure out how to get the list of the parent process' call activity's out variables. I can get the FlowElement object of the call activity using the following code:

    RepositoryServiceImpl repositoryServiceImpl = (RepositoryServiceImpl) repositoryService;
    BpmnModel model = repositoryServiceImpl.getBpmnModel(processDefinitionId);
    Process process = model.getProcesses().get(0);
    FlowElement flowElement = process.getFlowElement(activityId);

And this flowElement is of type CallActivity. But the call activity has no extension elements. My bpmn snippet for this node is below:

<callActivity id="testSubCallACtivity" name="test sub call activity" calledElement="testSubProcess">
        <activiti:out source="approver" target="s_approver"/>
      <multiInstanceLoopCharacteristics isSequential="false"
          activiti:collection="IdList" activiti:elementVariable="Id">

Please let me know if I'm doing something wrong here. Thanks