Search in sources :

Example 11 with MultiInstanceLoopCharacteristics

use of org.eclipse.bpmn2.MultiInstanceLoopCharacteristics in project kie-wb-common by kiegroup.

the class MultipleInstanceActivityPropertyReader method getDataOutputIdForDataOutputVariable.

protected String getDataOutputIdForDataOutputVariable() {
    String dataOutputVariableId = null;
    DataOutput variableDataOutput = getMultiInstanceLoopCharacteristics().map(MultiInstanceLoopCharacteristics::getOutputDataItem).orElse(null);
    if (variableDataOutput != null) {
        String itemSubjectRef = getItemSubjectRef(variableDataOutput);
        String variableId = ItemNameReader.from(variableDataOutput).getName();
        dataOutputVariableId = super.getDataOutputs().stream().filter(output -> Objects.equals(variableId, output.getName())).filter(output -> hasItemSubjectRef(output, itemSubjectRef)).map(BaseElement::getId).findFirst().orElse(null);
    }
    return dataOutputVariableId;
}
Also used : BaseElement(org.eclipse.bpmn2.BaseElement) FormalExpression(org.eclipse.bpmn2.FormalExpression) ItemAwareElement(org.eclipse.bpmn2.ItemAwareElement) BPMNDiagram(org.eclipse.bpmn2.di.BPMNDiagram) DataInputAssociation(org.eclipse.bpmn2.DataInputAssociation) Activity(org.eclipse.bpmn2.Activity) DefinitionResolver(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.DefinitionResolver) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) DataOutputAssociation(org.eclipse.bpmn2.DataOutputAssociation) List(java.util.List) DataInput(org.eclipse.bpmn2.DataInput) MultiInstanceLoopCharacteristics(org.eclipse.bpmn2.MultiInstanceLoopCharacteristics) DataOutput(org.eclipse.bpmn2.DataOutput) Optional(java.util.Optional) DataAssociation(org.eclipse.bpmn2.DataAssociation) StringUtils(org.kie.workbench.common.stunner.core.util.StringUtils) DataOutput(org.eclipse.bpmn2.DataOutput)

Aggregations

MultiInstanceLoopCharacteristics (org.eclipse.bpmn2.MultiInstanceLoopCharacteristics)11 FormalExpression (org.eclipse.bpmn2.FormalExpression)7 DataInput (org.eclipse.bpmn2.DataInput)6 DataInputAssociation (org.eclipse.bpmn2.DataInputAssociation)6 DataOutput (org.eclipse.bpmn2.DataOutput)6 DataOutputAssociation (org.eclipse.bpmn2.DataOutputAssociation)6 ItemAwareElement (org.eclipse.bpmn2.ItemAwareElement)5 DataObject (org.eclipse.bpmn2.DataObject)4 ArrayList (java.util.ArrayList)3 List (java.util.List)3 InputSet (org.eclipse.bpmn2.InputSet)3 SubProcess (org.eclipse.bpmn2.SubProcess)3 Test (org.junit.Test)3 HashSet (java.util.HashSet)2 LinkedHashMap (java.util.LinkedHashMap)2 Entry (java.util.Map.Entry)2 Objects (java.util.Objects)2 Optional (java.util.Optional)2 Collectors (java.util.stream.Collectors)2 Activity (org.eclipse.bpmn2.Activity)2