Skip to main content
23-Emerald IV
November 14, 2018
Question

Workflow email robot - include activity (task) info

  • November 14, 2018
  • 1 reply
  • 2565 views

So I built a notification loop in the promotion request workflow to daily remind the assigned individual that they have an open task.  Can anyone offer suggestions on how to retrieve the active task name and corresponding hyperlink so I can include them in the email robot's message text?  The email template for tasks already includes this information but the email template the robot uses is different and does not include this information since it's not tied to a particular task.  How do I retrieve that information?  Thanks.

 

Workflow Email Loop.png

- Email message for green boxes should be very similar, if not identical.

1 reply

6-Contributor
November 15, 2018
if (pbo instanceof WTChangeActivity2) {
changeActivity = (WTChangeActivity2) pbo;
}

NmOid changeActivityOid = new NmOid(PersistenceHelper.getObjectIdentifier(pbo));
NmAction changeActivityInfoPageAction = NmActionServiceHelper.service.getAction("object", "view");
changeActivityInfoPageAction.setContextObject(changeActivityOid);
changeActivityInfoPageAction.setIcon(null);
String changeActivityLink = changeActivityInfoPageAction.getActionUrlExternal();
String changeActivityName = changeActivity.getName();
TomU23-Emerald IVAuthor
23-Emerald IV
November 15, 2018

Will this work for promotion requests or only change objects (tasks/notices/requests)?

6-Contributor
November 15, 2018

It should work for all persistables (NmOid and NmAction).