Error setting workflow variables

Confluence User - 10 Jan, 2020
I am creating a process that has the below design.



In the Listener tool I am doing something like this in code:

if(statusReached) {
wm.processVariable(processId,"STATUS_REACHED_VARIABLE","YES");
} else {
wm.processVariable(processId,"STATUS_REACHED_VARIABLE","NO");
}


In the end of this code, im doing a call to this joget api method:

web/json/workflow/variable/list/(*:processId)

This call returns something like this:

{"processId":"6851_ListenerStatusApp_process1","variable":[{"STATUS_REACHED_VARIABLE":"NO"},{"status":""}]}

Nevertheless, the route always enters in the otherwise situation.


If I have the design this way (With an activity between listener and route) everything goes normally and the route goes where it should go.





Does anyone have any idea what the problem might be?

And by the way, it is possible to know, being in Listener, what is the id of the route activity?

Thanks.

process;workflow

2


12 Jan, 2020
confluenceUser
confluenceUser

Hi

Do have a look at Setting Workflow Variable Value in Process Tool Bean Shell

You can use Hash Variable#WorkflowProcessHashVariable to retrieve the process information.

13 Jan, 2020
confluenceUser
confluenceUser

I think this does not answer my question and my problem. I'll have the same problem. If I use a hash variable, for example #variable.VARIABLE_NAME#,
in an activity after the tool works correctly. Doing so on the route does not work.


Also, under transitional conditions you can't do something like this
#variable.VARIABLE_NAME# === 'YES'
RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print