Hello,
Before assigning the Approval i want to send Email to Approval and then assign Task to Approval as shown in following Image(A).
Image(A)
In that email i want the Task ID which i get it following way as shown in following Image(B), but it returns previous Task ID which is useless to me.
Image(B)
What i tried,
We can get Task Link when we Checked "Notify......." option in Input Task Properties but we can't change that Email format or that default email template.
So i design my own Email Template and Included it process model as shown in Image(A), but "tp!id" in Task Properties as shown in Image(B) gives me previous Task ID.
And don't want to used default email notification alert for Task whose email format is fixed and non editable.
So how can i Get the Latest Task ID, so i can used it in my "Email Template as Approval Link" (bind Task Id with URL, so Approval can directly redirect to that Task).
Discussion posts and replies are publicly visible
Hi Navajith K,
Thanks for reply,
So what i understand from you result as mention it in following Image(C)
Image(C)
This is what i understood, is it correct understanding? and in parallel i have to used a!queryporcessanalytics to get Task ID.
Thanks Navajith K
All above reply related to my query is working properly and i am able to getting latest Task ID using following function you suggested.
1
a!queryProcessAnalytics(report: cons!MY_TASKS, contextUsers: "user.name")
It's Working...
hi Amit,
We have also tried to implement same logic for fetching task id in our customized email but we are getting task id which is incorrect task id (for example : if task id is 268445168 then in email we are getting 268445171)
The steps that we followed are:
1. Created a report of type "task" to fetch user tasks.
2. We ussed "Execute Process Report" smart service and connected it with Email smart service
We used AND gateway in which path -1 is having user input task connected to End shape & path-2 is having "Execute Process Report" smart service and Email smart service connected to End shape to fetch task id and send Email to approver.
So, can you suggest us what we can modify in order to get correct task id. Do we need apply any filter or any query to get the correct task id.
hello shrutik11,
1. create constant "cons!MY_TASKS" first
2. Then use following code to get the current task id of Approval
"a!queryProcessAnalytics(report: cons!DDG_UserTask, contextUsers: "user_name").data.dp0[1]"
pass Approval username instead of "user_name" in above code, mention username to whom approval is assigning(or user input task)
3. These will return you Task id of Approval and then bind with URL of Tempo or Site.
Hi Amit, Thank you for your reply. I have used below query and it is working fine for me. a!queryProcessAnalytics(report: cons!My_Tasks, contextGroups: cons!Approver).identifiers[1]
Hi Amit,
This does not work for me. I am getting the previous task Id. Not the current one. How in the AND gateway we ensure that we query the report after the UIT is assigned when they are run in parallel?
Hi venuk0001,
Just Follow the steps which i told to shrutik11, and also i mention one process model screenshot first try one demo separately and remember you have to bind that task id with your org url of task
for example>> "">example.com/.../" &a!queryProcessAnalytics(report: cons!DDG_UserTask, contextUsers: "user_name").data.dp0[1]
like this, i am using same and i am getting newly created task id.
Thanks,
Amit Behere(amitb0004)
Here's a pattern that will guarantee that the Task as been assigned before you attempt to retrieve the Task Id with the process analytics:
This uses an immediate Escalation on the Task (i.e. the wait time is 0 minutes) and uses the 'Send Message' option to send a message to a listener in the same Process Model (note: if there are possible concurrent instances of this process model you'll need to ensure you send the message to the specified Process Instance by setting the 'DestinationProcessID' (this is best practice anyway!)