Search in sources :

Example 21 with DataInput

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

the class CustomInput method setStringValue.

private void setStringValue(String value) {
    if (value == null || value.isEmpty()) {
        return;
    }
    DataInputAssociation input = input(value);
    getIoSpecification(element).getDataInputs().add((DataInput) input.getTargetRef());
    element.getDataInputAssociations().add(input);
}
Also used : DataInputAssociation(org.eclipse.bpmn2.DataInputAssociation)

Example 22 with DataInput

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

the class CustomInput method associationOf.

private DataInputAssociation associationOf(Assignment assignment, DataInput dataInput) {
    DataInputAssociation dataInputAssociation = bpmn2.createDataInputAssociation();
    dataInputAssociation.getAssignment().add(assignment);
    dataInputAssociation.setTargetRef(dataInput);
    return dataInputAssociation;
}
Also used : DataInputAssociation(org.eclipse.bpmn2.DataInputAssociation)

Example 23 with DataInput

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

the class CustomInput method input.

private DataInputAssociation input(Object value) {
    // first we declare the type of this assignment
    // // then we declare the input that will provide
    // // the value that we assign to `source`
    // // e.g. myInput
    DataInput target = readInputFrom(inputDefinition.name(), typeDef);
    Assignment assignment = assignment(value.toString(), target.getId());
    // then we create the actual association between the two
    // e.g. foo := myInput (or, to put it differently, myInput -> foo)
    DataInputAssociation association = associationOf(assignment, target);
    return association;
}
Also used : DataInput(org.eclipse.bpmn2.DataInput) Assignment(org.eclipse.bpmn2.Assignment) DataInputAssociation(org.eclipse.bpmn2.DataInputAssociation)

Example 24 with DataInput

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

the class InputAssignmentWriter method associationOf.

private DataInputAssociation associationOf(Property source, DataInput dataInput) {
    DataInputAssociation dataInputAssociation = bpmn2.createDataInputAssociation();
    dataInputAssociation.getSourceRef().add(source);
    dataInputAssociation.setTargetRef(dataInput);
    return dataInputAssociation;
}
Also used : DataInputAssociation(org.eclipse.bpmn2.DataInputAssociation)

Aggregations

DataInput (org.eclipse.bpmn2.DataInput)20 DataInputAssociation (org.eclipse.bpmn2.DataInputAssociation)15 DataOutput (org.eclipse.bpmn2.DataOutput)12 FormalExpression (org.eclipse.bpmn2.FormalExpression)10 ArrayList (java.util.ArrayList)9 InputSet (org.eclipse.bpmn2.InputSet)9 ItemAwareElement (org.eclipse.bpmn2.ItemAwareElement)9 DataOutputAssociation (org.eclipse.bpmn2.DataOutputAssociation)8 SimpleFeatureMapEntry (org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.SimpleFeatureMapEntry)8 List (java.util.List)7 Assignment (org.eclipse.bpmn2.Assignment)7 Parameter (bpsim.Parameter)5 InputOutputSpecification (org.eclipse.bpmn2.InputOutputSpecification)5 NormalDistributionType (bpsim.NormalDistributionType)4 PoissonDistributionType (bpsim.PoissonDistributionType)4 TimeParameters (bpsim.TimeParameters)4 UniformDistributionType (bpsim.UniformDistributionType)4 Entry (java.util.Map.Entry)4 AdHocSubProcess (org.eclipse.bpmn2.AdHocSubProcess)4 FlowElement (org.eclipse.bpmn2.FlowElement)4