use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent in project kie-wb-common by kiegroup.
the class CatchingIntermediateConditionalEventTest method testUnmarshallTopLevelEventFilledProperties.
@Test
@Override
public void testUnmarshallTopLevelEventFilledProperties() throws Exception {
final String EVENT_NAME = "Event01 ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String EVENT_DOCUMENTATION = "Event 01 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String CONDITION_EXPRESSION_SCRIPT = "com.myspace.testproject.Person(name == \"John\")";
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
IntermediateConditionalEvent filledTopEvent = getCatchingIntermediateNodeById(diagram, FILLED_TOP_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, ZERO_OUTGOING_EDGES);
assertGeneralSet(filledTopEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
assertConditionalEventExecutionSet(filledTopEvent.getExecutionSet(), CONDITION_EXPRESSION_SCRIPT, CONDITION_EXPRESSION_LANGUAGE, CONDITION_EXPRESSION_TYPE, CANCELLING, SLA_DUE_DATE);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent in project kie-wb-common by kiegroup.
the class BoundaryCatchingIntermediateConditionalEventTest method testUnmarshallTopLevelEventFilledProperties.
@Test
@Override
public void testUnmarshallTopLevelEventFilledProperties() throws Exception {
final String EVENT_NAME = "Boundary01 ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String EVENT_DOCUMENTATION = "Boundary 01 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String CONDITION_EXPRESSION_SCRIPT = "com.myspace.testproject.Person(name == \"John\")";
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
IntermediateConditionalEvent filledTopEvent = getCatchingIntermediateNodeById(diagram, FILLED_TOP_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, ZERO_OUTGOING_EDGES);
assertGeneralSet(filledTopEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
assertConditionalEventExecutionSet(filledTopEvent.getExecutionSet(), CONDITION_EXPRESSION_SCRIPT, CONDITION_EXPRESSION_LANGUAGE, CONDITION_ERPRESSION_TYPE, CANCELLING, SLA_DUE_DATE);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverterTest method verifyConditionalEventConvert.
private void verifyConditionalEventConvert() {
IntermediateConditionalEvent definition = mock(IntermediateConditionalEvent.class);
ConditionalEventDefinition eventDefinition = mock(ConditionalEventDefinition.class);
IntermediateCatchEvent intermediateCatchEvent = mockIntermediateCatchEvent(definition);
eventDefinitions.clear();
eventDefinitions.add(eventDefinition);
tested.convert(intermediateCatchEvent);
verify(tested).conditionalEvent(intermediateCatchEvent, eventDefinition);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverterTest method verifyBoundaryConditionalEventConvert.
private void verifyBoundaryConditionalEventConvert() {
IntermediateConditionalEvent definition = mock(IntermediateConditionalEvent.class);
ConditionalEventDefinition eventDefinition = mock(ConditionalEventDefinition.class);
BoundaryEvent boundaryEvent = mockBoundaryEvent(definition);
eventDefinitions.clear();
eventDefinitions.add(eventDefinition);
tested.convertBoundaryEvent(boundaryEvent);
verify(tested).conditionalEvent(boundaryEvent, eventDefinition);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverter method conditionalEvent.
protected PropertyWriter conditionalEvent(Node<View<IntermediateConditionalEvent>, ?> n) {
CatchEventPropertyWriter p = createCatchEventPropertyWriter(n);
p.getFlowElement().setId(n.getUUID());
p.setAbsoluteBounds(n);
IntermediateConditionalEvent definition = n.getContent().getDefinition();
BPMNGeneralSet general = definition.getGeneral();
p.setName(general.getName().getValue());
p.setDocumentation(general.getDocumentation().getValue());
p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
CancellingConditionalEventExecutionSet executionSet = definition.getExecutionSet();
p.setCancelActivity(executionSet.getCancelActivity().getValue());
p.addSlaDueDate(executionSet.getSlaDueDate());
p.addCondition(executionSet.getConditionExpression());
return p;
}
Aggregations