private ScriptTypeValue copy(ScriptTypeValue source, boolean createIfSourceNull) { if (source == null) { return createIfSourceNull ? new ScriptTypeValue() : null; } ScriptTypeValue copy = new ScriptTypeValue(); copy.setScript(source.getScript()); copy.setLanguage(source.getLanguage()); return copy; } }
protected void onChange() { ScriptTypeValue oldValue = value; value = copy(oldValue, true); value.setScript(view.getScript()); value.setLanguage(view.getLanguage()); notifyChange(oldValue, value); }
completionCondition.setScript("autocomplete"); completionCondition.setLanguage("drools"); stage.getExecutionSet().setAdHocCompletionCondition(new AdHocCompletionCondition(completionCondition)); entryAction.setScript("StageTest"); entryAction.setLanguage("java"); stage.getExecutionSet().setOnEntryAction(new OnEntryAction(new ScriptTypeListValue(Collections.singletonList(entryAction)))); exitAction.setScript("StageTest"); exitAction.setLanguage("java"); stage.getExecutionSet().setOnExitAction(new OnExitAction(new ScriptTypeListValue(Collections.singletonList(exitAction))));
entryAction.setScript(("SubprocessTest")); entryAction.setLanguage("java"); subprocessExecutionSet.setOnEntryAction(new OnEntryAction(new ScriptTypeListValue(Collections.singletonList(entryAction)))); exitAction.setScript("SubprocessTest"); exitAction.setLanguage("java"); subprocessExecutionSet.setOnExitAction(new OnExitAction(new ScriptTypeListValue(Collections.singletonList(exitAction))));
entryAction.setScript(("SubcaseTest")); entryAction.setLanguage("java"); subcaseExecutionSet.setOnEntryAction(new OnEntryAction(new ScriptTypeListValue(Collections.singletonList(entryAction)))); exitAction.setScript("SubcaseTest"); exitAction.setLanguage("java"); subcaseExecutionSet.setOnExitAction(new OnExitAction(new ScriptTypeListValue(Collections.singletonList(exitAction))));
entryAction.setScript(("TaskTest")); entryAction.setLanguage("java"); executionSet.setOnEntryAction(new OnEntryAction(new ScriptTypeListValue(Collections.singletonList(entryAction)))); exitAction.setScript("TaskTest"); exitAction.setLanguage("java"); executionSet.setOnExitAction(new OnExitAction(new ScriptTypeListValue(Collections.singletonList(exitAction))));