Search in sources :

Example 41 with DataOutput

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

the class ParsedAssignmentsInfoTest method testCreateInitializedOutputVariablesNoAssociation.

@Test
public void testCreateInitializedOutputVariablesNoAssociation() {
    final String DATA_OUTPUT_ID = "_Data-TestOutputX";
    final String DATA_OUTPUT_NAME = "Data Test";
    final String INIT_OUTPUT_VAR_ID = "Data-Test";
    VariableScope variableScope = new FlatVariableScope();
    List<InitializedVariable.InitializedOutputVariable> initializedOutputVariables = testedNoAssociation.createInitializedOutputVariables("", variableScope, new HashSet<>());
    assertEquals(1, initializedOutputVariables.size());
    InitializedVariable.InitializedOutputVariable initializedOutputVariable = initializedOutputVariables.get(0);
    DataOutput dataOutput = initializedOutputVariable.getDataOutput();
    DataOutputAssociation dataOutputAssociation = initializedOutputVariable.getDataOutputAssociation();
    String dataOutputID = dataOutput.getId();
    String dataOutputName = dataOutput.getName();
    String initVarID = initializedOutputVariable.getIdentifier();
    assertNull(dataOutputAssociation);
    assertEquals(dataOutputID, DATA_OUTPUT_ID);
    assertEquals(dataOutputName, DATA_OUTPUT_NAME);
    assertEquals(initVarID, INIT_OUTPUT_VAR_ID);
}
Also used : DataOutput(org.eclipse.bpmn2.DataOutput) InitializedVariable(org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.InitializedVariable) FlatVariableScope(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.FlatVariableScope) DataOutputAssociation(org.eclipse.bpmn2.DataOutputAssociation) VariableScope(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.VariableScope) FlatVariableScope(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.FlatVariableScope) Test(org.junit.Test)

Aggregations

DataOutput (org.eclipse.bpmn2.DataOutput)39 DataOutputAssociation (org.eclipse.bpmn2.DataOutputAssociation)24 DataInput (org.eclipse.bpmn2.DataInput)17 ItemAwareElement (org.eclipse.bpmn2.ItemAwareElement)15 Test (org.junit.Test)14 ArrayList (java.util.ArrayList)12 DataInputAssociation (org.eclipse.bpmn2.DataInputAssociation)12 FormalExpression (org.eclipse.bpmn2.FormalExpression)9 List (java.util.List)7 InputOutputSpecification (org.eclipse.bpmn2.InputOutputSpecification)7 ItemDefinition (org.eclipse.bpmn2.ItemDefinition)7 SimpleFeatureMapEntry (org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.SimpleFeatureMapEntry)7 OutputSet (org.eclipse.bpmn2.OutputSet)6 Assignment (org.eclipse.bpmn2.Assignment)5 InputSet (org.eclipse.bpmn2.InputSet)5 MultiInstanceLoopCharacteristics (org.eclipse.bpmn2.MultiInstanceLoopCharacteristics)5 FeatureMap (org.eclipse.emf.ecore.util.FeatureMap)5 FlowElement (org.eclipse.bpmn2.FlowElement)4 Process (org.eclipse.bpmn2.Process)4 RootElement (org.eclipse.bpmn2.RootElement)4