use of org.kie.workbench.common.stunner.bpmn.definition.StartTimerEvent 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.StartTimerEvent in project kie-wb-common by kiegroup.
the class EventInterruptingViewHandlerTest method testHandleTimerIsNotInterrupting.
@Test
@SuppressWarnings("unchecked")
public void testHandleTimerIsNotInterrupting() {
final StartTimerEvent bean = new StartTimerEvent();
bean.getExecutionSet().getIsInterrupting().setValue(false);
tested.handle(bean, view);
verify(prim1).setFillAlpha(eq(0d));
verify(prim1).setStrokeAlpha(eq(1d));
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartTimerEvent in project kie-wb-common by kiegroup.
the class EventInterruptingViewHandlerTest method testHandleTimerIsInterrupting.
@Test
@SuppressWarnings("unchecked")
public void testHandleTimerIsInterrupting() {
final StartTimerEvent bean = new StartTimerEvent();
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.StartTimerEvent in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest method testUnmarshallStartTimerEvent.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallStartTimerEvent() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_STARTTIMEREVENT);
assertDiagram(diagram, 4);
assertEquals("StartTimerEvent", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> startTimerEventNode = diagram.getGraph().getNode("_49ADC988-B63D-4AEB-B811-67969F305FD0");
StartTimerEvent startTimerEvent = (StartTimerEvent) startTimerEventNode.getContent().getDefinition();
IsInterrupting isInterrupting = startTimerEvent.getExecutionSet().getIsInterrupting();
assertEquals(false, isInterrupting.getValue());
assertEquals("12/25/1983", startTimerEvent.getExecutionSet().getSlaDueDate().getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartTimerEvent in project kie-wb-common by kiegroup.
the class StartTimerEventTest method testUnmarshallSubprocessLevelEventFilledProperties.
@Test
@Override
public void testUnmarshallSubprocessLevelEventFilledProperties() throws Exception {
final String EVENT_NAME_MULTIPLE = "~`!@#$%^&*()_+=-{}|\\][:\";'?><,./ name";
final String EVENT_DOCUMENTATION_MULTIPLE = "Some documentation for this event\n\n~`!@#$%^&*()_+=-{}|\\][:\";'?><,./";
final String TIMER_VALUE_MULTIPLE = "R3/PT8M3S";
// "none" is a "not a cron" for engine and looks like ISO in GUI
final String TIMER_VALUE_LANGUAGE_MULTIPLE = "none";
// Should be uncommented after https://issues.jboss.org/browse/JBPM-7038 will be fixed
// final String timerDataOutputMultiple = "||hello:String||[dout]hello->processVar";
final String EVENT_NAME_SPECIFIC_DATE = "~`!@#$%^&*()_+=-{}|\\][:\";'?><,./ hello how are you?";
final String EVENT_DOCUMENTATION_SPECIFIC_DATE = "~`!@#$%^&*()_+=-{}|\\][:\";'?><,./\ndocumentaion";
final String TIMER_VALUE_SPECIFIC_DATE = "2018-03-16T13:50:59+01:00";
// Should be uncommented after https://issues.jboss.org/browse/JBPM-7038 will be fixed
// final String timerDataOutputSpecificDate = "||hello:String||[dout]hello->processVar";
final String EVENT_NAME_AFTER_DURATION = "\"non empty name\"";
final String EVENT_DOCUMENTATION_AFTER_DURATION = "Time is here: ~`!@#$%^&*()_+=-{}|\\][:\";'?><,./";
final String TIMER_VALUE_AFTER_DURATION = "PT1H15M";
// Should be uncommented after https://issues.jboss.org/browse/JBPM-7038 will be fixed
// final String timerDataOutputDuration = "||hello:String||[dout]hello->processVar";
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartTimerEvent filledTopMultiple = getStartNodeById(diagram, FILLED_SUBPROCESS_LEVEL_EVENT_MULTIPLE_ID);
assertGeneralSet(filledTopMultiple.getGeneral(), EVENT_NAME_MULTIPLE, EVENT_DOCUMENTATION_MULTIPLE);
assertTimerEventMultiple(filledTopMultiple.getExecutionSet(), TIMER_VALUE_MULTIPLE, TIMER_VALUE_LANGUAGE_MULTIPLE, INTERRUPTING, SLA_DUE_DATE);
// Know issue. Should be uncommented after https://issues.jboss.org/browse/JBPM-7038 will be fixed
// assertDataIOSet(filledTopMultiple.getDataIOSet(), timerDataOutputMultiple);
StartTimerEvent filledTopSpecificDate = getStartNodeById(diagram, FILLED_SUBPROCESS_LEVEL_EVENT_SPECIFIC_DATE_ID);
assertGeneralSet(filledTopSpecificDate.getGeneral(), EVENT_NAME_SPECIFIC_DATE, EVENT_DOCUMENTATION_SPECIFIC_DATE);
assertTimerEventSpecificDate(filledTopSpecificDate.getExecutionSet(), TIMER_VALUE_SPECIFIC_DATE, INTERRUPTING, SLA_DUE_DATE);
// Know issue. Should be uncommented after https://issues.jboss.org/browse/JBPM-7038 will be fixed
// assertDataIOSet(filledTopSpecificDate.getDataIOSet(), timerDataOutputSpecificDate);
StartTimerEvent filledTopAfterDuration = getStartNodeById(diagram, FILLED_SUBPROCESS_LEVEL_EVENT_AFTER_DURATION_ID);
assertGeneralSet(filledTopAfterDuration.getGeneral(), EVENT_NAME_AFTER_DURATION, EVENT_DOCUMENTATION_AFTER_DURATION);
assertTimerEventAfterDuration(filledTopAfterDuration.getExecutionSet(), TIMER_VALUE_AFTER_DURATION, INTERRUPTING, SLA_DUE_DATE);
// Know issue. Should be uncommented after https://issues.jboss.org/browse/JBPM-7038 will be fixed
// assertDataIOSet(filledTopSpecificDate.getDataIOSet(), timerDataOutputDuration);
}
Aggregations