use of org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo in project kie-wb-common by kiegroup.
the class AssignmentsInfos method of.
public static AssignmentsInfo of(final List<DataInput> datainput, final List<DataInputAssociation> inputAssociations, final List<DataOutput> dataoutput, final List<DataOutputAssociation> outputAssociations, boolean alternativeEncoding) {
DeclarationList inputs = dataInputDeclarations(datainput);
DeclarationList outputs = dataOutputDeclarations(dataoutput);
AssociationList associations = new AssociationList(inAssociationDeclarations(inputAssociations), outAssociationDeclarations(outputAssociations));
return new AssignmentsInfo(new ParsedAssignmentsInfo(inputs, outputs, associations, alternativeEncoding).toString());
}
use of org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo in project kie-wb-common by kiegroup.
the class ParsedAssignmentsInfoTest method assertParseUnparse.
private void assertParseUnparse(String original) {
ParsedAssignmentsInfo assignmentsInfo = ParsedAssignmentsInfo.fromString(original);
String s1 = assignmentsInfo.toString();
String s2 = ParsedAssignmentsInfo.fromString(s1).toString();
assertEquals(original, s2);
}
use of org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest method testUnmarshallTravels.
@Test
public void testUnmarshallTravels() throws Exception {
final Diagram<Graph, Metadata> diagram = unmarshall(BPMN_TRAVELS);
// User Task 1
Node<? extends View, ?> userTask1Node = diagram.getGraph().getNode("UserTask_1");
UserTask userTask1 = (UserTask) userTask1Node.getContent().getDefinition();
ParsedAssignmentsInfo parsedAssignmentsInfo = ParsedAssignmentsInfo.fromString(userTask1.getExecutionSet().getAssignmentsinfo().getValue());
assertDataTye("org.acme.travels.Trip", "trip", parsedAssignmentsInfo.getInputs());
assertDataTye("org.acme.travels.Traveller", "traveller", parsedAssignmentsInfo.getInputs());
assertDataTye("java.lang.Boolean", "Skippable", parsedAssignmentsInfo.getInputs());
assertDataTye("java.lang.Integer", "Priority", parsedAssignmentsInfo.getInputs());
assertDataTye("java.lang.String", "Comment", parsedAssignmentsInfo.getInputs());
// Business Rule 1
Node<? extends View, ?> businessRuleTaskNode = diagram.getGraph().getNode("BusinessRuleTask_1");
BusinessRuleTask businessRuleTask1 = (BusinessRuleTask) businessRuleTaskNode.getContent().getDefinition();
ParsedAssignmentsInfo businessRuleParsedAssignmentsInfo = ParsedAssignmentsInfo.fromString(businessRuleTask1.getDataIOSet().getAssignmentsinfo().getValue());
assertDataTye("org.acme.travels.Traveller", "traveller", businessRuleParsedAssignmentsInfo.getInputs());
assertDataTye("org.acme.travels.Trip", "trip", businessRuleParsedAssignmentsInfo.getInputs());
assertDataTye("org.acme.travels.Trip", "trip", businessRuleParsedAssignmentsInfo.getOutputs());
}
use of org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo in project kie-wb-common by kiegroup.
the class AssignmentsInfos method parsed.
public static ParsedAssignmentsInfo parsed(List<DataInput> datainput, List<DataInputAssociation> inputAssociations, List<DataOutput> dataoutput, List<DataOutputAssociation> outputAssociations, boolean alternativeEncoding) {
DeclarationList inputs = dataInputDeclarations(datainput);
DeclarationList outputs = dataOutputDeclarations(dataoutput);
AssociationList associations = new AssociationList(inAssociationDeclarations(inputAssociations), outAssociationDeclarations(outputAssociations));
return new ParsedAssignmentsInfo(inputs, outputs, associations, alternativeEncoding);
}
use of org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo in project kie-wb-common by kiegroup.
the class ParsedAssignmentsInfoTest method testAssertParseUnparse.
private void testAssertParseUnparse(String original) {
ParsedAssignmentsInfo assignmentsInfo = ParsedAssignmentsInfo.fromString(original);
String s1 = assignmentsInfo.toString();
String s2 = ParsedAssignmentsInfo.fromString(s1).toString();
assertEquals(original, s2);
}
Aggregations