diff options
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
|
