cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Nice to know? Workflow task returns true or false

henk_stobbe
DynaMight Leader
DynaMight Leader

Hello,

 

When a workflow task returns Boolean true (or false), 

{
"result": true
}

to run the next task if to you need to use:

 

henk_stobbe_0-1748335407136.png

 

Who can confirm (-;

 

KR Henk

 

 

5 REPLIES 5

haris
Dynatrace Mentor
Dynatrace Mentor

Hi Henk,

That would work, but we always recommend square brackets: {{result("run_javascript_1")["result"] == false}}

Best, Haris

Edit:

It should be `True` or `False` (in capital letters), as these are valid names for Python booleans. 

One could also use a "short form", that is:

{{ result("run_javascript_1")["result"] }} 

 

It should be `True` or `False` (in capital letters), as these are valid names for Python booleans. 

Sorry for nitpicking 🙈

One could also use a "short form", that is:

{{ result("run_javascript_1")["result"] }}

 

Your AutomationEngine ally!

Hello Michal,

In this case, the combination of TS and Python needs a little nitpicking (-;

So  above will work if the result of the task returns True or False,  but JS uses true and false. So you need to convert the return first? Or is this done automatic....

 

Thanks Henk

Hi Henk,

If a boolean value needs to be converted, we do that out of the box, so you don't need to worry about that. 

michal_zawislak_0-1748351089269.png

Hope this clarifies things a bit 🙂 

 

Your AutomationEngine ally!

henk_stobbe
DynaMight Leader
DynaMight Leader

Hi Haris,

Thanks for the comment!

KR Henk

Featured Posts