use of org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent in project kie-wb-common by kiegroup.
the class StartMessageEventTest method testUnmarshallSubprocessLevelEventFilledProperties.
@Test
@Override
public void testUnmarshallSubprocessLevelEventFilledProperties() throws Exception {
final String EVENT_NAME = "Message name ~`!@#$%^&*()_+=-{}|\\][:\";'?><,./";
final String EVENT_DOCUMENTATION = "Doc is here\n~`!@#$%^&*()_+=-{}|\\][:\";'?><,./\n";
final String EVENT_REF = "Message2";
final String MESSAGE_TYPE = "String";
final String EVENT_DATA_OUTPUT = "||messageR:String||[dout]messageR->helloProcess";
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartMessageEvent filledSubprocess = getStartNodeById(diagram, FILLED_SUBPROCESS_LEVEL_EVENT_ID);
assertGeneralSet(filledSubprocess.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
assertMessageEventExecutionSet(filledSubprocess.getExecutionSet(), EVENT_REF, MESSAGE_TYPE, INTERRUPTING, SLA_DUE_DATE);
assertDataIOSet(filledSubprocess.getDataIOSet(), EVENT_DATA_OUTPUT);
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent in project kie-wb-common by kiegroup.
the class StartMessageEventTest method testUnmarshallSubprocessLevelEventEmptyProperties.
@Test
@Override
public void testUnmarshallSubprocessLevelEventEmptyProperties() throws Exception {
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartMessageEvent emptySubprocess = getStartNodeById(diagram, EMPTY_SUBPROCESS_LEVEL_EVENT_ID);
assertGeneralSet(emptySubprocess.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
assertMessageEventExecutionSet(emptySubprocess.getExecutionSet(), EMPTY_VALUE, EMPTY_VALUE, NON_INTERRUPTING, EMPTY_VALUE);
assertDataIOSet(emptySubprocess.getDataIOSet(), EMPTY_VALUE);
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent in project kie-wb-common by kiegroup.
the class StartMessageEventTest method testUnmarshallTopLevelEmptyEventProperties.
@Test
@Override
public void testUnmarshallTopLevelEmptyEventProperties() throws Exception {
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartMessageEvent emptyTop = getStartNodeById(diagram, EMPTY_TOP_LEVEL_EVENT_ID);
assertGeneralSet(emptyTop.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
assertMessageEventExecutionSet(emptyTop.getExecutionSet(), EMPTY_VALUE, EMPTY_VALUE, NON_INTERRUPTING, EMPTY_VALUE);
assertDataIOSet(emptyTop.getDataIOSet(), EMPTY_VALUE);
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent in project kie-wb-common by kiegroup.
the class StartMessageEventTest method testUnmarshallTopLevelEventFilledProperties.
@Test
@Override
public void testUnmarshallTopLevelEventFilledProperties() throws Exception {
final String EVENT_NAME = "Message message name ~`!@#$%^&*()_+=-{}|\\][:\";'?><,./";
final String EVENT_DOCUMENTATION = "Message documentation\n~`!@#$%^&*()_+=-{}|\\][:\";'?><,./\n";
final String EVENT_REF = "Message1";
final String MESSAGE_TYPE = "String";
final String EVENT_DATA_OUTPUT = "||messageReceived:String||[dout]messageReceived->helloProcess";
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartMessageEvent filledTop = getStartNodeById(diagram, FILLED_TOP_LEVEL_EVENT_ID);
assertGeneralSet(filledTop.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
assertMessageEventExecutionSet(filledTop.getExecutionSet(), EVENT_REF, MESSAGE_TYPE, INTERRUPTING, SLA_DUE_DATE);
assertDataIOSet(filledTop.getDataIOSet(), EVENT_DATA_OUTPUT);
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent in project kie-wb-common by kiegroup.
the class StartEventConverter method messageEvent.
private PropertyWriter messageEvent(Node<View<StartMessageEvent>, ?> n) {
StartEvent event = bpmn2.createStartEvent();
event.setId(n.getUUID());
StartMessageEvent definition = n.getContent().getDefinition();
CatchEventPropertyWriter p = propertyWriterFactory.of(event);
BPMNGeneralSet general = definition.getGeneral();
p.setName(general.getName().getValue());
p.setDocumentation(general.getDocumentation().getValue());
p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
InterruptingMessageEventExecutionSet executionSet = definition.getExecutionSet();
event.setIsInterrupting(executionSet.getIsInterrupting().getValue());
p.addSlaDueDate((executionSet.getSlaDueDate()));
p.setAbsoluteBounds(n);
p.addMessage(executionSet.getMessageRef());
return p;
}
Aggregations