use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventThrowing in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverter method signalEvent.
private BpmnNode signalEvent(IntermediateThrowEvent event, SignalEventDefinition eventDefinition) {
Node<View<IntermediateSignalEventThrowing>, Edge> node = factoryManager.newNode(event.getId(), IntermediateSignalEventThrowing.class);
IntermediateSignalEventThrowing definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
definition.setExecutionSet(new ScopedSignalEventExecutionSet(new SignalRef(p.getSignalRef()), new SignalScope(p.getSignalScope())));
node.getContent().setBounds(p.getBounds());
definition.setDimensionsSet(p.getCircleDimensionSet());
definition.setFontSet(p.getFontSet());
definition.setBackgroundSet(p.getBackgroundSet());
return BpmnNode.of(node);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventThrowing in project kie-wb-common by kiegroup.
the class BPMNDiagramMarshallerTest method testUnmarshallIntermediateSignalEventThrowing.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallIntermediateSignalEventThrowing() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_INTERMEDIATE_SIGNAL_EVENTTHROWING);
assertDiagram(diagram, 2);
assertEquals("intermediateSignalThrowing", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> intermediateEventNode = diagram.getGraph().getNode("_A45EC77D-5414-4348-BA8F-05C4FFD660EE");
IntermediateSignalEventThrowing intermediateSignalEventThrowing = (IntermediateSignalEventThrowing) intermediateEventNode.getContent().getDefinition();
assertNotNull(intermediateSignalEventThrowing.getGeneral());
assertEquals("MySignalThrowingEvent", intermediateSignalEventThrowing.getGeneral().getName().getValue());
assertEquals("MySignalThrowingEventDocumentation", intermediateSignalEventThrowing.getGeneral().getDocumentation().getValue());
assertNotNull(intermediateSignalEventThrowing.getExecutionSet());
assertEquals("processInstance", intermediateSignalEventThrowing.getExecutionSet().getSignalScope().getValue());
assertEquals("MySignal", intermediateSignalEventThrowing.getExecutionSet().getSignalRef().getValue());
DataIOSet dataIOSet = intermediateSignalEventThrowing.getDataIOSet();
AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
assertEquals("_input1:String||||[din]var1->_input1", assignmentsInfo.getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventThrowing in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest method testUnmarshallIntermediateSignalEventThrowing.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallIntermediateSignalEventThrowing() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_INTERMEDIATE_SIGNAL_EVENTTHROWING);
assertDiagram(diagram, 2);
assertEquals("intermediateSignalThrowing", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> intermediateEventNode = diagram.getGraph().getNode("_A45EC77D-5414-4348-BA8F-05C4FFD660EE");
IntermediateSignalEventThrowing intermediateSignalEventThrowing = (IntermediateSignalEventThrowing) intermediateEventNode.getContent().getDefinition();
assertNotNull(intermediateSignalEventThrowing.getGeneral());
assertEquals("MySignalThrowingEvent", intermediateSignalEventThrowing.getGeneral().getName().getValue());
assertEquals("MySignalThrowingEventDocumentation", intermediateSignalEventThrowing.getGeneral().getDocumentation().getValue());
assertNotNull(intermediateSignalEventThrowing.getExecutionSet());
assertEquals("processInstance", intermediateSignalEventThrowing.getExecutionSet().getSignalScope().getValue());
assertEquals("MySignal", intermediateSignalEventThrowing.getExecutionSet().getSignalRef().getValue());
DataIOSet dataIOSet = intermediateSignalEventThrowing.getDataIOSet();
AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
assertEquals("_input1:String||||[din]var1->_input1", assignmentsInfo.getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventThrowing in project kie-wb-common by kiegroup.
the class ProcessSignalRefProviderTest method mockIntermediateSignalEventThrowingNode.
private Node mockIntermediateSignalEventThrowingNode(String signalRefValue) {
IntermediateSignalEventThrowing event = new IntermediateSignalEventThrowing();
event.setExecutionSet(new ScopedSignalEventExecutionSet(new SignalRef(signalRefValue), new SignalScope()));
return mockNode(event);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventThrowing in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverter method signalEvent.
private PropertyWriter signalEvent(Node<View<IntermediateSignalEventThrowing>, ?> n) {
IntermediateThrowEvent event = bpmn2.createIntermediateThrowEvent();
event.setId(n.getUUID());
IntermediateSignalEventThrowing definition = n.getContent().getDefinition();
ThrowEventPropertyWriter p = propertyWriterFactory.of(event);
BPMNGeneralSet general = definition.getGeneral();
p.setName(general.getName().getValue());
p.setDocumentation(general.getDocumentation().getValue());
p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
p.addSignal(definition.getExecutionSet().getSignalRef());
p.addSignalScope(definition.getExecutionSet().getSignalScope());
p.setBounds(n.getContent().getBounds());
return p;
}
Aggregations