@Override public CompensationEventExecutionSet getExecutionSet(IntermediateCompensationEventThrowing event) { return event.getExecutionSet(); }
@Override public IntermediateCompensationEventThrowing createEvent() { CompensationEventExecutionSet executionSet = new CompensationEventExecutionSet(); when(intermediateCompensationEventThrowing.getExecutionSet()).thenReturn(executionSet); return intermediateCompensationEventThrowing; }
@Override public void process(ProcessPropertyWriter processWriter, BasePropertyWriter nodeWriter, Node<View<? extends BPMNViewDefinition>, ?> node) { final ThrowEvent throwEvent = (ThrowEvent) nodeWriter.getElement(); final String activityRef = ((IntermediateCompensationEventThrowing) node.getContent().getDefinition()).getExecutionSet().getActivityRef().getValue(); linkActivityRef(processWriter.getProcess(), throwEvent, activityRef); } }
currentActivityRef = ((EndCompensationEvent) ((View) selectedNode.getContent()).getDefinition()).getExecutionSet().getActivityRef(); } else if (isIntermediateCompensationEventThrowing(selectedNode)) { currentActivityRef = ((IntermediateCompensationEventThrowing) ((View) selectedNode.getContent()).getDefinition()).getExecutionSet().getActivityRef();
@Test @SuppressWarnings("unchecked") public void testUnmarshallIntermediateCompensationEventThrowing() throws Exception { Diagram<Graph, Metadata> diagram = unmarshall(BPMN_INTERMEDIATE_COMPENSATION_EVENTTHROWING); assertDiagram(diagram, 3); assertEquals("IntermediateCompensationEventThrowing", diagram.getMetadata().getTitle()); Node<? extends Definition, ?> throwingEventNode = diagram.getGraph().getNode("_F1D87D25-4D73-4DC5-A0C2-C627CED773BA"); assertNotNull(throwingEventNode); IntermediateCompensationEventThrowing throwingCompensationEvent = (IntermediateCompensationEventThrowing) throwingEventNode.getContent().getDefinition(); assertNotNull(throwingCompensationEvent.getGeneral()); assertEquals("ThrowingCompensationEventName", throwingCompensationEvent.getGeneral().getName().getValue()); assertEquals("ThrowingCompensationEventDocumentation", throwingCompensationEvent.getGeneral().getDocumentation().getValue()); assertNotNull(throwingCompensationEvent.getExecutionSet()); assertEquals("_E318295E-B0B6-4FB2-B5EB-A43BFD44FCBD", throwingCompensationEvent.getExecutionSet().getActivityRef().getValue()); }