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?
The email is sent using the Send Email smart service. We are getting the task Id from the process Id using a!queryProcessAnalytics
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?
The security of the process model seems to be the same in all environments. Also on another note, if I a Appian system Administrator and the task is assigned to me, won't I be able to see the task no matter what the security is?
So this works in some environments but not others?
And it has worked in the past as well?
That's right. It works in PROD and one non-PROD and not in other two non-PROD environments. Please note these two cloud environments (where its not working ) are newly setup from scratch. And they are in different Appian versions. I don't know if it has anything to do with the Appian versions but that's the only difference in environment I'm able to think of.
Interesting. Which versions?
Also - What is in this expression?
GetActiveTaskIdByProcessID
25.1.286 in DEV environment, 24.3.650.0 in PROD.
25.1236 in the two environments where it doesnt' work.
getactivetaskidbyprocessid:
if( rule!APN_isBlank(ri!processId),{}, index(index( a!queryProcessAnalytics( report:cons!TASK_REPORT, contextProcessModels:{ cons!CREATION_PROCESS_MODEL, cons!APPROVAL_PROCESS_MODEL}, query:a!query( logicalExpression:a!queryLogicalExpression( operator:"AND", filters:{ a!queryFilter( field:"c16", operator: "=", value:ri!processId ), a!queryFilter( field:"c1", operator: "IN", value:tointeger(1,0) )
},
), pagingInfo:a!pagingInfo(1,-1) ) ), "data", {}), "c7" ,{}))
Perhaps accessing the task via the numeric id broke in 25.1.
I would recommend using urlForTask as mentioned below which generates a url with the opaque id.