cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Error Message of the Day

Cosmo
1-Newbie

Error Message of the Day


Hi All....I'm working on a workflow and having some trouble with an annoying conditional.
The Process Manager is not showing me anything related to the conditional....all that I see is that the Conditional has been "Disabled"....but nothing after this is executed. This is where the workflow stops.
The only error message I see in the method server log is......"The client did something wrong."
I must admit that this put a smile on my face and gave me a chuckle. I know that it means something else....but I almost wish that this was PTC's way of pointing out that I'm an idiot...wait a minute...maybe THIS IS what they ACTUALLY mean and they just want me to THINK that it means something else.
In 10.0, I expect to see a message in the Method Server log file that states "Error Found"....with a hyperlink to a youtube video of the guy slamming his computer and throwing it off his desk.
In all seriousness, I cannot for the life of me figure out why the following syntax cannot be evaluated. Why is it getting stuck on this conditional?

//NOTE: EP_Track is a java.lang.String variable in the Workflow that has a value of "ORDER_TRACK" so it should take the else path....yes sendFastTrack and sendOrderTrack are my Routing Events.
if (EP_Track.compareTo("FAST_TRACK")==1){ result="sendFastTrack";}else{ result="sendOrderTrack";}
Mike -
9 REPLIES 9
AL_ANDERSON
5-Regular Member
(To:Cosmo)

Sometimes if the strings in the Routing Events have a trailing space or a
misspelling or mis-capitalization causing the results to fail to evaluate
properly.

Are you sure that the actual strings used exactly match, including case
and spacing,

sendFastTrack
sendOrderTrack

?

The code will compile, even with the error in spelling/spacing for the
routing event strings, but it won't run right.

Al Anderson






Michael Kramer <kramerm@airborn.com>
07/07/2011 11:57 AM
Please respond to
Michael Kramer <kramerm@airborn.com>


To
-
cc

Subject
[solutions] - Error Message of the Day




Caterpillar: Confidential Green Retain Until: 08/06/2011



Hi All....I'm working on a workflow and having some trouble with an
annoying conditional.

The Process Manager is not showing me anything related to the
conditional....all that I see is that the Conditional has been
"Disabled"....but nothing after this is executed. This is where the
workflow stops.

The only error message I see in the method server log is......"The client
did something wrong."

I must admit that this put a smile on my face and gave me a chuckle. I
know that it means something else....but I almost wish that this was PTC's
way of pointing out that I'm an idiot...wait a minute...maybe THIS IS what
they ACTUALLY mean and they just want me to THINK that it means something
else.

In 10.0, I expect to see a message in the Method Server log file that
states "Error Found"....with a hyperlink to a youtube video of the guy
slamming his computer and throwing it off his desk.

In all seriousness, I cannot for the life of me figure out why the
following syntax cannot be evaluated. Why is it getting stuck on this
conditional?

//NOTE: EP_Track is a java.lang.String variable in the Workflow that has a
value of "ORDER_TRACK" so it should take the else path....yes
sendFastTrack and sendOrderTrack are my Routing Events.

if (EP_Track.compareTo("FAST_TRACK")==1){
result="sendFastTrack";
}
else{
result="sendOrderTrack";
}

Mike Kramer
-

Site Links: View post online View mailing list online Send new post
via email Unsubscribe from this mailing list Manage your subscription
Use of this email content is governed by the terms of service at:
Cosmo
1-Newbie
(To:Cosmo)






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 -

hmmm .. .first thought this is april 1st ... but obviously not

maybe I completely misunderstand the question, but if not java for dummies or the like may help 😉

if (EP_Track.equals("FAST_TRACK")){

compare will do a *sort* comparison telling which string is smaller or bigger regarding your collating sequence.

hth, martin

Has anyone out there implemented ModAuthSSPI for the Windchill environment with good success? We have recently tried it here, and while it did successfully achieve the automatic authentication, it also seemed to introduce a problem with Pro/E file uploading and checkin at our remote sites. I know that doesn't make a lot of sense, but the best we can speculate is that the slower network performance at the remote sites causes some sort of time out in the authentication...?

Thanks, John


AL_ANDERSON
5-Regular Member
(To:Cosmo)

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
-

Cosmo
1-Newbie
(To:Cosmo)


Thanks for the vote of confidence Martin....I took a java class last semester because a wise guy on the exploder told me that buying Java for Dummies would solve all my Windchill problems....it hasn't.
For the record, I did try the equal comparison first. When I had this issue, I changed it to compareTo just to see if the results were different. Oddly enough, both of these commands are in my java book and both would work. Technically, compareTo does not just compare the lengths. If the lengths of the strings are the same, then the individual characters are compared. Even though "Mark" and "Mary" are the same length, "Mark" is less than "Mary" because "k" comes before "y" in the alphabet. However, this is not an issue in my case because the value of my variable IS "FAST_TRACK" which is what I'm comparing it to......so whether I use equal or compareTo, the result should be exactly the same.
I know what you mean about April 1st.....I feel like it's April 1st every time I receive my maintenance bill for software that I have to partially develop to get it working right.
I think I know what the issue is....it is NOT the conditional.....but rather an activity that is executed after the conditional. This activity never gets executed because it has a Start Transition with code in it that is not working correctly. The process manager is not helpful in this case because it does not seem to recognize that the workflow is past the conditional but not actually executing the Activity yet. Maybe an enhancement request to the Process Manager: When there is a problem with the Start Transition of an activity.....indicate it somehow in the graphical portion of the Process Manager....or perhaps, highlight/bold the arrow path itself to let me know that it is trying to route in that direction and that it is past the conditional.



Mike -
MikeLockwood
22-Sapphire I
(To:Cosmo)

Aha!

I didn't notice reading this before, but you say below "she" when referring to Windchill. Now a lot more is clear...

Michael,

Sorry you and Windchill are having a spat, maybe this will help. Try
using



if (EP_Track.equals("FAST_TRACK")) result="sendFastTrack";

else result="sendOrderTrack";



instead. I've used this syntax many times to do exactly this function.
It returns TRUE or FALSE.;

Mike


cadjett
1-Newbie
(To:Cosmo)

maybe compare ignoring case:

(() 0(;
}


or equals ignorecase

if (args[i].equalsIgnoreCase("From:")­ ) {
stuff.doThis();
} else {
System.err.println("Fool!");
}

or startswith:

if (args[i].toLowerCase().startsWith(­ "fast" ))

Another idea. Sounds like a complexity check. I have seen that the results are in SIMPLE & COMPLEX & not FAST... OR FULL...
Just an idea. Maybe println the actual string responses & see what its spewing......

L Jett

Announcements

Top Tags