use of org.kie.workbench.common.stunner.core.diagram.Metadata in project kie-wb-common by kiegroup.
the class StartErrorEventTest method testUnmarshallTopLevelEventFilledProperties.
@Test
@Override
public void testUnmarshallTopLevelEventFilledProperties() throws Exception {
final String EVENT_NAME = "Filled Top-Level Error start event";
final String EVENT_DOCUMENTATION = "Some documentation\n~`!@#$%^&*()_+=-{}|\\][:\";'?><,./\n";
final String ERROR_REF = "Error1";
final String EVENT_DATA_OUTPUT = "||someVar:String||[dout]someVar->prVar";
Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_START_EVENT_FILE_PATH);
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartErrorEvent filledTop = getStartNodeById(diagram, FILLED_TOP_LEVEL_EVENT_ID, getStartEventType());
assertGeneralSet(filledTop.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
assertErrorEventExecutionSet(filledTop.getExecutionSet(), ERROR_REF, INTERRUPTING);
assertDataIOSet(filledTop.getDataIOSet(), EVENT_DATA_OUTPUT);
}
use of org.kie.workbench.common.stunner.core.diagram.Metadata in project kie-wb-common by kiegroup.
the class StartNoneEventTest method testUnmarshallTopLevelEventFilledProperties.
@Test
@Override
public void testUnmarshallTopLevelEventFilledProperties() throws Exception {
final String EVENT_NAME = "Hello none start event name ~`!@#$%^&*()_+=-{}|\\][:\";'?><,./";
final String EVENT_DOCUMENTATION = "~`!@#$%^&*()_+=-{}|\\][:\";'?><,./\nDocumentation";
Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_START_EVENT_FILE_PATH);
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartNoneEvent filledTop = getStartNodeById(diagram, FILLED_TOP_LEVEL_EVENT_ID, StartNoneEvent.class);
assertGeneralSet(filledTop.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
}
use of org.kie.workbench.common.stunner.core.diagram.Metadata in project kie-wb-common by kiegroup.
the class StartNoneEventTest method testUnmarshallSubprocessLevelEventEmptyProperties.
@Test
@Override
public void testUnmarshallSubprocessLevelEventEmptyProperties() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_START_EVENT_FILE_PATH);
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartNoneEvent emptySubprocess = getStartNodeById(diagram, EMPTY_SUBPROCESS_LEVEL_EVENT_ID, StartNoneEvent.class);
assertGeneralSet(emptySubprocess.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
}
use of org.kie.workbench.common.stunner.core.diagram.Metadata in project kie-wb-common by kiegroup.
the class StartSignalEventTest method testUnmarshallTopLevelEventFilledProperties.
@Test
@Override
public void testUnmarshallTopLevelEventFilledProperties() throws Exception {
final String EVENT_NAME = "Signal Start Event with Name";
final String EVENT_DOCUMENTATION = "Non empty\nDocumentation\n~`!@#$%^&*()_+=-{}|\\][:\";'?><,./";
final String SIGNAL_REF = "Signal1";
final String EVENT_DATA_OUTPUT = "||event:String||[dout]event->processVar";
Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_START_EVENT_FILE_PATH);
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartSignalEvent filledTop = getStartNodeById(diagram, FILLED_TOP_LEVEL_EVENT_ID, StartSignalEvent.class);
assertGeneralSet(filledTop.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
assertSignalEventExecutionSet(filledTop.getExecutionSet(), SIGNAL_REF, INTERRUPTING);
assertDataIOSet(filledTop.getDataIOSet(), EVENT_DATA_OUTPUT);
}
use of org.kie.workbench.common.stunner.core.diagram.Metadata 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 = unmarshall(marshaller, BPMN_START_EVENT_FILE_PATH);
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartTimerEvent filledTopMultiple = getStartNodeById(diagram, FILLED_SUBPROCESS_LEVEL_EVENT_MULTIPLE_ID, StartTimerEvent.class);
assertGeneralSet(filledTopMultiple.getGeneral(), EVENT_NAME_MULTIPLE, EVENT_DOCUMENTATION_MULTIPLE);
assertTimerEventMultiple(filledTopMultiple.getExecutionSet(), TIMER_VALUE_MULTIPLE, TIMER_VALUE_LANGUAGE_MULTIPLE, INTERRUPTING);
// 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, StartTimerEvent.class);
assertGeneralSet(filledTopSpecificDate.getGeneral(), EVENT_NAME_SPECIFIC_DATE, EVENT_DOCUMENTATION_SPECIFIC_DATE);
assertTimerEventSpecificDate(filledTopSpecificDate.getExecutionSet(), TIMER_VALUE_SPECIFIC_DATE, INTERRUPTING);
// 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, StartTimerEvent.class);
assertGeneralSet(filledTopAfterDuration.getGeneral(), EVENT_NAME_AFTER_DURATION, EVENT_DOCUMENTATION_AFTER_DURATION);
assertTimerEventAfterDuration(filledTopAfterDuration.getExecutionSet(), TIMER_VALUE_AFTER_DURATION, INTERRUPTING);
// Know issue. Should be uncommented after https://issues.jboss.org/browse/JBPM-7038 will be fixed
// assertDataIOSet(filledTopSpecificDate.getDataIOSet(), timerDataOutputDuration);
}
Aggregations