cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Workflow email robot - include activity (task) info

TomU
23-Emerald IV

Workflow email robot - include activity (task) info

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.

4 REPLIES 4
mcendrowicz
6-Contributor
(To:TomU)

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();
TomU
23-Emerald IV
(To:mcendrowicz)

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

mcendrowicz
6-Contributor
(To:TomU)

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

TomU
23-Emerald IV
(To:mcendrowicz)

There must be more to using this than just dropping it in a workflow expression robot...

Can you tell me what else I need to do?

 

Workflow Expression Robot.png

Workflow Compile Error.png

Announcements

Top Tags