use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEvent in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverter method compensationEvent.
protected PropertyWriter compensationEvent(Node<View<IntermediateCompensationEvent>, ?> n) {
CatchEventPropertyWriter p = createCatchEventPropertyWriter(n);
p.getFlowElement().setId(n.getUUID());
p.setAbsoluteBounds(n);
IntermediateCompensationEvent definition = n.getContent().getDefinition();
BPMNGeneralSet general = definition.getGeneral();
p.setName(general.getName().getValue());
p.setDocumentation(general.getDocumentation().getValue());
p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
BaseCancellingEventExecutionSet executionSet = definition.getExecutionSet();
p.addSlaDueDate(executionSet.getSlaDueDate());
p.addCompensation();
return p;
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEvent in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverterTest method compensationEvent.
@Test
public void compensationEvent() {
IntermediateCompensationEvent definition = mock(IntermediateCompensationEvent.class);
CompensateEventDefinition eventDefinition = mock(CompensateEventDefinition.class);
CatchEvent catchEvent = mockIntermediateCatchEvent(definition);
tested.compensationEvent(catchEvent);
verifyCommonProperties(definition);
verify(propertyReader).getSlaDueDate();
verify(definition).setExecutionSet(Mockito.<BaseCancellingEventExecutionSet>any());
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEvent in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverterTest method verifyBoundaryCompensationEventConvert.
private void verifyBoundaryCompensationEventConvert() {
IntermediateCompensationEvent definition = mock(IntermediateCompensationEvent.class);
CompensateEventDefinition eventDefinition = mock(CompensateEventDefinition.class);
BoundaryEvent boundaryEvent = mockBoundaryEvent(definition);
eventDefinitions.clear();
eventDefinitions.add(eventDefinition);
tested.convertBoundaryEvent(boundaryEvent);
verify(tested).compensationEvent(boundaryEvent);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEvent in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverterTest method createIntermediateCompensationEventCatchingNode.
private Node createIntermediateCompensationEventCatchingNode() {
BaseCancellingEventExecutionSet executionSet = new BaseCancellingEventExecutionSet(new CancelActivity(CANCEL_ACTIVITY), slaDueDate);
IntermediateCompensationEvent eventCatching = new IntermediateCompensationEvent(generalSet, mock(BackgroundSet.class), mock(FontSet.class), mock(CircleDimensionSet.class), dataIOSet, advancedData, executionSet);
Node dockNode = mockNode();
Node node = mockDockedNode(dockNode, eventCatching);
return node;
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEvent in project kie-wb-common by kiegroup.
the class ProcessCompensationRefProviderTest method testGetSelectorDataLevel0ZeroTasks.
@Test
public void testGetSelectorDataLevel0ZeroTasks() {
TestingGraphInstanceBuilder2.Level0Graph graph = buildLevel0Graph(graphTestHandler, new TestingGraphInstanceBuilder2.Level0Graph(), new StartNoneEvent(), new IntermediateCompensationEvent(), new IntermediateConditionalEvent(), new EndNoneEvent());
testGetSelectorData(graph.level0Node2, expectedNodes());
}
Aggregations