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

  • No labels

5 Comments

  1. 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

  2. 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) ) 

    Unknown macro: {  }

          <---is return false;

  3. 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

    1. 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

      1. Ah, very good. Thank you, Sam