Question on Reminder initialReminderMillisAfterStart variable

Which IIQ version are you inquiring about?

8.4P2

Please share any images or screenshots, if relevant.

[Please insert images here, otherwise delete this section]

Please share any other relevant files that may be required (for example, logs).

Attached

Share all details about your problem, including any error messages you may have received.

Team,

We have a below requirement to send a reminder notifications to the end-users on pending workitems.

First Reminder after 72hrs (After 3 days)
Second Reminder after 144hrs (After 6 days)

Workitem should get expire on - 10th day (216 hours).

I’ve configured below things to achieve the use-case but initialReminderMillisAfterStart showing as 216 which is incorrevt it suppose to be 72hrs.

Do I need to make any changes?

  <Variable initializer="72" input="true" name="workItemHoursBetweenReminders">
    <Description>The number of hours to wait between sending reminders to approvers.</Description>
  </Variable>
  <Variable initializer="216" input="true" name="workItemHoursTillEscalation">
    <Description>The number of hourse to wait until an approval should be escalated.</Description>
  </Variable>

  <Variable initializer="216" input="true" name="workItemHoursTillExpiration"/>
  <Variable initializer="Work Item Reminder" input="true" name="workItemReminderTemplate">
    <Description>The email template that should be used when sending out reminders.</Description>
  </Variable>
  <Variable initializer="WorkItem Escalation Rule" input="true" name="workItemEscalationRule">
    <Description>The rule used to assign a new owner during escalation.</Description>
  </Variable>
  <Variable initializer="2" input="true" name="workItemMaxReminders">
    <Description>The maximum number of reminder emails that will be sent before we begin the escalation process.</Description>
  </Variable>

Workitem:
=======

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE WorkItem PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<WorkItem handler="sailpoint.api.Workflower" id="0af8a8a6972f1ba881972fe2f2e10263" identityRequestId="0000045678" level="Normal" name="0000099999" renderer="lcmWorkItemRenderer.xhtml" significantModified="1748855091984" targetClass="sailpoint.object.Identity" targetId="8a78ac5e5ba44a94015ba4f08da504738" targetName="123456" type="Approval" wakeUpDate="1749632691974">
  <Attributes>
    <Map>
      <entry key="approvalMode" value="serial"/>
      <entry key="approvalScheme" value="manager, owner"/>
      <entry key="approvalSet">
        <value>
          <ApprovalSet>
            <ApprovalItem application="IIQ" assignmentId="6de10e164d6f4388a5579dd9f83c08f9" displayName="Role" displayValue="MBA Compliance WM&amp;CB - Compliance Officer" id="100d483fca0b4006be4da5u48953487" name="assignedRoles" operation="Add" value="BRF|RM&amp;S-CC-5046|Compliance_Officer">
              <Attributes>
                <Map>
                  <entry key="attachmentConfigList"/>
                  <entry key="attachments"/>
                  <entry key="flow" value="AccessRequest"/>
                  <entry key="id" value="0af8a8a7893f1c0181896435098765"/>
                  <entry key="interface" value="LCM"/>
                  <entry key="operation" value="RoleAdd"/>
                </Map>
              </Attributes>
            </ApprovalItem>
          </ApprovalSet>
        </value>
      </entry>
      <entry key="approvalSplitPoint"/>
      <entry key="clearApprovalDecisions">
        <value>
          <Boolean></Boolean>
        </value>
      </entry>
      <entry key="flow" value="AccessRequest"/>
      <entry key="identityDisplayName" value="Test,User"/>
      <entry key="identityName" value="123456"/>
      <entry key="identityRequestId" value="0000045678"/>
      <entry key="launcher" value="spadmin"/>
      <entry key="policyViolations"/>
      <entry key="workItemDescription"/>
      <entry key="workItemEscalationFrequency"/>
      <entry key="workItemEscalationRule" value="WorkItem Escalation Rule"/>
      <entry key="workItemEscalationTemplate"/>
      <entry key="workItemHoursTillExpiration" value="216"/>
      <entry key="workItemPriority">
        <value>
          <WorkItemLevel>Normal</WorkItemLevel>
        </value>
      </entry>
    </Map>
  </Attributes>
  <Description>Manager Approval - Account Changes for User: Test,User</Description>
  <NotifConfig>
    <NotificationConfig escalationEnabled="true" escalationMaxReminders="2" initialReminderMillisAfterStart="777600000" reminderFrequency="259200000" remindersEnabled="true" startDate="1748855091974">
      <EscalationRule>
        <Reference class="sailpoint.object.Rule" name="WorkItem Escalation Rule"/>
      </EscalationRule>
      <ReminderEmailTemplate>
        <Reference class="sailpoint.object.EmailTemplate" name="Work Item Reminder"/>
      </ReminderEmailTemplate>
    </NotificationConfig>
  </NotifConfig>
  <Owner>
    <Reference class="sailpoint.object.Identity" name="386349"/>
  </Owner>
  <Requester>
    <Reference class="sailpoint.object.Identity" name="spadmin"/>
  </Requester>
  <WorkflowCaseRef>
    <Reference class="sailpoint.object.WorkflowCase" name="Update Identity 123456 AccessRequest"/>
  </WorkflowCaseRef>
</WorkItem>

You will need to change your workItemHoursTillEscalation variable to 72. Even though the variable name refers to escalation it actually is Length of time (in hours) to allow the work item to exist before beginning the reminder and escalation process which would be the time to start sending reminders. Please refer to the following doc for details for these variables.

https://community.sailpoint.com/t5/Technical-White-Papers/LCM-Subprocess-Workflows/ta-p/75856#toc-hId-1564448532

1 Like

Thanks for the solution @SanjeevIAM

Also I’ve one more question, we are using escalation rule for below 2 purposes however, the case 1 is not working any idea?

  1. If the requester and reqestee is different for operation “Remove”, we are trying to auto appprove the request after 216 hours (Mentioned in the “workItemHoursTillExpiration”).
  2. For expired ones, we are trying to print the message as a WorkItem comment. (It’s working for now)
		// Actual Start Here for WorkItem Escalation Rule.
		if (item != null) {
			// Retrieve the expiration hours from WorkItem attributes
			int expirationHours = 0;
			Object expirationValue = item.getAttribute("workItemHoursTillExpiration");

			if (expirationValue != null) {
				try {
					expirationHours = Integer.parseInt(expirationValue.toString());
				} catch (NumberFormatException e) {
					log.error("Invalid format for workItemHoursTillExpiration: " + expirationValue);
				}
			} else {
				log.warn("workItemHoursTillExpiration attribute is missing; using default of 0");
				log.error("workItemHoursTillExpiration attribute is missing; using default of 0");
			}

			Date createdDate = item.getCreated();
			Date now = new Date();

			long diffMillis = now.getTime() - createdDate.getTime();
			long diffInHours = TimeUnit.MILLISECONDS.toHours(diffMillis);

			try {
				if (diffInHours > expirationHours) {
					String requester = item.getRequester() != null ? item.getRequester().getName() : "unknown";
					String user = item.getTargetName();

					ApprovalSet approvalSet = item.getApprovalSet();
					boolean isAutoApproved = false;

					if (approvalSet != null && approvalSet.getItems() != null) {
						List<ApprovalItem> approvalItems = approvalSet.getItems();

						for (ApprovalItem approvalItem : approvalItems) {
							if ("Remove".equalsIgnoreCase(approvalItem.getOperation()) && !requester.equals(user)) {
								isAutoApproved = true;
								break;
							}
						}

						if (isAutoApproved) {
							item.setState(WorkItem.State.Finished);
							item.setCompleter("spadmin");
							item.setCompletionComments("Auto-approved: no action taken on 'Remove' operation.");
						} else {
							item.setState(WorkItem.State.Expired);
							item.setCompleter("spadmin");
							item.setCompletionComments("Expired: no approval action within defined expiration window.");
						}

						context.saveObject(item);
					}
				} else {
					log.info("WorkItem is not expired yet: only " + diffInHours + " hours old (limit is "
							+ expirationHours + ").");
				}
			} catch (GeneralException e) {
				log.error("Error during auto-processing WorkItem: " + e.getMessage(), e);
			}
		}

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