public EventSubprocessExecutionSet() { this(new IsAsync()); }
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(isAsync.hashCode()); }
@Override public int hashCode() { return HashUtil.combineHashCodes(onEntryAction.hashCode(), onExitAction.hashCode(), isAsync.hashCode()); }
public ScriptTaskExecutionSet() { this(new Script(new ScriptTypeValue("java", "")), new IsAsync()); }
assertFalse(subprocessExecutionSet.getIsCase().getValue()); assertTrue(subprocessExecutionSet.getIndependent().getValue()); assertTrue(subprocessExecutionSet.getIsAsync().getValue()); assertTrue(subprocessExecutionSet.getWaitForCompletion().getValue());
@Override public int hashCode() { return HashUtil.combineHashCodes(calledElement.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; }
@Test public void testScriptTaskExecutionSetEqualsAndHashCode() { TestCaseBuilder.newTestCase() .addTrueCase(new ScriptTaskExecutionSet(), new ScriptTaskExecutionSet()) .addTrueCase(new ScriptTaskExecutionSet(new Script(), new IsAsync()), new ScriptTaskExecutionSet(new Script(), new IsAsync())) .test(); }
assertTrue(subcaseExecutionSet.getIsCase().getValue()); 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 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; } }
public EmbeddedSubprocessExecutionSet() { this(new OnEntryAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new OnExitAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new IsAsync()); }
private PropertyWriter scriptTask(Node<View<ScriptTask>, ?> n) { org.eclipse.bpmn2.ScriptTask task = bpmn2.createScriptTask(); task.setId(n.getUUID()); ScriptTask definition = n.getContent().getDefinition(); ScriptTaskPropertyWriter p = propertyWriterFactory.of(task); TaskGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); ScriptTaskExecutionSet executionSet = definition.getExecutionSet(); p.setScript(executionSet.getScript().getValue()); p.setAsync(executionSet.getIsAsync().getValue()); p.setSimulationSet(definition.getSimulationSet()); p.setBounds(n.getContent().getBounds()); return p; }
@Override public int hashCode() { return HashUtil.combineHashCodes(calledElement.hashCode(), isCase.hashCode(), independent.hashCode(), waitForCompletion.hashCode(), isAsync.hashCode(), onEntryAction.hashCode(), onExitAction.hashCode()); }
public ServiceTaskExecutionSet() { this(new TaskName("Service Task"), new IsAsync(), new AdHocAutostart(), new OnEntryAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))), new OnExitAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", "")))); }
private SubProcessPropertyWriter convertEventSubprocessNode(Node<View<EventSubprocess>, ?> n) { SubProcess process = bpmn2.createSubProcess(); process.setId(n.getUUID()); SubProcessPropertyWriter p = propertyWriterFactory.of(process); EventSubprocess definition = n.getContent().getDefinition(); process.setTriggeredByEvent(true); BPMNGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); ProcessData processData = definition.getProcessData(); p.setProcessVariables(processData.getProcessVariables()); EventSubprocessExecutionSet executionSet = definition.getExecutionSet(); p.setAsync(executionSet.getIsAsync().getValue()); p.setSimulationSet(definition.getSimulationSet()); p.setBounds(n.getContent().getBounds()); return p; }
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", "")))); }
protected void assertServiceTaskExecutionSet(ServiceTaskExecutionSet executionSet, String onEntryActionScriptValue, String onEntryActionScriptLanguage, String onExitActionScriptValue, String onExitActionScriptLanguage, boolean isAsync, boolean adHocAutostart) { assertNotNull(executionSet); assertNotNull(executionSet.getOnEntryAction()); assertNotNull(executionSet.getOnExitAction()); assertNotNull(executionSet.getIsAsync()); assertNotNull(executionSet.getAdHocAutostart()); assertNotNull(executionSet.getOnEntryAction().getValue()); assertNotNull(executionSet.getOnExitAction().getValue()); List<ScriptTypeValue> onEntryScriptTypeValues = executionSet.getOnEntryAction().getValue().getValues(); List<ScriptTypeValue> onExitScriptTypeValues = executionSet.getOnExitAction().getValue().getValues(); assertNotNull(onEntryScriptTypeValues); assertNotNull(onExitScriptTypeValues); assertNotNull(onEntryScriptTypeValues.get(0)); assertNotNull(onExitScriptTypeValues.get(0)); assertEquals(onEntryActionScriptValue, onEntryScriptTypeValues.get(0).getScript()); assertEquals(onEntryActionScriptLanguage, onEntryScriptTypeValues.get(0).getLanguage()); assertEquals(onExitActionScriptValue, onExitScriptTypeValues.get(0).getScript()); assertEquals(onExitActionScriptLanguage, onExitScriptTypeValues.get(0).getLanguage()); assertEquals(isAsync, executionSet.getIsAsync().getValue()); assertEquals(adHocAutostart, executionSet.getAdHocAutostart().getValue()); }