# Work Item Reminders Are Not Triggering

**URL:** <https://developer.sailpoint.com/discuss/t/work-item-reminders-are-not-triggering/79346>\
**Category:** IIQ Discussion and Questions\
**Tags:** identityiq, rules\
**Created:** [September 4, 2024, 9:36pm UTC](https://developer.sailpoint.com/discuss/t/work-item-reminders-are-not-triggering/79346 "2024-09-04T21:36:13Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sathieshg](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@sathieshg](https://developer.sailpoint.com/discuss/u/sathieshg)\
**Post date:** [September 4, 2024, 9:36pm UTC](https://developer.sailpoint.com/discuss/t/work-item-reminders-are-not-triggering/79346/1 "2024-09-04T21:36:13Z")

</div>

## Which IIQ version are you inquiring about?

_8.4P1_

- The workitem is failing to trigger the initial notification.
- After manually triggering the initial notification, no reminders are being sent.

Below is the code that I’m using to generate workItem.

```auto
        boolean revokeExist = false;
		Identity requester = context.getObjectByName(Identity.class, "requesterName");
		ApprovalSet approvalSet = new ApprovalSet();
		Identity ownerIdentity = context.getObjectByName(Identity.class, "itemOwnerName");

		ApprovalItem approvalItem = new ApprovalItem();
		approvalItem.setApplication("App");
		approvalItem.setRequesterComments("comment");
		approvalItem.setOperation("Revoke");
		approvalItem.setApprover("itemOwnerName");

		approvalSet.add(approvalItem);

		if (revokeExist) {
			String wiDescription = "Revoke - Change Base/Flex Role for " + ownerIdentity.getDisplayName();
			WorkItem workItem = new WorkItem();
			workItem.setType(WorkItem.Type.ManualAction);
			workItem.setApprovalSet(approvalSet);

			workItem.setDescription(wiDescription);
			workItem.setLevel(WorkItem.Level.Normal);
			workItem.setState(WorkItem.State.Pending);
			workItem.setOwner(ownerIdentity);
			workItem.setRequester(requester);
			workItem.setTargetClass(Certification.class.getName());
			workItem.setRenderer("lcmManualActionsRenderer.xhtml");
			workItem.setHandler(Workflower.class);

			Sequencer sequencer = new Sequencer();
			workItem.setName(sequencer.generateId(context, workItem));

			Calendar calendar = Calendar.getInstance();
			calendar.add(Calendar.MINUTE, 10);

			NotificationConfig notificationConfig = new NotificationConfig();
			notificationConfig.setEnabled(true);
			notificationConfig.setStartDate(calendar.getTime());

			IConfig reminderConfig = new ReminderConfig();
			reminderConfig.setEnabled(true);
			reminderConfig.setMillis(86400000);
			reminderConfig.setFrequency(86400000);
			String emailTemplateName = "Reminder Template";
			reminderConfig.setEmailTemplateName(emailTemplateName);

			ConfigBase configBase = new ReminderConfig();
			configBase.isSame(reminderConfig);

			List iconfigList = new ArrayList();
			iconfigList.add(configBase);
			iconfigList.add(reminderConfig);

			notificationConfig.setConfigs(iconfigList);
			workItem.setNotificationConfig(notificationConfig);

			calendar.add(Calendar.DATE, 30);
			workItem.setExpiration(calendar.getTime());

			context.saveObject(workItem);
			context.commitTransaction();

			Map emailInputs = new HashMap();
			emailInputs.put("workItem", workItem);
			emailInputs.put("workItemName", "workItemName");

			EmailTemplate template = context.getObjectByName(EmailTemplate.class, "templateName");
			EmailOptions mailOpts = new EmailOptions("effectiveEmails", emailInputs);
			context.sendEmailNotification(template, mailOpts);
		}

```

---

<div class="post-metadata">

**Author:** ![kjakubiak](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/kjakubiak/32/7052_2.png) [@kjakubiak](https://developer.sailpoint.com/discuss/u/kjakubiak)\
**Post date:** [September 5, 2024, 9:17am UTC](https://developer.sailpoint.com/discuss/t/work-item-reminders-are-not-triggering/79346/2 "2024-09-05T09:17:29Z")

</div>

Did you run Check Expired Workitems task?

---

<div class="post-metadata">

**Author:** ![ashutosh08](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/ashutosh08/32/11459_2.png) [@ashutosh08](https://developer.sailpoint.com/discuss/u/ashutosh08)\
**Post date:** [September 5, 2024, 3:35pm UTC](https://developer.sailpoint.com/discuss/t/work-item-reminders-are-not-triggering/79346/3 "2024-09-05T15:35:48Z")

</div>

Hi @sathieshg,

If after running the Task “Check Expired WorkItem” if it is not triggering reminder then please share sample workitem being generated.

Thanks

---

<div class="post-metadata">

**Author:** ![sathieshg](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@sathieshg](https://developer.sailpoint.com/discuss/u/sathieshg)\
**Post date:** [September 6, 2024, 3:18pm UTC](https://developer.sailpoint.com/discuss/t/work-item-reminders-are-not-triggering/79346/4 "2024-09-06T15:18:34Z")

</div>

Yes, we run the “Check expired work item” every day, and it was run to test the email.  
Nothing happened.

Here is the sample work item.

```auto
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE WorkItem PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<WorkItem created="1723130700858" expiration="1725723300780" handler="sailpoint.api.Workflower" id="id" level="Normal" modified="1723136014914" name="0000306768" renderer="lcmManualActionsRenderer.xhtml" state="Pending" targetClass="sailpoint.object.Certification" type="ManualAction">
  <Attributes>
    <Map>
      <entry key="approvalSet">
        <value>
          <ApprovalSet>
            <ApprovalItem application="App" approver="Sathiesh" id="id" operation="Revoke" requesterComments="As part of review - you revoked the entitlement from Security Role &quot;IIQ Test role&quot;. Please submit &quot;Role Content Change&quot; reqeust"/>
          </ApprovalSet>
        </value>
      </entry>
    </Map>
  </Attributes>
  <Description>Revoke - Change Base/Flex Role in Security Service</Description>
  <NotifConfig>
    <NotificationConfig enabled="true" reminderFrequency="86400000" remindersEnabled="true">
      <Configs>
        <ReminderConfig emailTemplateName="Revoke Reminder" enabled="true" frequency="86400000" millis="86400000"/>
      </Configs>
    </NotificationConfig>
  </NotifConfig>
  <Owner>
    <Reference class="sailpoint.object.Identity" id="id" name="Sathiesh"/>
  </Owner>
  <Requester>
    <Reference class="sailpoint.object.Identity" id="id" name="Sathiesh"/>
  </Requester>
</WorkItem>

```

---

<div class="post-metadata">

**Author:** ![ashutosh08](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/ashutosh08/32/11459_2.png) [@ashutosh08](https://developer.sailpoint.com/discuss/u/ashutosh08)\
**Post date:** [September 9, 2024, 6:46am UTC](https://developer.sailpoint.com/discuss/t/work-item-reminders-are-not-triggering/79346/5 "2024-09-09T06:46:36Z")

</div>

Hi @sathieshg,

Can you try setting below variable as shown below in sample snippet and test. Let me know if you still face issue. Screenshot is attached for your reference.

```auto
Attributes<String,Object> attributes=new Attributes<String, Object>();
		attributes.put("workItemHoursBetweenReminders","10");
		attributes.put("workItemMaxReminders","2");
		attributes.put("workItemEscalationFrequency","3");
		attributes.put("workItemHoursTillEscalation","10");
		attributes.put("workItemEscalationTemplate","ABC Template");
		
		workItem.setAttributes(attributes);

```

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/f/c/fcbed5d3ad254c14da6423a9798314f10bdaae87.png)

Thanks

---

<div class="post-metadata">

**Author:** ![sathieshg](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@sathieshg](https://developer.sailpoint.com/discuss/u/sathieshg)\
**Post date:** [October 3, 2024, 3:40pm UTC](https://developer.sailpoint.com/discuss/t/work-item-reminders-are-not-triggering/79346/6 "2024-10-03T15:40:38Z")

</div>

Apologies for the delay in testing. Unfortunately, this change did not resolve the issue.

---

<div class="post-metadata">

**Author:** ![sathieshg](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@sathieshg](https://developer.sailpoint.com/discuss/u/sathieshg)\
**Post date:** [October 4, 2024, 8:45pm UTC](https://developer.sailpoint.com/discuss/t/work-item-reminders-are-not-triggering/79346/7 "2024-10-04T20:45:33Z")

</div>

Does anyone have further suggestions or ideas to make this work? I’d appreciate any additional input.

---

<div class="post-metadata">

**Author:** ![VABHI1994](https://avatars.discourse-cdn.com/v4/letter/v/85e7bf/32.png) [@VABHI1994](https://developer.sailpoint.com/discuss/u/VABHI1994)\
**Post date:** [October 23, 2024, 1:35pm UTC](https://developer.sailpoint.com/discuss/t/work-item-reminders-are-not-triggering/79346/8 "2024-10-23T13:35:52Z")

</div>

Hi Sathiesh,  
Currently I am also working on the same issue, can you please let me know if you are able to fix this. When I run the “Check Expired WorkItem” task, the workitem is getting scanned, but the reminders were not sent.  
Regards,  
Abhilash

---

<div class="post-metadata">

**Author:** ![VABHI1994](https://avatars.discourse-cdn.com/v4/letter/v/85e7bf/32.png) [@VABHI1994](https://developer.sailpoint.com/discuss/u/VABHI1994)\
**Post date:** [October 24, 2024, 5:32am UTC](https://developer.sailpoint.com/discuss/t/work-item-reminders-are-not-triggering/79346/9 "2024-10-24T05:32:41Z")

</div>

Hi Sathiesh,  
I am also working on the same use case. I had modified your code and fixed the issue now. Now the emails are triggered whenever check expired work item task runs. Make sure you have an proper email for the user to whom the work item is assigned. Please check the below code

```auto
   if(manualItem != null){
				Calendar calendar = Calendar.getInstance();
			calendar.add(Calendar.MINUTE, 10);
			NotificationConfig notificationConfig = new NotificationConfig();
			notificationConfig.setEnabled(true);
			notificationConfig.setStartDate(calendar.getTime());
			
			IConfig reminderConfig = new ReminderConfig();
			reminderConfig.setEnabled(true);
			reminderConfig.setMillis(259200000);
			reminderConfig.setFrequency(259200000);

			String emailTemplateName = "Custom Work Item Reminder";
			reminderConfig.setEmailTemplateName(emailTemplateName);
			
			EscalationConfig escConfig = new EscalationConfig();
						escConfig.setEscalationRuleName("Escalation IIQ Support");
						escConfig.setMaxReminders(10);
						escConfig.setMillis(259200000);
						escConfig.setFrequency(259200000);
						escConfig.setEmailTemplateName(emailTemplateName);
						escConfig.setEnabled(true);

			List iconfigList = new ArrayList();
			//iconfigList.add(configBase);
			iconfigList.add(reminderConfig);
			iconfigList.add(escConfig);

			notificationConfig.setConfigs(iconfigList);
			manualItem.setNotificationConfig(notificationConfig);
			java.util.Date d = new Date();
			manualItem.setWakeUpDate(d);
			commit = true;
			
          }
    if(commit) {
			context.saveObject(manualItem);
			context.commitTransaction();
		}

```

Setting the wakeup set and escalations fixed the issue.  
Regards,  
Abhilash

---

<div class="post-metadata">

**Author:** ![sathieshg](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@sathieshg](https://developer.sailpoint.com/discuss/u/sathieshg)\
**Post date:** [December 13, 2024, 6:17pm UTC](https://developer.sailpoint.com/discuss/t/work-item-reminders-are-not-triggering/79346/10 "2024-12-13T18:17:36Z")

</div>

Thanks @VABHI1994  
After enabling the wakeup time, the email is not sent immediately but sent when check expired work item task runs.  
This should work for us, combined with my manual notification this solves the issue.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [February 11, 2025, 6:17pm UTC](https://developer.sailpoint.com/discuss/t/work-item-reminders-are-not-triggering/79346/11 "2025-02-11T18:17:51Z")

</div>

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