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);
}
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;
}
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;
}
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;
}
Aggregations