SOLVED Workflow Extract Process Variable Value

OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
inanaz
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: Wed Sep 11, 2019 9:58 am

SOLVED Workflow Extract Process Variable Value

Post by inanaz » Wed Sep 11, 2019 10:00 am

Hi Guys,

I'm trying to create a workflow that assigns tasks to users and I'm stuck at a part with the "Select" field (dropdown) in the form element. Basically the user who is assigned the original task will then pass the task off to someone else using the Select field (dropdown). How can I extract the value that the user selects from that dropdown and pass it into a decision node?

In the workflow backend, it's showing the value of the variable as this:

Code: Select all

{label=, name=value, width=150px, height=25px, readonly=false, type=simple, value=alex, data=, optionsData=, options=[{label=okmAdmin, value=okmAdmin, selected=false}, {label=reviewer, value=reviewer, selected=false}, {label=alex, value=alex, selected=true}], validators=[], table=, optionsQuery=, suggestion=, class=}
I want to get the value of "value" (which is "alex" in this case).

Any advice would be amazing! Thank you guys!

jllort
Moderator
Moderator
Posts: 10868
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: SOLVED Workflow Extract Process Variable Value

Post by jllort » Sat Sep 14, 2019 6:29 pm

You might cast ( for example if the form field was Input type )

Code: Select all

Input input (Input) executionContext.getContextInstance().getVariable("the field name");
String value = input.getValue();

Post Reply