Hi,
We have a custom email notification configured for a task and this is done using the tp!id parameter. the Task URL that gets generated looks like: /suite/tempo/tasks/task/<task-id>. When the user gets the task assigned and opens it from the tasks tab, it works fine. The URL for this contains the opaque task id. But when the user open the task via the custom email (tp!id), the task throws the error:
The Requested Task Is Not Available The task may not exist or you may not have permission to view it.
The same code works in one of our Appian environments - version 25.1.286.0 and it doesn't work in the environment - version : 25.1.236.0. Any idea if this has got anything to do with the Appian version?
Thanks
Discussion posts and replies are publicly visible
How do you send this email and how do you get the task id?
Are you using this method to generate the url: docs.appian.com/.../fnc_scripting_a_urlfortask.html
The email is sent using the Send Email smart service. We are getting the task Id from the process Id using a!queryProcessAnalytics
How do you trigger that email node? How do you make sure it runs AFTER the task is assigned?
I usually put a 5 second timer to make sure task exists before sending out the email. It's a shame that Appian doesn't let us customize the task notification email.
Hi, the Email node is triggered on submit of a Appian UI. This happens in parallel to the task assignment for which we are triggering this email. There is a AND node that connets to the UI (task for which link doesn't work) and the email node)
Did you try putting a timer just before the email node? There is a slight delay before the task id is available after assignment.
I didn't. However the link that is generated is correct. How I verified this is by checking the process Id and the Task Id in the portal task report. Also the link never seems to work even if I try after a day. Overall, the task link with the tp!id doesn't work for any task.
Perhaps it has to do with the security on the process model in that case?
This is the method we're using:
="<a href = """ & rule!APN_getSiteUrl() & "tempo/tasks/task/" & rule!GetActiveTaskIdByProcessID( processId:ri!sysProcessId )& """>Click Here to View the Task.</a>"
Even though there are other methods of doing this, we have this working in PROD and may not be able to make changes to this code as this is not working in certain environments.