Notifications
Clear all

[Solved] Validation, order of execution?

0
Topic starter

Have a workflow where Property Operations runs a Regex function based on the content of a specific property when an object reaches a specific state. Obviously, the property content must not be Null when the function is executed. If it is, the system will generate a relatively complex error message that common users cannot decode. I would like to use Validation to create a more straight forward error message in the local language to guide users when this situation is about to occur. I have tried to trigger Validation when the object leaves the previous state using Trigger type "Object left state", and I have tried to trigger Validation in the new state using "Object entered state". In both cases the validation does not seem to be executed before Property Operations attempts to run and creates the complex error message. It seems like Property Operations is executed before Validation. This prevents us from using Validation in this case.

For now I have solved it with a Precondition directly in the workflow state. This will create a simpler error message but still not something that users can easily understand.
Is there a way to ensure that validation is run before Property Operations in a change of workflow state scenario?

2 Answers
0

Hi Karl,

Would it work for you to use a search filter for the trigger source in the Property Operation module?

With the search filter, you can eliminate all objects that have an empty value in the specified property. The Validation rule will execute immediately afterwards, so users will receive an error message in time, preventing them from changing the state:

When an object enters the state and the specified property is not empty, all trigger source conditions are met, and the Property Operation rule can execute.

If the property is empty, Property Operation rule won’t run, the Validation rule will catch the issue, and user will receive a custom error message.

I hope this solution works for you. If you need further help or a screenshot of the configuration, please let me know.

Best regards,

Nika

0
Topic starter

Sounds like a great idea. Thank you.