use of org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent in project kie-wb-common by kiegroup.
the class VariableUtilsTest method mockStartEscalationEvent.
private StartEscalationEvent mockStartEscalationEvent(String name, String assignmentsInfoValue) {
StartEscalationEvent result = mockStartEvent(name, StartEscalationEvent.class);
AssignmentsInfo assignmentsInfo = mockAssignmentsInfo(assignmentsInfoValue);
DataIOSet dataIOSet = mockIOSet(assignmentsInfo);
when(result.getDataIOSet()).thenReturn(dataIOSet);
return result;
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent in project kie-wb-common by kiegroup.
the class StartEventFilterProviderFactoryTest method testFilterProviderHideIsInterruptingField.
@Test
public void testFilterProviderHideIsInterruptingField() {
BaseStartEvent[] test1Classes = { new StartNoneEvent(), new StartCompensationEvent(), new StartSignalEvent(), new StartTimerEvent(), new StartConditionalEvent(), new StartErrorEvent(), new StartEscalationEvent(), new StartMessageEvent() };
when(parentView.getDefinition()).thenReturn(otherNode);
Stream.of(test1Classes).forEach(catchingIntermediateEvent -> testStartEventFilterProviderHideIsInterruptingField(catchingIntermediateEvent));
BaseStartEvent[] test2Classes = { new StartNoneEvent(), new StartCompensationEvent(), new StartErrorEvent() };
when(parentView.getDefinition()).thenReturn(eventSubprocess);
Stream.of(test2Classes).forEach(clazz -> testStartEventFilterProviderHideIsInterruptingField(clazz));
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent in project kie-wb-common by kiegroup.
the class EventInterruptingViewHandlerTest method testHandleEscalationIsInterrupting.
@Test
@SuppressWarnings("unchecked")
public void testHandleEscalationIsInterrupting() {
final StartEscalationEvent bean = new StartEscalationEvent();
bean.getExecutionSet().getIsInterrupting().setValue(true);
tested.handle(bean, view);
verify(prim1).setFillAlpha(eq(1d));
verify(prim1).setStrokeAlpha(eq(0d));
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent in project kie-wb-common by kiegroup.
the class AbstractDataTypeCacheTest method testExtractStartEscalationEvent.
@Test
public void testExtractStartEscalationEvent() {
StartEscalationEvent startEscalationEvent = new StartEscalationEvent();
StartEscalationEvent startEscalationEvent2 = new StartEscalationEvent();
when(firstView.getDefinition()).thenReturn(startEscalationEvent);
when(lastView.getDefinition()).thenReturn(startEscalationEvent2);
dataTypeCache.extractFromItem(firstView);
dataTypeCache.extractFromItem(lastView);
assertTrue(dataTypeCache.allDataTypes.contains("MyType"));
assertTrue(dataTypeCache.allDataTypes.contains("com.myspace.Person"));
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest method testUnmarshallStartEscalationEvent.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallStartEscalationEvent() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_STARTESCALATIONEVENT);
assertDiagram(diagram, 2);
assertEquals("StartEscalationEvent", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> startEventNode = diagram.getGraph().getNode("_D5AAA79F-9CD6-43C1-92E2-5D3C9340A303");
assertNotNull(startEventNode);
StartEscalationEvent startEscalationEvent = (StartEscalationEvent) startEventNode.getContent().getDefinition();
assertNotNull(startEscalationEvent.getGeneral());
assertEquals("StartEscalationEventName", startEscalationEvent.getGeneral().getName().getValue());
assertEquals("StartEscalationEventDocumentation", startEscalationEvent.getGeneral().getDocumentation().getValue());
assertNotNull(startEscalationEvent.getExecutionSet());
assertEquals("EscalationCode", startEscalationEvent.getExecutionSet().getEscalationRef().getValue());
assertEquals(true, startEscalationEvent.getExecutionSet().getIsInterrupting().getValue());
assertEquals("12/25/1983", startEscalationEvent.getExecutionSet().getSlaDueDate().getValue());
DataIOSet dataIOSet = startEscalationEvent.getDataIOSet();
AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
assertEquals("||escalationOutput:String||[dout]escalationOutput->processVar1", assignmentsInfo.getValue());
}
Aggregations