Search in sources :

Example 11 with StartMessageEvent

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);
}
Also used : StartMessageEvent(org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent) Graph(org.kie.workbench.common.stunner.core.graph.Graph) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Example 12 with StartMessageEvent

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);
}
Also used : StartMessageEvent(org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent) Graph(org.kie.workbench.common.stunner.core.graph.Graph) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Example 13 with StartMessageEvent

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);
}
Also used : StartMessageEvent(org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent) Graph(org.kie.workbench.common.stunner.core.graph.Graph) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Example 14 with StartMessageEvent

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);
}
Also used : StartMessageEvent(org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent) Graph(org.kie.workbench.common.stunner.core.graph.Graph) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Example 15 with StartMessageEvent

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;
}
Also used : StartMessageEvent(org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent) CatchEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter) StartEvent(org.eclipse.bpmn2.StartEvent) BaseStartEvent(org.kie.workbench.common.stunner.bpmn.definition.BaseStartEvent) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) InterruptingMessageEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.InterruptingMessageEventExecutionSet)

Aggregations

StartMessageEvent (org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent)17 Test (org.junit.Test)12 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)7 Graph (org.kie.workbench.common.stunner.core.graph.Graph)7 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)5 AssignmentsInfo (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)4 IsInterrupting (org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting)4 InterruptingMessageEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.message.InterruptingMessageEventExecutionSet)4 BaseStartEvent (org.kie.workbench.common.stunner.bpmn.definition.BaseStartEvent)3 StartEscalationEvent (org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent)3 StartSignalEvent (org.kie.workbench.common.stunner.bpmn.definition.StartSignalEvent)3 MessageRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef)3 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)3 StartConditionalEvent (org.kie.workbench.common.stunner.bpmn.definition.StartConditionalEvent)2 StartErrorEvent (org.kie.workbench.common.stunner.bpmn.definition.StartErrorEvent)2 StartTimerEvent (org.kie.workbench.common.stunner.bpmn.definition.StartTimerEvent)2 SLADueDate (org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate)2 StartEvent (org.eclipse.bpmn2.StartEvent)1 ParsedAssignmentsInfo (org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo)1 CatchEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter)1