I want to use the ISC Form action and calculate the deadline for it dynamically within the workflow. The workflow is triggered for example when the end date for the identity changes.
From my current understanding the variable should have a value like: 24h .
Unfortunately I couldn’t find the documentation that explains the expected format, so this is my current assumption. In addition, I am not even able to test a workflow that uses this functionality ( ISC: Workflows Form - can't use variable as deadline )
How I want the value calculated:
calculate the difference, in hours, between when the workflow is triggered and the identities end date. Let’s call this value A.
calculate the minimum between A and 336 (2 weeks in hours), let’s call it B
append the letter ‘h’ to B, and obtain Y
Seems pretty simple for a programming task, right? How can I implement these steps only with the workflow functionality?
Based on the documentation, it seems to accept a numeric value which is in hours, but the documentation is vague around it:
Can you try this without appending the ‘h’ at the end?
If your trigger is identity attribute changed, I don’t think you can get the time of trigger in the input JSON trigger. There’s another way I can think of to achieve this but it requires writing a cloud rule:
Create a new identity attribute (this sucks, I know) and call it, say, ‘timeAfterTermination’.
Attach a transform to it, a Rule transform.
In the transform, invoke an identity attribute rule which computes date difference between the new end date and now.
Return this difference in number of hours. Before returning, just check if the difference goes over 720, and if so just keep it maxed out at 720.
Your transform can have a default like “NA” for active users, and return this number when there is a value available. Use the new value as a validation in your workflow.
Let me know if this far-fetched method works for you if you haven’t found another alternative yet.
Thanks @sushantkulkarni for taking the time to come up with an answer. I thought also that going with an additional identity attribute would be the only option, if you don’t want to create an external HTTP API endpoint that receives the dates and delivers the answer.
Create a new identity attribute (this sucks, I know)
There should be a better way (but there isn’t).
SailPoint wants to have a minimal number of attributes, but many solutions imply having technical attributes for workarounds. Maybe the workflow engine could call a transform in the future. But even then, I’m not sure what you can subtract two dates and obtain the number of hours. Quickly glancing at Date Math | SailPoint Developer Community I don’t see this possibility.
In the end this is a moot point, as what the SailPoint UI offers is not supported by the workflow engine: