Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Why does condition always evaluate to false?

Management Console is 8.0.0.1 on Windows 7.
Agent is 7.1.3 on Windows 7.

Trying to execute a conditional step - the condition always evaluates as false - why?

A sample condition is 1 = 1 , however, no matter what I put in for the condition, it always comes out false.

When sending the same test from a 7.1.3 Management Console running on Windows XP to the same 7.1.3 Agent running on Windows 7, the condition is evaluated correctly.

Do I have to use the 8.0.0.1 Agent with the 8.0.0.1 Management Console?
Should I be using the Perl legacy engine on the 8.0.0.1 Management Console rather than the Java version?  Can someone explain the difference between the Java and the Perl versions?  Why would I care to choose one versus the other?  What was used with 7.1.3 Build Forge?

Thanks,
John Bobinyec

0 votes



4 answers

Permanent link
Here's an excerpt from the console file:

COND CRRBF9999I: Condition '1 = 1' evaluated to 'false'.
MJC	CRRBF1594I: Step Test Condition (bcaaee760c681000acd1d7d4afd0e8d1) started.

Thanks,
John Bobinyec



0 votes


Permanent link
By the way, it happens with the 8.0.0.1 agent as well.

Thanks,
John Bobinyec

0 votes


Permanent link
The short answer is you really want to use "eq" instead of "=" unless you include it in one of the functions.  You could also say "true(1==1)"

Here is the appropriate section of the docs that shows all the other conditional functions

It's a subset of the javascript conditionals.

0 votes

Comments

Why did I not have to do that with the 7.1.3 Management Console?  It evaluated conditions in the native script language of the agent machine.  So a Windows XP agent would be able to interpret 1 = 1 as true because that condition is recognized by the command interpreter. 

Is there a way to set up the 8.0.0.1 Management Console to act like the 7.1.3 version?  Otherwise I have to rework every condition in every project.  You see, we're moving everything from the 7.1.3 version of Build Forge to the 8.0.0.1 version because of an upgrade from Windows XP to Windows 7.

Thanks,
John Bobinyec


Permanent link
 You can use the perl engine, but that doesn't get you any benefit of the 8.0 release.  The perl engine will also likely be removed from a future release in the 8.x line.  The "1=1" behavior from the perl engine was actually a defect in the way the conditions were assessed.  The true(1==1) syntax was documented back in the 7.1.x line as the correct way.  

My suggestion would be to craft an API program to go through all your steps.  For the conditional steps, have it parse the condition.  If there is the use of a single =, either change it to eq, or wrap the conditional in a true().  

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 2,357

Question asked: May 05 '14, 11:56 a.m.

Question was seen: 7,483 times

Last updated: May 05 '14, 7:14 p.m.

Confirmation Cancel Confirm