use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEventThrowing in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverter method compensationEvent.
protected PropertyWriter compensationEvent(Node<View<IntermediateCompensationEventThrowing>, ?> n) {
IntermediateThrowEvent event = bpmn2.createIntermediateThrowEvent();
event.setId(n.getUUID());
ThrowEventPropertyWriter p = propertyWriterFactory.of(event);
IntermediateCompensationEventThrowing definition = n.getContent().getDefinition();
p.setAbsoluteBounds(n);
BPMNGeneralSet general = definition.getGeneral();
p.setName(general.getName().getValue());
p.setDocumentation(general.getDocumentation().getValue());
p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
p.addCompensation();
return p;
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEventThrowing in project kie-wb-common by kiegroup.
the class IntermediateThrowCompensationEventPostConverter method process.
@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);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEventThrowing in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverterTest method compensationEvent.
@Test
public void compensationEvent() {
IntermediateCompensationEventThrowing definition = mock(IntermediateCompensationEventThrowing.class);
CompensateEventDefinition eventDefinition = mock(CompensateEventDefinition.class);
IntermediateThrowEvent intermediateThrowEvent = mockIntermediateThrowEvent(definition);
tested.compensationEvent(intermediateThrowEvent, eventDefinition);
verifyCommonProperties(definition);
verify(definition).setExecutionSet(any(CompensationEventExecutionSet.class));
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEventThrowing in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverterTest method createIntermediateCompensationEventThrowingNode.
private Node createIntermediateCompensationEventThrowingNode() {
CompensationEventExecutionSet executionSet = new CompensationEventExecutionSet();
IntermediateCompensationEventThrowing eventThrowing = new IntermediateCompensationEventThrowing(generalSet, mock(BackgroundSet.class), mock(FontSet.class), mock(CircleDimensionSet.class), dataIOSet, advancedData, executionSet);
Node dockNode = mockNode();
Node node = mockDockedNode(dockNode, eventThrowing);
return node;
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEventThrowing in project kie-wb-common by kiegroup.
the class ThrowingIntermediateCompensationEventTest method testUnmarshallTopLevelEmptyEventProperties.
@Test
@Override
public void testUnmarshallTopLevelEmptyEventProperties() throws Exception {
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
IntermediateCompensationEventThrowing emptyTopEvent = getThrowingIntermediateNodeById(diagram, EMPTY_TOP_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, ZERO_OUTGOING_EDGES);
assertGeneralSet(emptyTopEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
assertCompensationEventExecutionSet(emptyTopEvent.getExecutionSet(), DEFAULT_REFERENCE_ACTIVITY);
}
Aggregations