use of org.kie.workbench.common.stunner.bpmn.definition.StartConditionalEvent in project kie-wb-common by kiegroup.
the class StartConditionalEventTest method testUnmarshallSubprocessLevelEventFilledProperties.
@Test
@Override
public void testUnmarshallSubprocessLevelEventFilledProperties() throws Exception {
final String EVENT_NAME = "Conditional event02 ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String EVENT_DOCUMENTATION = "Conditional event02 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);
StartConditionalEvent filledSubprocess = getStartNodeById(diagram, FILLED_SUBPROCESS_LEVEL_EVENT_ID);
assertGeneralSet(filledSubprocess.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
assertConditionalEventExecutionSet(filledSubprocess.getExecutionSet(), CONDITION_EXPRESSION_SCRIPT, CONDITION_EXPRESSION_LANGUAGE, CONDITION_ERPRESSION_TYPE, INTERRUPTING, SLA_DUE_DATE);
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartConditionalEvent in project kie-wb-common by kiegroup.
the class StartConditionalEventTest method testUnmarshallTopLevelEmptyEventProperties.
@Test
@Override
public void testUnmarshallTopLevelEmptyEventProperties() throws Exception {
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartConditionalEvent emptyTop = getStartNodeById(diagram, EMPTY_TOP_LEVEL_EVENT_ID);
assertGeneralSet(emptyTop.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
assertConditionalEventExecutionSet(emptyTop.getExecutionSet(), CONDITION_EXPRESSION_SCRIPT_DEFAULT_VALUE, CONDITION_EXPRESSION_LANGUAGE, CONDITION_ERPRESSION_TYPE, INTERRUPTING, EMPTY_VALUE);
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartConditionalEvent in project kie-wb-common by kiegroup.
the class StartEventConverter method conditionalEvent.
private BpmnNode conditionalEvent(StartEvent event, ConditionalEventDefinition e) {
Node<View<StartConditionalEvent>, Edge> node = factoryManager.newNode(event.getId(), StartConditionalEvent.class);
StartConditionalEvent definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setBackgroundSet(p.getBackgroundSet());
definition.setFontSet(p.getFontSet());
definition.setDimensionsSet(p.getCircleDimensionSet());
definition.setSimulationSet(p.getSimulationSet());
definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
IsInterrupting isInterrupting = new IsInterrupting(event.isIsInterrupting());
SLADueDate slaDueDate = new SLADueDate(p.getSlaDueDate());
InterruptingConditionalEventExecutionSet executionSet = new InterruptingConditionalEventExecutionSet(isInterrupting, slaDueDate, p.getConditionExpression(e));
definition.setExecutionSet(executionSet);
node.getContent().setBounds(p.getBounds());
return BpmnNode.of(node, p);
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartConditionalEvent in project kie-wb-common by kiegroup.
the class EventInterruptingViewHandlerTest method testHandleConditionalIsInterrupting.
@Test
@SuppressWarnings("unchecked")
public void testHandleConditionalIsInterrupting() {
final StartConditionalEvent bean = new StartConditionalEvent();
bean.getExecutionSet().getIsInterrupting().setValue(true);
tested.handle(bean, view);
verify(prim1).setFillAlpha(eq(1d));
verify(prim1).setStrokeAlpha(eq(0d));
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartConditionalEvent in project kie-wb-common by kiegroup.
the class StartConditionalEventTest method testUnmarshallSubprocessLevelEventEmptyProperties.
@Test
@Override
public void testUnmarshallSubprocessLevelEventEmptyProperties() throws Exception {
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartConditionalEvent emptySubprocess = getStartNodeById(diagram, EMPTY_SUBPROCESS_LEVEL_EVENT_ID);
assertGeneralSet(emptySubprocess.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
assertConditionalEventExecutionSet(emptySubprocess.getExecutionSet(), CONDITION_EXPRESSION_SCRIPT_DEFAULT_VALUE, CONDITION_EXPRESSION_LANGUAGE, CONDITION_ERPRESSION_TYPE, NON_INTERRUPTING, EMPTY_VALUE);
}
Aggregations