use of org.kie.workbench.common.stunner.bpmn.definition.property.task.AbortParent in project kie-wb-common by kiegroup.
the class ReusableSubprocessConverterTest method testToFlowElementForAbortParent.
private void testToFlowElementForAbortParent(boolean independent, boolean abortParent, boolean expectedAbortParent) {
final ReusableSubprocess definition = new ReusableSubprocess();
definition.getExecutionSet().setIndependent(new Independent(independent));
definition.getExecutionSet().setAbortParent(new AbortParent(abortParent));
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);
assertEquals(expectedAbortParent, CustomElement.abortParent.of(propertyWriter.getFlowElement()).get());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.task.AbortParent 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);
}
Aggregations