Automations
All questions related to Workflow Automation, AutomationEngine, and EdgeConnect, as well as integrations with various tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Workflow if statement

Nathanieltat
Participant

Hi All, 

I have tried to understand the conditions parts on the workflows but i'm struggling. Im wanting to use the same workflow rather than making two. 

Im wanting if it is the 250 MS alert to go down the p2 tree and not the p3 but if its the 100 MS alert to go down the p3 tree and not the p2 tree.

I'm not sure how to do it with the conditions. 

Nathanieltat_0-1781700768797.png

 

5 REPLIES 5

Julius_Loman
DynaMight Legend
DynaMight Legend

Conditions are set on the nodes. So you need to set appropriate conditions on the request_to_snow_p2 and request_to_snow_p3 . See more here. Probably you need something like for the p3 condition:

{{ event()["event.name"] in ["WRAC 01 100MS Timedrift Alert", "WRAC 02 100MS Timedrift Alert"] }}

You are setting trigger on Davis event (not Davis problems), just be sure you are alerting on the right information.

Dynatrace Ambassador | Alanata a.s., Slovakia, Dynatrace Master Partner

Nice thank you, i will try this. 

Good spot i changed it to match the other workflow i have so it shows the following.

Nathanieltat_0-1781771611097.png

Hi Julius,

Coming back to this as it does sort of work but they're wanting it so that when the alert triggers the problem trigger it goes to the request to snow functions and if it contains 250 MS Timedrift go down the p2 tree if its 100 MS Timedrift it goes down the p3 tree as the alert won't always contains  the name of the machine if they are wanting multiple machines set up for the alert. 
The contains function doesn't seem to work in the conditions does it have to be operators only? 

@Nathanieltat can you elaborate little bit more on that? I don't have your context and environment and do not fully understand the issue.

Dynatrace Ambassador | Alanata a.s., Slovakia, Dynatrace Master Partner

I would probably use a JavaScript task that would do the evaluation you are atlking about. And - that task then finishes by preparing a task result with the decision on whether it is p2 or p3. After that JavaScript task you can then have your p2 and p3 with a condition on the outcome of your JavaScript task. 

Contact our DevRel team through devrel@dynatrace.com

Featured Posts