Getting the value of a Form Outcome in a script

cancel
Showing results for 
Search instead for 
Did you mean: 
lsharman
Member II

Getting the value of a Form Outcome in a script

I'm building my process using Activiti Developer.  On one sequence flow condition off my exclusive gateway, I'd need a condition for: 

${ formoutcome == "a value" && (processvar1 == true OR processvar2 == true) }

To do this, I'm thinking that I need to write an Expression for the sequence flow.  How do I reference the value of a form outcome either in the Expression directly or using javascript in a task listener complete event to set a process variable that can then be used in the Expression?

Thanks

2 Replies
gdharley
Intermediate

Re: Getting the value of a Form Outcome in a script

You should be able to use the "Advanced" flow condition tab (see below):

With this option you can select form outcomes as well as variables as well as conditions.

Now, your specific expression is a little more complex because of the parenthesis. For this I would use a listener to perform the processvar OR logic and create a single variable to use in the above form.

By the way, the above is from version 1.6.1.

Greg

lsharman
Member II

Re: Getting the value of a Form Outcome in a script

Thanks for the response.  I'm using the Advanced tab throughout my process flow, but as you noted, it doesn't support the parenthesis.  I reworked my process flow to get around this issue.  I also just found your post from Jan 16,2017 on using form<formid>outcome to retrieve the value of a custom outcome.  For future knowledge, I'll try that in a sample flow.