Search in sources :

Example 21 with MessageRef

use of org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef in project kie-wb-common by kiegroup.

the class BPMNDirectDiagramMarshallerTest method testUnmarshallIntermediateMessageEventThrowing.

@Test
@SuppressWarnings("unchecked")
public void testUnmarshallIntermediateMessageEventThrowing() throws Exception {
    Diagram<Graph, Metadata> diagram = unmarshall(BPMN_INTERMEDIATE_MESSAGE_EVENTTHROWING);
    assertDiagram(diagram, 2);
    assertEquals("IntermediateMessageEventThrowing", diagram.getMetadata().getTitle());
    Node<? extends Definition, ?> intermediateMessageEventThrowingNode = diagram.getGraph().getNode("_85823DF6-02A0-4B8D-AE7A-61641A3A2E4B");
    IntermediateMessageEventThrowing intermediateMessageEventThrowing = (IntermediateMessageEventThrowing) intermediateMessageEventThrowingNode.getContent().getDefinition();
    assertNotNull(intermediateMessageEventThrowing.getExecutionSet());
    MessageRef messageRef = intermediateMessageEventThrowing.getExecutionSet().getMessageRef();
    assertEquals("msgref", messageRef.getValue());
    DataIOSet dataIOSet = intermediateMessageEventThrowing.getDataIOSet();
    AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
    assertEquals("IntermediateMessageEventThrowingInputVar1:String||||[din]var1->IntermediateMessageEventThrowingInputVar1", assignmentsInfo.getValue());
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) Graph(org.kie.workbench.common.stunner.core.graph.Graph) MessageRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef) AssignmentsInfo(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo) ParsedAssignmentsInfo(org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) IntermediateMessageEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateMessageEventThrowing) Test(org.junit.Test)

Example 22 with MessageRef

use of org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef in project kie-wb-common by kiegroup.

the class BPMNDirectDiagramMarshallerTest method testUnmarshallEndMessageEvent.

@Test
@SuppressWarnings("unchecked")
public void testUnmarshallEndMessageEvent() throws Exception {
    Diagram<Graph, Metadata> diagram = unmarshall(BPMN_ENDMESSAGEEVENT);
    assertDiagram(diagram, 2);
    assertEquals("EndMessageEvent", diagram.getMetadata().getTitle());
    Node<? extends Definition, ?> endMessageEventNode = diagram.getGraph().getNode("_4A8A0A9E-D4A5-4B6E-94A6-20817A57B3C6");
    EndMessageEvent endMessageEvent = (EndMessageEvent) endMessageEventNode.getContent().getDefinition();
    assertNotNull(endMessageEvent.getExecutionSet());
    MessageRef messageRef = endMessageEvent.getExecutionSet().getMessageRef();
    assertEquals("msgref", messageRef.getValue());
    DataIOSet dataIOSet = endMessageEvent.getDataIOSet();
    AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
    assertEquals("EndMessageEventInputVar1:String||||[din]var1->EndMessageEventInputVar1", assignmentsInfo.getValue());
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) Graph(org.kie.workbench.common.stunner.core.graph.Graph) MessageRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef) AssignmentsInfo(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo) ParsedAssignmentsInfo(org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) EndMessageEvent(org.kie.workbench.common.stunner.bpmn.definition.EndMessageEvent) Test(org.junit.Test)

Example 23 with MessageRef

use of org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef in project kie-wb-common by kiegroup.

the class ProcessMessageRefProviderTest method mockEndMessageEventNode.

private Element mockEndMessageEventNode(String messageRefValue) {
    EndMessageEvent event = new EndMessageEvent();
    event.setExecutionSet(new MessageEventExecutionSet(new MessageRef(messageRefValue, "")));
    return mockNode(event);
}
Also used : MessageRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef) EndMessageEvent(org.kie.workbench.common.stunner.bpmn.definition.EndMessageEvent) CancellingMessageEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.CancellingMessageEventExecutionSet) MessageEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageEventExecutionSet) InterruptingMessageEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.InterruptingMessageEventExecutionSet)

Aggregations

MessageRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef)23 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)18 Test (org.junit.Test)14 AssignmentsInfo (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)14 SLADueDate (org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate)8 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)8 Graph (org.kie.workbench.common.stunner.core.graph.Graph)8 CancellingMessageEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.message.CancellingMessageEventExecutionSet)7 InterruptingMessageEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.message.InterruptingMessageEventExecutionSet)6 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)6 AdvancedData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData)6 IsInterrupting (org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting)5 MessageEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageEventExecutionSet)5 ParsedAssignmentsInfo (org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo)4 EndMessageEvent (org.kie.workbench.common.stunner.bpmn.definition.EndMessageEvent)4 IntermediateMessageEventCatching (org.kie.workbench.common.stunner.bpmn.definition.IntermediateMessageEventCatching)4 StartMessageEvent (org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent)4 CancelActivity (org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)4 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)4 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)4