Search in sources :

Example 1 with MultipleInstanceExecutionMode

use of org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceExecutionMode in project kie-wb-common by kiegroup.

the class GenericServiceTaskExecutionSetTest method testEqualTrue.

@Test
public void testEqualTrue() {
    GenericServiceTaskExecutionSet a = new GenericServiceTaskExecutionSet();
    GenericServiceTaskExecutionSet b = new GenericServiceTaskExecutionSet();
    a.setGenericServiceTaskInfo(new GenericServiceTaskInfo());
    assertEquals(a, b);
    GenericServiceTaskExecutionSet c = new GenericServiceTaskExecutionSet(new GenericServiceTaskInfo(), new AssignmentsInfo(), new AdHocAutostart(), new IsAsync(), new IsMultipleInstance(false), new MultipleInstanceExecutionMode(false), new MultipleInstanceCollectionInput(), new MultipleInstanceDataInput(), new MultipleInstanceCollectionOutput(), new MultipleInstanceDataOutput(), new MultipleInstanceCompletionCondition(), new OnEntryAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new OnExitAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new SLADueDate(SLA_DUE_DATE_1));
    GenericServiceTaskExecutionSet d = new GenericServiceTaskExecutionSet(new GenericServiceTaskInfo(), new AssignmentsInfo(), new AdHocAutostart(), new IsAsync(), new IsMultipleInstance(false), new MultipleInstanceExecutionMode(false), new MultipleInstanceCollectionInput(), new MultipleInstanceDataInput(), new MultipleInstanceCollectionOutput(), new MultipleInstanceDataOutput(), new MultipleInstanceCompletionCondition(), new OnEntryAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new OnExitAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new SLADueDate(SLA_DUE_DATE_1));
    assertEquals(c, d);
}
Also used : AssignmentsInfo(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo) MultipleInstanceCollectionOutput(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceCollectionOutput) OnExitAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnExitAction) AdHocAutostart(org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocAutostart) OnEntryAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnEntryAction) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) MultipleInstanceCompletionCondition(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceCompletionCondition) IsMultipleInstance(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsMultipleInstance) MultipleInstanceCollectionInput(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceCollectionInput) MultipleInstanceExecutionMode(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceExecutionMode) MultipleInstanceDataInput(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceDataInput) IsAsync(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync) ScriptTypeListValue(org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTypeListValue) MultipleInstanceDataOutput(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceDataOutput) ScriptTypeValue(org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTypeValue) Test(org.junit.Test)

Example 2 with MultipleInstanceExecutionMode

use of org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceExecutionMode in project kie-wb-common by kiegroup.

the class TaskViewHandlerTest method prepareTest.

private void prepareTest(boolean multipleInstance, boolean sequential) {
    UserTask userTask = mock(UserTask.class);
    UserTaskExecutionSet executionSet = mock(UserTaskExecutionSet.class);
    IsMultipleInstance isMultipleInstance = new IsMultipleInstance(multipleInstance);
    MultipleInstanceExecutionMode executionMode = new MultipleInstanceExecutionMode(sequential);
    when(executionSet.getIsMultipleInstance()).thenReturn(isMultipleInstance);
    when(executionSet.getMultipleInstanceExecutionMode()).thenReturn(executionMode);
    when(userTask.getExecutionSet()).thenReturn(executionSet);
    viewHandler.handle(userTask, svgShapeView);
}
Also used : UserTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.UserTaskExecutionSet) UserTask(org.kie.workbench.common.stunner.bpmn.definition.UserTask) IsMultipleInstance(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsMultipleInstance) MultipleInstanceExecutionMode(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceExecutionMode)

Example 3 with MultipleInstanceExecutionMode

use of org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceExecutionMode 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)

Example 4 with MultipleInstanceExecutionMode

use of org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceExecutionMode in project kie-wb-common by kiegroup.

the class BaseTaskConverter method bpmnServiceTask.

BpmnNode bpmnServiceTask(org.eclipse.bpmn2.ServiceTask task) {
    Node<View<GenericServiceTask>, Edge> node = factoryManager.newNode(task.getId(), GenericServiceTask.class);
    GenericServiceTask definition = node.getContent().getDefinition();
    GenericServiceTaskPropertyReader p = propertyReaderFactory.of(task);
    if (p == null) {
        throw new NullPointerException(task.getClass().getCanonicalName());
    }
    definition.setGeneral(new TaskGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setExecutionSet(new GenericServiceTaskExecutionSet(new GenericServiceTaskInfo(p.getGenericServiceTask()), p.getAssignmentsInfo(), new AdHocAutostart(p.isAdHocAutostart()), new IsAsync(p.isAsync()), new IsMultipleInstance(p.isMultipleInstance()), new MultipleInstanceExecutionMode(p.isSequential()), new MultipleInstanceCollectionInput(p.getCollectionInput()), new MultipleInstanceDataInput(p.getDataInput()), new MultipleInstanceCollectionOutput(p.getCollectionOutput()), new MultipleInstanceDataOutput(p.getDataOutput()), new MultipleInstanceCompletionCondition(p.getCompletionCondition()), new OnEntryAction(p.getOnEntryAction()), new OnExitAction(p.getOnExitAction()), new SLADueDate(p.getSLADueDate())));
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getRectangleDimensionsSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    definition.setFontSet(p.getFontSet());
    definition.setSimulationSet(p.getSimulationSet());
    definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    return BpmnNode.of(node, p);
}
Also used : GenericServiceTaskInfo(org.kie.workbench.common.stunner.bpmn.definition.property.service.GenericServiceTaskInfo) GenericServiceTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.service.GenericServiceTaskExecutionSet) GenericServiceTask(org.kie.workbench.common.stunner.bpmn.definition.GenericServiceTask) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) MultipleInstanceCollectionOutput(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceCollectionOutput) TaskGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet) OnExitAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnExitAction) AdHocAutostart(org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocAutostart) OnEntryAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnEntryAction) View(org.kie.workbench.common.stunner.core.graph.content.view.View) DmnModelName(org.kie.workbench.common.stunner.bpmn.definition.property.task.DmnModelName) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) DecisionName(org.kie.workbench.common.stunner.bpmn.definition.property.task.DecisionName) TaskName(org.kie.workbench.common.stunner.bpmn.definition.property.task.TaskName) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) MultipleInstanceCompletionCondition(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceCompletionCondition) IsMultipleInstance(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsMultipleInstance) MultipleInstanceCollectionInput(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceCollectionInput) MultipleInstanceExecutionMode(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceExecutionMode) MultipleInstanceDataInput(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceDataInput) GenericServiceTaskPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.GenericServiceTaskPropertyReader) IsAsync(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync) Edge(org.kie.workbench.common.stunner.core.graph.Edge) MultipleInstanceDataOutput(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceDataOutput)

Example 5 with MultipleInstanceExecutionMode

use of org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceExecutionMode in project kie-wb-common by kiegroup.

the class HashCodeAndEqualityTest method testMultipleInstanceSubprocessEquals.

@Test
public void testMultipleInstanceSubprocessEquals() {
    final String MULTIPLE_INSTANCE_COLLECTION_INPUT = "multiple Instance collection input";
    final String MULTIPLE_INSTANCE_COLLECTION_OUTPUT = "multiple Instance collection output";
    final String MULTIPLE_INSTANCE_DATA_INPUT = "multiple Instance collection input";
    final String MULTIPLE_INSTANCE_DATA_OUTPUT = "multiple Instance collection output";
    final String MULTIPLE_INSTANCE_COMPLETION_CONDITION = "multiple Instance completion condition";
    final String OTHER_VALUE = "other value";
    final ScriptTypeListValue ON_ENTRY_ACTION = new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""));
    final ScriptTypeListValue ON_EXIT_ACTION = new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""));
    final Boolean IS_ASYNC = true;
    final MultipleInstanceSubprocessTaskExecutionSet A_EXECUTION_SET = new MultipleInstanceSubprocessTaskExecutionSet(new MultipleInstanceExecutionMode(), new MultipleInstanceCollectionInput(MULTIPLE_INSTANCE_COLLECTION_INPUT), new MultipleInstanceCollectionOutput(MULTIPLE_INSTANCE_COLLECTION_OUTPUT), new MultipleInstanceDataInput(MULTIPLE_INSTANCE_DATA_INPUT), new MultipleInstanceDataOutput(MULTIPLE_INSTANCE_DATA_OUTPUT), new MultipleInstanceCompletionCondition(MULTIPLE_INSTANCE_COMPLETION_CONDITION), new OnEntryAction(ON_ENTRY_ACTION), new OnExitAction(ON_EXIT_ACTION), new IsMultipleInstance(true), new IsAsync(IS_ASYNC), new SLADueDate());
    final MultipleInstanceSubprocessTaskExecutionSet B_EXECUTION_SET = new MultipleInstanceSubprocessTaskExecutionSet(new MultipleInstanceExecutionMode(), new MultipleInstanceCollectionInput(MULTIPLE_INSTANCE_COLLECTION_INPUT), new MultipleInstanceCollectionOutput(MULTIPLE_INSTANCE_COLLECTION_OUTPUT), new MultipleInstanceDataInput(MULTIPLE_INSTANCE_DATA_INPUT), new MultipleInstanceDataOutput(MULTIPLE_INSTANCE_DATA_OUTPUT), new MultipleInstanceCompletionCondition(MULTIPLE_INSTANCE_COMPLETION_CONDITION), new OnEntryAction(ON_ENTRY_ACTION), new OnExitAction(ON_EXIT_ACTION), new IsMultipleInstance(true), new IsAsync(IS_ASYNC), new SLADueDate());
    final MultipleInstanceSubprocessTaskExecutionSet C_EXECUTION_SET = new MultipleInstanceSubprocessTaskExecutionSet(new MultipleInstanceExecutionMode(), new MultipleInstanceCollectionInput(OTHER_VALUE), new MultipleInstanceCollectionOutput(MULTIPLE_INSTANCE_COLLECTION_OUTPUT), new MultipleInstanceDataInput(MULTIPLE_INSTANCE_DATA_INPUT), new MultipleInstanceDataOutput(MULTIPLE_INSTANCE_DATA_OUTPUT), new MultipleInstanceCompletionCondition(MULTIPLE_INSTANCE_COMPLETION_CONDITION), new OnEntryAction(ON_ENTRY_ACTION), new OnExitAction(ON_EXIT_ACTION), new IsMultipleInstance(true), new IsAsync(IS_ASYNC), new SLADueDate());
    final MultipleInstanceSubprocessTaskExecutionSet D_EXECUTION_SET = new MultipleInstanceSubprocessTaskExecutionSet(new MultipleInstanceExecutionMode(), new MultipleInstanceCollectionInput(MULTIPLE_INSTANCE_COLLECTION_INPUT), new MultipleInstanceCollectionOutput(OTHER_VALUE), new MultipleInstanceDataInput(MULTIPLE_INSTANCE_DATA_INPUT), new MultipleInstanceDataOutput(MULTIPLE_INSTANCE_DATA_OUTPUT), new MultipleInstanceCompletionCondition(MULTIPLE_INSTANCE_COMPLETION_CONDITION), new OnEntryAction(ON_ENTRY_ACTION), new OnExitAction(ON_EXIT_ACTION), new IsMultipleInstance(true), new IsAsync(IS_ASYNC), new SLADueDate());
    final MultipleInstanceSubprocessTaskExecutionSet E_EXECUTION_SET = new MultipleInstanceSubprocessTaskExecutionSet(new MultipleInstanceExecutionMode(), new MultipleInstanceCollectionInput(MULTIPLE_INSTANCE_COLLECTION_INPUT), new MultipleInstanceCollectionOutput(MULTIPLE_INSTANCE_COLLECTION_OUTPUT), new MultipleInstanceDataInput(OTHER_VALUE), new MultipleInstanceDataOutput(MULTIPLE_INSTANCE_DATA_OUTPUT), new MultipleInstanceCompletionCondition(MULTIPLE_INSTANCE_COMPLETION_CONDITION), new OnEntryAction(ON_ENTRY_ACTION), new OnExitAction(ON_EXIT_ACTION), new IsMultipleInstance(true), new IsAsync(IS_ASYNC), new SLADueDate());
    final MultipleInstanceSubprocessTaskExecutionSet F_EXECUTION_SET = new MultipleInstanceSubprocessTaskExecutionSet(new MultipleInstanceExecutionMode(), new MultipleInstanceCollectionInput(MULTIPLE_INSTANCE_COLLECTION_INPUT), new MultipleInstanceCollectionOutput(MULTIPLE_INSTANCE_COLLECTION_OUTPUT), new MultipleInstanceDataInput(MULTIPLE_INSTANCE_DATA_INPUT), new MultipleInstanceDataOutput(OTHER_VALUE), new MultipleInstanceCompletionCondition(MULTIPLE_INSTANCE_COMPLETION_CONDITION), new OnEntryAction(ON_ENTRY_ACTION), new OnExitAction(ON_EXIT_ACTION), new IsMultipleInstance(true), new IsAsync(IS_ASYNC), new SLADueDate());
    final MultipleInstanceSubprocessTaskExecutionSet G_EXECUTION_SET = new MultipleInstanceSubprocessTaskExecutionSet(new MultipleInstanceExecutionMode(), new MultipleInstanceCollectionInput(MULTIPLE_INSTANCE_COLLECTION_INPUT), new MultipleInstanceCollectionOutput(MULTIPLE_INSTANCE_COLLECTION_OUTPUT), new MultipleInstanceDataInput(MULTIPLE_INSTANCE_DATA_INPUT), new MultipleInstanceDataOutput(MULTIPLE_INSTANCE_DATA_OUTPUT), new MultipleInstanceCompletionCondition(OTHER_VALUE), new OnEntryAction(ON_ENTRY_ACTION), new OnExitAction(ON_EXIT_ACTION), new IsMultipleInstance(true), new IsAsync(IS_ASYNC), new SLADueDate());
    final MultipleInstanceSubprocessTaskExecutionSet H_EXECUTION_SET = new MultipleInstanceSubprocessTaskExecutionSet(new MultipleInstanceExecutionMode(), new MultipleInstanceCollectionInput(MULTIPLE_INSTANCE_COLLECTION_INPUT), new MultipleInstanceCollectionOutput(MULTIPLE_INSTANCE_COLLECTION_OUTPUT), new MultipleInstanceDataInput(MULTIPLE_INSTANCE_DATA_INPUT), new MultipleInstanceDataOutput(MULTIPLE_INSTANCE_DATA_OUTPUT), new MultipleInstanceCompletionCondition(MULTIPLE_INSTANCE_COMPLETION_CONDITION), new OnEntryAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("other language", ""))), new OnExitAction(ON_EXIT_ACTION), new IsMultipleInstance(true), new IsAsync(IS_ASYNC), new SLADueDate());
    final MultipleInstanceSubprocessTaskExecutionSet I_EXECUTION_SET = new MultipleInstanceSubprocessTaskExecutionSet(new MultipleInstanceExecutionMode(), new MultipleInstanceCollectionInput(MULTIPLE_INSTANCE_COLLECTION_INPUT), new MultipleInstanceCollectionOutput(MULTIPLE_INSTANCE_COLLECTION_OUTPUT), new MultipleInstanceDataInput(MULTIPLE_INSTANCE_DATA_INPUT), new MultipleInstanceDataOutput(MULTIPLE_INSTANCE_DATA_OUTPUT), new MultipleInstanceCompletionCondition(MULTIPLE_INSTANCE_COMPLETION_CONDITION), new OnEntryAction(ON_ENTRY_ACTION), new OnExitAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("other language", ""))), new IsMultipleInstance(true), new IsAsync(IS_ASYNC), new SLADueDate());
    final MultipleInstanceSubprocessTaskExecutionSet J_EXECUTION_SET = new MultipleInstanceSubprocessTaskExecutionSet(new MultipleInstanceExecutionMode(), new MultipleInstanceCollectionInput(MULTIPLE_INSTANCE_COLLECTION_INPUT), new MultipleInstanceCollectionOutput(MULTIPLE_INSTANCE_COLLECTION_OUTPUT), new MultipleInstanceDataInput(MULTIPLE_INSTANCE_DATA_INPUT), new MultipleInstanceDataOutput(MULTIPLE_INSTANCE_DATA_OUTPUT), new MultipleInstanceCompletionCondition(MULTIPLE_INSTANCE_COMPLETION_CONDITION), new OnEntryAction(ON_ENTRY_ACTION), new OnExitAction(ON_EXIT_ACTION), new IsMultipleInstance(true), new IsAsync(false), new SLADueDate());
    final String PROCESS_DATA = "some value";
    final ProcessData A_PROCESS_DATA = new ProcessData(new ProcessVariables(PROCESS_DATA));
    final ProcessData B_PROCESS_DATA = new ProcessData(new ProcessVariables("Other value"));
    MultipleInstanceSubprocess a = new MultipleInstanceSubprocess();
    a.setExecutionSet(A_EXECUTION_SET);
    a.setProcessData(A_PROCESS_DATA);
    MultipleInstanceSubprocess b = new MultipleInstanceSubprocess();
    b.setExecutionSet(B_EXECUTION_SET);
    b.setProcessData(A_PROCESS_DATA);
    MultipleInstanceSubprocess c = new MultipleInstanceSubprocess();
    c.setExecutionSet(C_EXECUTION_SET);
    MultipleInstanceSubprocess d = new MultipleInstanceSubprocess();
    d.setExecutionSet(D_EXECUTION_SET);
    MultipleInstanceSubprocess e = new MultipleInstanceSubprocess();
    e.setExecutionSet(E_EXECUTION_SET);
    MultipleInstanceSubprocess f = new MultipleInstanceSubprocess();
    f.setExecutionSet(F_EXECUTION_SET);
    MultipleInstanceSubprocess g = new MultipleInstanceSubprocess();
    g.setExecutionSet(G_EXECUTION_SET);
    MultipleInstanceSubprocess h = new MultipleInstanceSubprocess();
    h.setExecutionSet(H_EXECUTION_SET);
    MultipleInstanceSubprocess i = new MultipleInstanceSubprocess();
    i.setExecutionSet(I_EXECUTION_SET);
    MultipleInstanceSubprocess j = new MultipleInstanceSubprocess();
    j.setExecutionSet(J_EXECUTION_SET);
    assertEquals(a, a);
    assertEquals(a, b);
    assertNotEquals(a, c);
    assertNotEquals(a, d);
    assertNotEquals(a, e);
    assertNotEquals(a, f);
    assertNotEquals(a, g);
    assertNotEquals(a, h);
    assertNotEquals(a, i);
    assertNotEquals(a, j);
    assertNotEquals(a, 19);
    assertNotEquals(a, null);
    a.setExecutionSet(null);
    assertNotEquals(a, b);
    assertNotEquals(b, a);
    a.setExecutionSet(A_EXECUTION_SET);
    assertEquals(a, b);
    a.setProcessData(null);
    assertNotEquals(a, b);
    assertNotEquals(b, a);
    a.setExecutionSet(A_EXECUTION_SET);
    a.setProcessData(A_PROCESS_DATA);
    assertEquals(a, b);
    a.setProcessData(B_PROCESS_DATA);
    assertNotEquals(a, b);
    assertNotEquals(b, a);
    MultipleInstanceSubprocess k = new MultipleInstanceSubprocess();
    assertNotEquals(a, k);
}
Also used : MultipleInstanceCollectionOutput(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceCollectionOutput) OnExitAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnExitAction) OnEntryAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnEntryAction) MultipleInstanceSubprocessTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceSubprocessTaskExecutionSet) ProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData) ProcessVariables(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) MultipleInstanceCompletionCondition(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceCompletionCondition) IsMultipleInstance(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsMultipleInstance) MultipleInstanceCollectionInput(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceCollectionInput) MultipleInstanceExecutionMode(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceExecutionMode) MultipleInstanceDataInput(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceDataInput) IsAsync(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync) ScriptTypeListValue(org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTypeListValue) ScriptTypeValue(org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTypeValue) MultipleInstanceDataOutput(org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceDataOutput) Test(org.junit.Test)

Aggregations

IsMultipleInstance (org.kie.workbench.common.stunner.bpmn.definition.property.task.IsMultipleInstance)13 MultipleInstanceExecutionMode (org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceExecutionMode)13 SLADueDate (org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate)10 IsAsync (org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync)10 MultipleInstanceCollectionInput (org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceCollectionInput)10 MultipleInstanceCollectionOutput (org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceCollectionOutput)10 MultipleInstanceCompletionCondition (org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceCompletionCondition)10 MultipleInstanceDataInput (org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceDataInput)10 MultipleInstanceDataOutput (org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceDataOutput)10 OnEntryAction (org.kie.workbench.common.stunner.bpmn.definition.property.task.OnEntryAction)9 OnExitAction (org.kie.workbench.common.stunner.bpmn.definition.property.task.OnExitAction)9 AdHocAutostart (org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocAutostart)8 ScriptTypeListValue (org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTypeListValue)7 ScriptTypeValue (org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTypeValue)7 Test (org.junit.Test)6 AssignmentsInfo (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)6 AdvancedData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData)4 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)3 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)3 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)3