use of org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate in project kie-wb-common by kiegroup.
the class ProcessMessageRefProviderTest method mockIntermediateMessageEventCatchingNode.
private Element mockIntermediateMessageEventCatchingNode(String messageRefValue) {
IntermediateMessageEventCatching event = new IntermediateMessageEventCatching();
event.setExecutionSet(new CancellingMessageEventExecutionSet(new CancelActivity(true), new SLADueDate(), new MessageRef(messageRefValue, "")));
return mockNode(event);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate in project kie-wb-common by kiegroup.
the class DefinitionsConverterTest method JBPM_7526_shouldSetExporter.
@Test
public void JBPM_7526_shouldSetExporter() {
GraphNodeStoreImpl nodeStore = new GraphNodeStoreImpl();
NodeImpl x = new NodeImpl("x");
BPMNDiagramImpl diag = new BPMNDiagramImpl();
diag.setDiagramSet(new DiagramSet(new Name("x"), new Documentation("doc"), new Id("x"), new Package("org.jbpm"), new ProcessType(), new Version("1.0"), new AdHoc(false), new ProcessInstanceDescription("descr"), new Imports(), new Executable(true), new SLADueDate("")));
x.setContent(new ViewImpl<>(diag, Bounds.create()));
nodeStore.add(x);
ConverterFactory f = new ConverterFactory(new DefinitionsBuildingContext(new GraphImpl("x", nodeStore)), new PropertyWriterFactory());
DefinitionsConverter definitionsConverter = new DefinitionsConverter(f, new PropertyWriterFactory());
Definitions definitions = definitionsConverter.toDefinitions();
assertThat(definitions.getExporter()).isNotBlank();
assertThat(definitions.getExporterVersion()).isNotBlank();
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate in project kie-wb-common by kiegroup.
the class ReusableSubprocessConverterTest method testToFlowElement.
@Test
public void testToFlowElement() {
final ReusableSubprocess definition = new ReusableSubprocess();
definition.getExecutionSet().setSlaDueDate(new SLADueDate(SLA_DUE_DATE));
definition.getExecutionSet().setIsAsync(new IsAsync(Boolean.TRUE));
final View<BaseReusableSubprocess> view = new ViewImpl<>(definition, Bounds.create());
final Node<View<BaseReusableSubprocess>, ?> node = new NodeImpl<>(java.util.UUID.randomUUID().toString());
node.setContent(view);
final PropertyWriter propertyWriter = tested.toFlowElement(node);
assertTrue(CallActivityPropertyWriter.class.isInstance(propertyWriter));
assertTrue(CustomElement.async.of(propertyWriter.getFlowElement()).get());
assertTrue(CallActivityPropertyWriter.class.isInstance(propertyWriter));
assertTrue(CustomElement.slaDueDate.of(propertyWriter.getFlowElement()).get().contains(SLA_DUE_DATE));
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate in project kie-wb-common by kiegroup.
the class ReusableSubprocessConverterTest method setUp.
@Before
public void setUp() {
when(propertyWriterFactory.of(any(CallActivity.class))).thenReturn(propertyWriter);
DataIOSet ioSet = mock(DataIOSet.class);
when(ioSet.getAssignmentsinfo()).thenReturn(ASSIGNMENTS_INFO);
final ReusableSubprocess definition = new ReusableSubprocess(new BPMNGeneralSet(NAME, DOCUMENTATION), new ReusableSubprocessTaskExecutionSet(new CalledElement(CALLED_ELEMENT), new IsCase(IS_CASE), new Independent(INDEPENDENT), new AbortParent(ABORT_PARENT), new WaitForCompletion(WAIT_FOR_COMPLETION), new IsAsync(IS_ASYNC), new AdHocAutostart(IS_ADHOC_AUTOSTART), new IsMultipleInstance(IS_MULTIPLE_INSTANCE), new MultipleInstanceExecutionMode(SEQUENTIAL), new MultipleInstanceCollectionInput(COLLECTION_INPUT), new MultipleInstanceDataInput(DATA_INPUT), new MultipleInstanceCollectionOutput(COLLECTION_OUTPUT), new MultipleInstanceDataOutput(DATA_OUTPUT), new MultipleInstanceCompletionCondition(COMPLETION_CONDITION), ON_ENTRY_ACTION, ON_EXIT_ACTION, new SLADueDate(SLA_DUE_DATE)), ioSet, new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), SIMULATION_SET, new AdvancedData());
final View<BaseReusableSubprocess> view = new ViewImpl<>(definition, BOUNDS);
node = new NodeImpl<>(UUID);
node.setContent(view);
converter = new ReusableSubprocessConverter(propertyWriterFactory);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate in project kie-wb-common by kiegroup.
the class SubProcessConverterTest method setBaseSubprocessExecutionSetValues.
private static void setBaseSubprocessExecutionSetValues(BaseSubprocessTaskExecutionSet executionSet) {
executionSet.setIsAsync(new IsAsync(Boolean.TRUE));
executionSet.setSlaDueDate(new SLADueDate(SLA_DUE_DATE));
}
Aggregations