Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
I have a route that will go to an activity if one of three possible variable answers are chosen from a form - otherwise it will go elsewhere.
Do I handle this in the condition expression with an OR statement?
Such as:
changeType=='new hire' OR changeType=='term' OR changeType=='raise'
(not a programmer, by the way, so answer with that in mind)
Thank you,
Greg
5 Comments
Sam Choo
Hi Greg,
The expressions accept JavaScript Comparison and Logical Operators. You'll be writing the expression out as:
changeType=='new hire' || changeType=='term' || changeType=='raise'
You can find lots of reference to this online, but here's one to get you started:
http://bit.ly/rDr43N
Rgds,
Sam
Miklos Daru
But if you would like to using in beanshell string concatenate, no using ==.
The best if you use this:
String test2 = "nothing"
String test = "something";
if( test.trim().equals(test2) )
<---is return false;
Gregory Wilker
Thank you, Sam. That is very helpful.
Miklos, your answer is beyond my programming knowledge (I do not consider myself a programmer) and I appreciate your efforts.
I only wonder if there is an advantage to learning more about your solution instead of the JavaScript Logical Operator?
Sincerely,
Greg
Sam Choo
Hi Greg,
It's sufficient to use the expressions at the workflow design stage to branch based on rules. That's what we usually use as this gives the workflow diagram reader a clear representation of the process and the branching conditions.
Miklos was referring to using the Beanshell plugin which is based on Java language that you can use later on to solve more complex, non workflow design related problems.
Regards,
Sam
Gregory Wilker
Ah, very good. Thank you, Sam