use of org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTypeListValue in project kie-wb-common by kiegroup.
the class GenericServiceTaskExecutionSetTest method testHashCode.
@Test
public void testHashCode() {
GenericServiceTaskExecutionSet a = new GenericServiceTaskExecutionSet();
GenericServiceTaskExecutionSet b = new GenericServiceTaskExecutionSet();
assertEquals(a.hashCode(), b.hashCode());
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.hashCode(), d.hashCode());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTypeListValue in project kie-wb-common by kiegroup.
the class GenericServiceTaskExecutionSetTest method testEquals.
@Test
public void testEquals() {
GenericServiceTaskExecutionSet a = new GenericServiceTaskExecutionSet();
GenericServiceTaskExecutionSet b = new GenericServiceTaskExecutionSet();
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);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTypeListValue in project kie-wb-common by kiegroup.
the class GenericServiceTaskExecutionSetTest method testGetSlaDueDate.
@Test
public void testGetSlaDueDate() {
GenericServiceTaskExecutionSet a = 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(SLA_DUE_DATE_1, a.getSlaDueDate().getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTypeListValue in project kie-wb-common by kiegroup.
the class Scripts method setOnEntryAction.
public static void setOnEntryAction(FlowElement flowElement, OnEntryAction onEntryAction) {
ScriptTypeListValue value = onEntryAction.getValue();
for (ScriptTypeValue scriptTypeValue : value.getValues()) {
String scriptText = scriptTypeValue.getScript();
if (scriptText == null || scriptText.isEmpty()) {
continue;
}
OnEntryScriptType script = droolsFactory.createOnEntryScriptType();
script.setScript(asCData(scriptTypeValue.getScript()));
String scriptLanguage = Scripts.scriptLanguageToUri(scriptTypeValue.getLanguage());
script.setScriptFormat(scriptLanguage);
addExtensionValue(flowElement, DOCUMENT_ROOT__ON_ENTRY_SCRIPT, script);
}
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTypeListValue in project kie-wb-common by kiegroup.
the class ScriptTypeListFieldEditorPresenterTest method testOnChange.
@Test
public void testOnChange() {
ScriptTypeListValue oldValue = mock(ScriptTypeListValue.class);
ScriptTypeValue oldScriptTypeValue = mock(ScriptTypeValue.class);
ScriptTypeValue newScriptTypeValue = mock(ScriptTypeValue.class);
editor.setValue(oldValue);
editor.addChangeHandler(changeHandler);
editor.onValueChange(oldScriptTypeValue, newScriptTypeValue);
changeHandler.onValueChange(oldValue, new ScriptTypeListValue().addValue(newScriptTypeValue));
}
Aggregations