use of org.kie.workbench.common.stunner.bpmn.definition.EndSignalEvent in project kie-wb-common by kiegroup.
the class EndEventConverter method signalEventDefinition.
private BpmnNode signalEventDefinition(EndEvent event, SignalEventDefinition nodeId) {
Node<View<EndSignalEvent>, Edge> node = factoryManager.newNode(event.getId(), EndSignalEvent.class);
EndSignalEvent 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.EndSignalEvent in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest method testUnmarshallEndSignalEvent.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallEndSignalEvent() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_ENDSIGNALEVENT);
assertDiagram(diagram, 2);
assertEquals("EndEventAssignments", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> endSignalEventNode = diagram.getGraph().getNode("_C9151E0C-2E3E-4558-AFC2-34038E3A8552");
EndSignalEvent endSignalEvent = (EndSignalEvent) endSignalEventNode.getContent().getDefinition();
DataIOSet dataIOSet = endSignalEvent.getDataIOSet();
AssignmentsInfo assignmentsinfo = dataIOSet.getAssignmentsinfo();
assertEquals("EndSignalEventInput1:String||||[din]employee->EndSignalEventInput1", assignmentsinfo.getValue());
assertEquals("project", endSignalEvent.getExecutionSet().getSignalScope().getValue());
assertEquals("employee", endSignalEvent.getExecutionSet().getSignalRef().getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.EndSignalEvent in project kie-wb-common by kiegroup.
the class ProcessSignalRefProviderTest method mockEndSignalEventNode.
private Node mockEndSignalEventNode(String signalRefValue) {
EndSignalEvent event = new EndSignalEvent();
event.setExecutionSet(new ScopedSignalEventExecutionSet(new SignalRef(signalRefValue), new SignalScope()));
return mockNode(event);
}
use of org.kie.workbench.common.stunner.bpmn.definition.EndSignalEvent in project kie-wb-common by kiegroup.
the class BPMNDiagramMarshallerTest method testUnmarshallEndSignalEvent.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallEndSignalEvent() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_ENDSIGNALEVENT);
assertDiagram(diagram, 2);
assertEquals("EndEventAssignments", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> endSignalEventNode = diagram.getGraph().getNode("_C9151E0C-2E3E-4558-AFC2-34038E3A8552");
EndSignalEvent endSignalEvent = (EndSignalEvent) endSignalEventNode.getContent().getDefinition();
DataIOSet dataIOSet = endSignalEvent.getDataIOSet();
AssignmentsInfo assignmentsinfo = dataIOSet.getAssignmentsinfo();
assertEquals("EndSignalEventInput1:String||||[din]employee->EndSignalEventInput1", assignmentsinfo.getValue());
assertEquals("project", endSignalEvent.getExecutionSet().getSignalScope().getValue());
assertEquals("employee", endSignalEvent.getExecutionSet().getSignalRef().getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.EndSignalEvent in project kie-wb-common by kiegroup.
the class EndEventConverter method signalEvent.
private PropertyWriter signalEvent(Node<View<EndSignalEvent>, ?> n) {
EndEvent event = bpmn2.createEndEvent();
event.setId(n.getUUID());
EndSignalEvent 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.setBounds(n.getContent().getBounds());
return p;
}
Aggregations