diff options
Diffstat (limited to 'source/com/c2kernel/lifecycle/instance/WfVertex.java')
| -rw-r--r--[-rwxr-xr-x] | source/com/c2kernel/lifecycle/instance/WfVertex.java | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/source/com/c2kernel/lifecycle/instance/WfVertex.java b/source/com/c2kernel/lifecycle/instance/WfVertex.java index 7285916..f6cec33 100755..100644 --- a/source/com/c2kernel/lifecycle/instance/WfVertex.java +++ b/source/com/c2kernel/lifecycle/instance/WfVertex.java @@ -27,7 +27,7 @@ public abstract class WfVertex extends GraphableVertex /**sets the activity available to be executed on start of Workflow or composite activity (when it is the first one of the
* (sub)process*/
public abstract void runfirst(AgentPath agent) throws ScriptingEngineException;
-
+
/**
* @see java.lang.Object#Object()
*/
@@ -88,7 +88,7 @@ public abstract class WfVertex extends GraphableVertex * @param vertex
*/
public abstract Next addNext(WfVertex vertex);
-
+
protected Object evaluateScript(String scriptName, String scriptVersion) throws ScriptingEngineException
{
@@ -98,12 +98,11 @@ public abstract class WfVertex extends GraphableVertex Script script = getScript(scriptName, scriptVersion);
KeyValuePair[] k = getProperties().getKeyValuePairs();
- HashMap requiredInput = script.getAllInputParams();
- for (int i = 0; i < k.length; i++)
- {
- if (requiredInput.containsKey(k[i].getKey()))
+ HashMap<?, ?> requiredInput = script.getAllInputParams();
+ for (KeyValuePair element : k) {
+ if (requiredInput.containsKey(element.getKey()))
{
- String value = k[i].getStringValue();
+ String value = element.getStringValue();
Object inputParam = value;
if (value.startsWith("viewpoint//"))
@@ -126,11 +125,11 @@ public abstract class WfVertex extends GraphableVertex inputParam = null;
}
}
- Logger.msg(5, "Split.evaluateScript() - Setting param " + k[i].getKey() + " to " + inputParam.toString());
- script.setInputParamValue(k[i].getKey(), inputParam);
+ Logger.msg(5, "Split.evaluateScript() - Setting param " + element.getKey() + " to " + inputParam.toString());
+ script.setInputParamValue(element.getKey(), inputParam);
}
}
-
+
if (requiredInput.containsKey("item")) {
script.setInputParamValue("item", Gateway.getProxyManager().getProxy(entity));
}
@@ -150,8 +149,8 @@ public abstract class WfVertex extends GraphableVertex throw new ScriptingEngineException();
}
}
-
- private Script getScript(String name, String version) throws ScriptingEngineException
+
+ private static Script getScript(String name, String version) throws ScriptingEngineException
{
Script script;
try
@@ -171,8 +170,8 @@ public abstract class WfVertex extends GraphableVertex return script;
}
-
-
+
+
public Workflow getWf()
{
return ((CompositeActivity)getParent()).getWf();
|
