Break down your workflow into very small elements to isolate the problem.
Something like
Start - > Conditional - > Activity 1 - > End
or -> Activity 2 - > End
In the conditional, use something really simple like...
if (true) {
result="Activity1";
} else {
result="Activity2";
}
Verify that you have two arrows coming out of the conditional are marked
as either sendFastTrack or sendOrderTrack so that the conditional actually
fires one based on the result.
Run that.
If it does not go to Activity1 every time, then you are doing something
fundamentally wrong beyond just the code in the conditional expression.
Something about the arrows or the next activity, or the transition set up
on the arrows, or something other than the code.
But if it works, then go to something like ...
String EP_Track = "FAST_TRACK";
if (EP_Track.compareTo("FAST_TRACK")==1) {
result="Activity1";
} else {
result="Activity2";
}
If that does not work, then clearly the compareTo method is your problem.
I always use equals here without any problem (even though I would think
they should have the same result every time, I have only ever used
.equals() in places like this in a workflow), such as ...
String EP_Track = "FAST_TRACK";
if (EP_Track.equals("FAST_TRACK")) {
result="Activity1";
} else {
result="Activity2";
}
Try that.
My point is that you should reduce the workflow to the minimum number of
variable elements to isolate only what is wrong and then just change that
until it works.
Al Anderson
Michael Kramer <kramerm@airborn.com>
07/07/2011 12:49 PM
Please respond to
Michael Kramer <kramerm@airborn.com>
To
kramerm@airborn.com, -
cc
Subject
[solutions] - RE: Error Message of the Day
Caterpillar: Confidential Green Retain Until: 08/06/2011
I'm not sure it will help....but here's the pretty picture from the
Process Manager.....it shows that my workflow started off strong....lots
of nice "Executed" expressions where I'm extracting different attributes
from my PBO and populating variables in my workflow...very nice. Then I
try to use this information to make a logical decision and I become
disabled.
I've received several pieces of advice on this....one was definitely
correct....."0" in java means the strings match. But regardless of
whether it's right or wrong....I always appear to be wrong 🙂 It still
doesn't fix the issue.
There are no extra spaces or anything in the conditional routing events. I
also copied and pasted these into the conditional syntax.
The check syntax returns fine...no errors.
The only other possibility I can think of is that Windchill just doesn't
like me....I mean sure....we get along....but I really wanted to be more
than friends. Not if she's going to treat me like this!!! I hate to
admit it but I think we need a break from each other....we've clearly been
spending way too much time together. It seems like she turns down every
request I make lately. Sure....we used to have a nice workflow
going....but I make one small change to her routine and KABOOM...now she
won't return my calls.
Mike Kramer
-