I’m trying to create a workflow that removes all entitlements from an identity if the lifecycle state changes from ACTIVE to PREINACTIVE.
To begin, I’m using the Identity Attributes Changed trigger and have added the following filter: $.changes[?(@.attribute == "cloudLifecycleState" && @.oldValue == "active" && @.newValue == "preinactive")]
To test the workflow, I’ve used the Send Email action for the next step and tested it with the following input:
Since there is no change to the lifecycle state, the test shouldn’t sent out an email.
However, the test is passing and sends an email as the next step.
Just enable the workflow and try the workflow. This will work as expected. Test Workflow feature behaves in the manner you gave as it is used to test functionality.
If you need to test with this “Test Workflow” feature, use some compare operators or verifyDataType. After this, you may link “send email” action. This might help you probably.
As @GOKUL_ANANTH_M mentioned it will behave properly.
But this is what is happening if you are doing a test workflow; When we do a test workflow the actual execution starts after the Trigger. So that particular 1st step is kind of always skipped.
At least this is what i have observed. So what i usually do is test the functionality and then for trigger testing enable the workflow. And modify the LCS on the test user and then validate the workflow execution!