diff options
| author | abranson <andrew.branson@cern.ch> | 2011-08-04 00:42:34 +0200 |
|---|---|---|
| committer | abranson <andrew.branson@cern.ch> | 2011-08-04 00:42:34 +0200 |
| commit | 0ec8481c10cd8277d84c7c1a785483a0a739e5a0 (patch) | |
| tree | 5f6e5d9ae75193e67e6f3b3dfa488960c5cde1d5 /source/com/c2kernel/lifecycle/instance/ParserWF.java | |
| parent | 036cbdba66f804743c4c838ed598d6972c4b3e17 (diff) | |
More code cleanup:
Refactored Entity Proxy Subscription to handle generics better
Rewrote RemoteMap to use TreeMap instead of the internal array for
order. It now sorts its keys by number if they parse, else as strings.
Removed a no-longer-in-progress outcome form class
Diffstat (limited to 'source/com/c2kernel/lifecycle/instance/ParserWF.java')
| -rw-r--r-- | source/com/c2kernel/lifecycle/instance/ParserWF.java | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/source/com/c2kernel/lifecycle/instance/ParserWF.java b/source/com/c2kernel/lifecycle/instance/ParserWF.java index 35fed90..02a0c6d 100644 --- a/source/com/c2kernel/lifecycle/instance/ParserWF.java +++ b/source/com/c2kernel/lifecycle/instance/ParserWF.java @@ -35,7 +35,6 @@ public class ParserWF nexts = new Vector<String[]>(1, 1);
i = 0;
file = xmlfile;
- int c;
while (i < file.length() - 5)
{
if (file.substring(i, i + 5).equals("<STEP"))
@@ -52,12 +51,12 @@ public class ParserWF {
for (int k = j + 1; k < nexts.size(); k++)
{
- if (((String[]) nexts.elementAt(j))[0].equals(((String[]) nexts.elementAt(k))[0]))
+ if (nexts.elementAt(j)[0].equals(nexts.elementAt(k)[0]))
{
int tmp = act.newSplitChild("And", new Point(0, 0)).getID();
- ((WfVertex) act.search(((String[]) nexts.elementAt(k))[0])).addNext(act.search(tmp));
- ((Split) act.search(tmp)).addNext((WfVertex) act.search(((String[]) nexts.elementAt(k))[1]));
- ((Split) act.search(tmp)).addNext((WfVertex) act.search(((String[]) nexts.elementAt(j))[1]));
+ ((WfVertex) act.search(nexts.elementAt(k)[0])).addNext(act.search(tmp));
+ ((Split) act.search(tmp)).addNext((WfVertex) act.search(nexts.elementAt(k)[1]));
+ ((Split) act.search(tmp)).addNext((WfVertex) act.search(nexts.elementAt(j)[1]));
nexts.removeElementAt(k--);
flag = true;
}
@@ -72,12 +71,12 @@ public class ParserWF {
for (int k = j + 1; k < nexts.size(); k++)
{
- if (((String[]) nexts.elementAt(j))[1].equals(((String[]) nexts.elementAt(k))[1]))
+ if (nexts.elementAt(j)[1].equals(nexts.elementAt(k)[1]))
{
int tmp = act.newJoinChild(new Point(0, 0)).getID();
- ((WfVertex) act.search(((String[]) nexts.elementAt(j))[0])).addNext(act.search(tmp));
- ((WfVertex) act.search(((String[]) nexts.elementAt(k))[0])).addNext(act.search(tmp));
- ((Join) act.search(tmp)).addNext(((String[]) nexts.elementAt(j))[1]);
+ ((WfVertex) act.search(nexts.elementAt(j)[0])).addNext(act.search(tmp));
+ ((WfVertex) act.search(nexts.elementAt(k)[0])).addNext(act.search(tmp));
+ ((Join) act.search(tmp)).addNext(nexts.elementAt(j)[1]);
nexts.removeElementAt(k--);
flag = true;
}
@@ -92,8 +91,8 @@ public class ParserWF {
Logger.msg(
7,
- "try to add next " + ((String[]) nexts.elementAt(j))[1] + " to " + ((String[]) nexts.elementAt(j))[0]);
- ((Activity) act.search(((String[]) nexts.elementAt(j))[0])).addNext(((String[]) nexts.elementAt(j))[1]);
+ "try to add next " + nexts.elementAt(j)[1] + " to " + nexts.elementAt(j)[0]);
+ ((Activity) act.search(nexts.elementAt(j)[0])).addNext(nexts.elementAt(j)[1]);
}
if (act instanceof Workflow)
try
|
