How to define workflow conditions? (e.g. activity.state/activity.result)

sougatachakrabo
Kilo Contributor
  • It is quite confusing to me that what is the difference between activity.result == "*something*" and activity.state == "*something*".
  • Where the conditions are defined in servicenow?
  • If I want to define a new condition how can I do it?

Please help me to find out the solution.

6 REPLIES 6

Did you find a way to add multiple conditions to the run script activity, or did you have to use an if or switch activity?


larstange
Mega Sage

Hi



Its easy - just right click the run script action (it takes a few seconds for the menu to appear) and select Add condition


find_real_file.png find_real_file.png


In yout script you then also need to set activity.result = "New Thingy" to trigger that output condition



You can add as many conditions as you need