assertThat(executionSet.getIndependent().getValue()).isEqualTo(independent); assertThat(executionSet.getIsAsync().getValue()).isEqualTo(isAsync); assertThat(executionSet.getWaitForCompletion().getValue()).isEqualTo(waitForCompletion);
@Override public boolean equals(Object o) { if (o instanceof ReusableSubprocessTaskExecutionSet) { ReusableSubprocessTaskExecutionSet other = (ReusableSubprocessTaskExecutionSet) o; return calledElement.equals(other.calledElement) && independent.equals(other.independent) && waitForCompletion.equals(other.waitForCompletion) && isAsync.equals(other.isAsync) && onEntryAction.equals(other.onEntryAction) && onExitAction.equals(other.onExitAction); } return false; } }
@Override public int hashCode() { return HashUtil.combineHashCodes(calledElement.hashCode(), independent.hashCode(), waitForCompletion.hashCode(), isAsync.hashCode(), onEntryAction.hashCode(), onExitAction.hashCode()); }
public ReusableSubprocessTaskExecutionSet() { this(new CalledElement(), new Independent(), new WaitForCompletion(), new IsAsync(), new OnEntryAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new OnExitAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", "")))); }
public CaseReusableSubprocessTaskExecutionSet() { this(new CalledElement(), new IsCase(true), new Independent(), new WaitForCompletion(), new IsAsync(), new OnEntryAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new OnExitAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", "")))); }
public ProcessReusableSubprocessTaskExecutionSet() { this(new CalledElement(), new IsCase(false), new Independent(), new WaitForCompletion(), new IsAsync(), new OnEntryAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new OnExitAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", "")))); }
assertTrue(subcaseExecutionSet.getIndependent().getValue()); assertTrue(subcaseExecutionSet.getIsAsync().getValue()); assertTrue(subcaseExecutionSet.getWaitForCompletion().getValue());
@Override public int hashCode() { return HashUtil.combineHashCodes(calledElement.hashCode(), isCase.hashCode(), independent.hashCode(), waitForCompletion.hashCode(), isAsync.hashCode(), onEntryAction.hashCode(), onExitAction.hashCode()); }
@Override public boolean equals(Object o) { if (o instanceof ProcessReusableSubprocessTaskExecutionSet) { ProcessReusableSubprocessTaskExecutionSet other = (ProcessReusableSubprocessTaskExecutionSet) o; return calledElement.equals(other.calledElement) && isCase.equals(other.isCase) && independent.equals(other.independent) && waitForCompletion.equals(other.waitForCompletion) && isAsync.equals(other.isAsync) && onEntryAction.equals(other.onEntryAction) && onExitAction.equals(other.onExitAction); } return false; }
subcaseExecutionSet.setIndependent(new Independent(true)); subcaseExecutionSet.setIsAsync(new IsAsync(true)); subcaseExecutionSet.setWaitForCompletion(new WaitForCompletion(true));
assertTrue(subprocessExecutionSet.getIndependent().getValue()); assertTrue(subprocessExecutionSet.getIsAsync().getValue()); assertTrue(subprocessExecutionSet.getWaitForCompletion().getValue());
@Override public int hashCode() { return HashUtil.combineHashCodes(calledElement.hashCode(), isCase.hashCode(), independent.hashCode(), waitForCompletion.hashCode(), isAsync.hashCode(), onEntryAction.hashCode(), onExitAction.hashCode()); }
@Override public boolean equals(Object o) { if (o instanceof CaseReusableSubprocessTaskExecutionSet) { CaseReusableSubprocessTaskExecutionSet other = (CaseReusableSubprocessTaskExecutionSet) o; return calledElement.equals(other.calledElement) && isCase.equals(other.isCase) && independent.equals(other.independent) && waitForCompletion.equals(other.waitForCompletion) && isAsync.equals(other.isAsync) && onEntryAction.equals(other.onEntryAction) && onExitAction.equals(other.onExitAction); } return false; } }
subprocessExecutionSet.setIndependent(new Independent(true)); subprocessExecutionSet.setIsAsync(new IsAsync(true)); subprocessExecutionSet.setWaitForCompletion(new WaitForCompletion(true));
public PropertyWriter toFlowElement(Node<View<T>, ?> n) { CallActivity activity = bpmn2.createCallActivity(); activity.setId(n.getUUID()); CallActivityPropertyWriter p = propertyWriterFactory.of(activity); T definition = n.getContent().getDefinition(); BPMNGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); BaseReusableSubprocessTaskExecutionSet executionSet = definition.getExecutionSet(); p.setOnEntryAction(executionSet.getOnEntryAction()); p.setOnExitAction(executionSet.getOnExitAction()); p.setCalledElement(executionSet.getCalledElement().getValue()); p.setAsync(executionSet.getIsAsync().getValue()); p.setIndependent(executionSet.getIndependent().getValue()); p.setWaitForCompletion(executionSet.getWaitForCompletion().getValue()); p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo()); p.setSimulationSet(definition.getSimulationSet()); p.setBounds(n.getContent().getBounds()); return p; } }
@SuppressWarnings("unchecked") public BpmnNode convert(CallActivity activity) { ActivityPropertyReader p = propertyReaderFactory.of(activity); Node<View<R>, Edge> node = createNode(activity, p); R definition = node.getContent().getDefinition(); definition.setGeneral(new BPMNGeneralSet( new Name(p.getName()), new Documentation(p.getDocumentation()) )); definition.setExecutionSet(createReusableSubprocessTaskExecutionSet( new CalledElement(activity.getCalledElement()), new Independent(p.isIndependent()), new WaitForCompletion(p.isWaitForCompletion()), new IsAsync(p.isAsync()), new OnEntryAction(p.getOnEntryAction()), new OnExitAction(p.getOnExitAction()), p )); definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo())); node.getContent().setBounds(p.getBounds()); definition.setSimulationSet(p.getSimulationSet()); definition.setDimensionsSet(p.getRectangleDimensionsSet()); definition.setFontSet(p.getFontSet()); definition.setBackgroundSet(p.getBackgroundSet()); return BpmnNode.of(node); }
executionSet.getIndependent().getValue()); assertEquals(true, executionSet.getWaitForCompletion().getValue());
@Test public void testUnmarshallReusableSubprocess() throws Exception { Diagram<Graph, Metadata> diagram = unmarshall(BPMN_REUSABLE_SUBPROCESS); ReusableSubprocess reusableSubprocess = findContent(diagram, ReusableSubprocess.class); assertNotNull(reusableSubprocess); assertNotNull(reusableSubprocess.getExecutionSet()); assertNotNull(reusableSubprocess.getExecutionSet().getCalledElement()); assertNotNull(reusableSubprocess.getGeneral()); BPMNGeneralSet generalSet = reusableSubprocess.getGeneral(); BaseReusableSubprocessTaskExecutionSet executionSet = reusableSubprocess.getExecutionSet(); assertNotNull(generalSet); assertNotNull(executionSet); assertEquals("my subprocess", generalSet.getName().getValue()); assertEquals("my-called-element", executionSet.getCalledElement().getValue()); assertEquals(false, executionSet.getIndependent().getValue()); assertEquals(true, executionSet.getWaitForCompletion().getValue()); String assignmentsInfo = reusableSubprocess.getDataIOSet().getAssignmentsinfo().getValue(); assertEquals("|input1:String,input2:Float||output1:String,output2:Float|[din]pv1->input1,[din]pv2->input2,[dout]output1->pv1,[dout]output2->pv2", assignmentsInfo); assertEquals("true", reusableSubprocess.getExecutionSet().getIsAsync().getValue().toString()); }