Workitem rejected vs expired

I am working with IdentityIQ where workitems are getting expired. Some are getting rejected. SailPoint is sending same email in both cases. Does anyone know how this is happening and where I can make change? For context, email template is LCM Notification.

#set($spctx=$spTools.class.forName(“sailpoint.api.SailPointFactory”).getMethod(“getFactory”, null).invoke(null, null).getCurrentContext())

#if ( $approvalSet )
#if ( $approvalSet.hasApproved() )
$launcher requested the following account changes to your identity ‘$identityDisplayName’ and they were APPROVED.

#foreach ($item in $approvalSet.approved)
#if ( $item.owner && $item.owner != $launcher )
#set($ownerIdentity=$spctx.getObjectByName($spTools.class.forName(“sailpoint.object.Identity”), $item.owner))
Approved By: $ownerIdentity.displayName ($item.owner)
#end
#if ( $item.comments)
#foreach ($comment in $item.comments)
Completion Comments: $comment
#end
#end
Application: $item.applicationName
#if ( $item.nativeIdentity )
Account : $item.nativeIdentity
#end
#if ( $item.instance )
Instance : $item.instance
#end
Operation: $item.operation
#if ( $item.displayValue )
Value(s): $item.displayValue
#elseif ( $item.value )
Value(s): $item.value
#elseif ( $approvalItem.csv )
Value(s): $approvalItem.csv
#end
#if ( $item.requesterComments )
Requester Comments: $item.requesterComments
#end

#end
#end
#if ( $approvalSet.hasRejected() )
$launcher requested the following account changes to your testing email identity ‘$identityDisplayName’ and they were REJECTED.

#foreach ($item in $approvalSet.rejected)
#foreach ($rejecter in $item.rejecters.split(“,”))
#set($rejecterIdentity=$spctx.getObjectByName($spTools.class.forName(“sailpoint.object.Identity”), $rejecter))
Rejected By: $rejecterIdentity.displayName ($rejecter)
#end
#if ( $item.comments)
#foreach ($comment in $item.comments)
Completion Comments: $comment
#end
#end
Application: $item.applicationName
#if ( $item.nativeIdentity )
Account : $item.nativeIdentity
#end
#if ( $item.instance )
Instance : $item.instance
#end
Operation: $item.operation
#if ( $item.displayName )
Value: $item.displayName
#elseif ( $item.name )
Value: $item.name
#end
#if ( $approvalItem.displayValue )
Value(s): $approvalItem.displayValue
#elseif ( $approvalItem.value )
Value(s): $entDisplayValues.get($approvalItem.value)
#elseif ( $approvalItem.csv )
Value(s): $approvalItem.csv
#end
#if ( $item.requesterComments )
Requester Comments: $item.requesterComments
#end

#end
#end

Handle case where the items are not approved or rejected when the

approvalScheme is none.

#if ( $approvalScheme == “none” )
$launcher requested the following account changes to your identity ‘$identityDisplayName’ and the request required no approval because approvals are disabled.

#foreach ($item in $approvalSet.items)
#if ( $item.comments)
#foreach ($comment in $item.comments)
Completion Comments: $comment
#end
#end
Application: $item.applicationName
#if ( $item.nativeIdentity )
Account : $item.nativeIdentity
#end
#if ( $item.instance )
Instance : $item.instance
#end
Operation: $item.operation
#if ( $item.displayName )
Attribute: $item.displayName
#elseif ( $item.name )
Attribute: $item.name
#end
#if ( $approvalItem.displayValue )
Value(s): $approvalItem.displayValue
#elseif ( $approvalItem.value )
Value(s): $entDisplayValues.get($approvalItem.value)
#elseif ( $approvalItem.csv )
Value(s): $approvalItem.csv
#end
#if ( $item.requesterComments )
Requester Comments: $item.requesterComments
#end
#end
#end
#end

Email Template for notifying users when accounts have been changed through Life Cycle Manager. Note that in addition to the declared arguments, all workflow variables, Step arguments, and Approval arguments defined in the Workflow are also available. The Workflow object being executed. The ApprovalSet object contained in the workflow. The name of the Identity that launched the workflow. The display name of the Identity that is being changed. Changes to your Identity were processed

@ankeetarjyal In workflowcase you will see lastApprovalState = Expired in case of expired workitem.

in workflow you will get directly in "lastApprovalState" variable. 

let me know if have any issues.

Which workflow? LCM Provisioning?

LCM Provisioning - try to print first to see the value in case of expired. it should come.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.