We have created a workflow that checks for identity attribute changes to users and when an attribute changes it filters on the persons role code and life cycle state. If either of those have changed and the user has a specific access profile, it has to send us an email informing us of the users change in status. This is an odd edge case but it’s basically there as a reminder to certify their need for a company phone if their role or life cycle state changes.
The workflow is working for the most part, but the variabled defining the user and their ID in the email are not working. I beleive it has something to do with not passing the context into the loop, but I have run into a wall on fixing it. I attempted to get the identity in the loop and to pass the context into the loop, but nothing I’ve tried has worked so far.
What is the basic fix for this? I feel like I’m so close, but I’m missing something obvious. How do I get the context to properly execute the variables in the email template?
"Loop Through Access Items": {
"actionId": "sp:loop:iterator",
"attributes": {
"input.$": "$.getAccess.accessItems",
"loopInput.$": "$.getAccess",
"start": "Check for Cellphone Owner",
"steps": {
"Check for Cellphone Owner": {
"actionId": "sp:compare-strings",
"choiceList": [
{
"comparator": "StringEquals",
"nextStep": "Send Certification Email",
"variableA.$": "$.loop.loopInput.name",
"variableB": "Cellphone Owner"
}
],
"defaultStep": "End Loop Step",
"displayName": "Check if Access Profile is Cellphone Owner",
"type": "choice"
},
"End Loop Step": {
"actionId": "sp:operator-success",
"displayName": "End Loop",
"type": "success"
},
"Send Certification Email": {
"actionId": "sp:send-email",
"attributes": {
"body": "<p><!--ScriptorStartFragment--></p>\n<div class=\"scriptor-paragraph\"><div></div>\n<div class=\"scriptor-paragraph\"> A change to the following user’s Lifecycle State or Primary Role Code has been detected.</div>\n<div class=\"scriptor-paragraph\"> The user’s cell phone possession should now be reviewed and certified.</div>\n<div class=\"scriptor-paragraph\"></div></div>\n<p>Name: {{displayName}} </p>\n<p>Employee ID: {{employeeId}}</p>\n<p> </p>",
"context": {
"displayName.$": "$.getIdentity.attributes.displayName",
"employeeId.$": "$.getIdentity.attributes.identificationNumber"
},
"from": "no-reply@sailpoint.com",
"recipientEmailList": [
"Bilbo.Baggins@theshire.com"
],
"subject": "Cellphone Certification Required"
},
"displayName": "Send Certification Email",
"nextStep": "End Loop Step",
"type": "action",
"versionNumber": 2





