Search in sources :

Example 1 with AbortParent

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());
}
Also used : BaseReusableSubprocess(org.kie.workbench.common.stunner.bpmn.definition.BaseReusableSubprocess) Independent(org.kie.workbench.common.stunner.bpmn.definition.property.task.Independent) NodeImpl(org.kie.workbench.common.stunner.core.graph.impl.NodeImpl) ReusableSubprocess(org.kie.workbench.common.stunner.bpmn.definition.ReusableSubprocess) BaseReusableSubprocess(org.kie.workbench.common.stunner.bpmn.definition.BaseReusableSubprocess) AbortParent(org.kie.workbench.common.stunner.bpmn.definition.property.task.AbortParent) ViewImpl(org.kie.workbench.common.stunner.core.graph.content.view.ViewImpl) View(org.kie.workbench.common.stunner.core.graph.content.view.View) CallActivityPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CallActivityPropertyWriter) PropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter)

Example 2 with AbortParent

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);
}
Also used : BaseReusableSubprocess(org.kie.workbench.common.stunner.bpmn.definition.BaseReusableSubprocess) MultipleInstanceCollectionOutput(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceCollectionOutput) CallActivity(org.eclipse.bpmn2.CallActivity) AdHocAutostart(org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocAutostart) WaitForCompletion(org.kie.workbench.common.stunner.bpmn.definition.property.task.WaitForCompletion) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) FontSet(org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet) AbortParent(org.kie.workbench.common.stunner.bpmn.definition.property.task.AbortParent) ViewImpl(org.kie.workbench.common.stunner.core.graph.content.view.ViewImpl) MultipleInstanceExecutionMode(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceExecutionMode) IsCase(org.kie.workbench.common.stunner.bpmn.definition.property.subProcess.IsCase) ReusableSubprocessTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.ReusableSubprocessTaskExecutionSet) MultipleInstanceDataOutput(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceDataOutput) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) RectangleDimensionsSet(org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.RectangleDimensionsSet) Independent(org.kie.workbench.common.stunner.bpmn.definition.property.task.Independent) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) MultipleInstanceCompletionCondition(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceCompletionCondition) BackgroundSet(org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet) ReusableSubprocess(org.kie.workbench.common.stunner.bpmn.definition.ReusableSubprocess) BaseReusableSubprocess(org.kie.workbench.common.stunner.bpmn.definition.BaseReusableSubprocess) IsMultipleInstance(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsMultipleInstance) MultipleInstanceCollectionInput(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceCollectionInput) MultipleInstanceDataInput(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceDataInput) IsAsync(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync) CalledElement(org.kie.workbench.common.stunner.bpmn.definition.property.task.CalledElement) Before(org.junit.Before)

Aggregations

BaseReusableSubprocess (org.kie.workbench.common.stunner.bpmn.definition.BaseReusableSubprocess)2 ReusableSubprocess (org.kie.workbench.common.stunner.bpmn.definition.ReusableSubprocess)2 AbortParent (org.kie.workbench.common.stunner.bpmn.definition.property.task.AbortParent)2 Independent (org.kie.workbench.common.stunner.bpmn.definition.property.task.Independent)2 ViewImpl (org.kie.workbench.common.stunner.core.graph.content.view.ViewImpl)2 CallActivity (org.eclipse.bpmn2.CallActivity)1 Before (org.junit.Before)1 CallActivityPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CallActivityPropertyWriter)1 PropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriter)1 BackgroundSet (org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet)1 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)1 RectangleDimensionsSet (org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.RectangleDimensionsSet)1 FontSet (org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet)1 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)1 SLADueDate (org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate)1 IsCase (org.kie.workbench.common.stunner.bpmn.definition.property.subProcess.IsCase)1 AdHocAutostart (org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocAutostart)1 CalledElement (org.kie.workbench.common.stunner.bpmn.definition.property.task.CalledElement)1 IsAsync (org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync)1 IsMultipleInstance (org.kie.workbench.common.stunner.bpmn.definition.property.task.IsMultipleInstance)1