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
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.