1. In this (https://www.pmusers.com/index.php/Extra ... route-case) API, i have to pass the application Id which means (@@APPLICATION)
Yes, you can use the @@APPLICATION system variable to get the ID of the current case.
2. As of my knowledge with processmaker if i execute the process only then i get the @@APPLICATION ID right
You need to have an open case to use this endpoint.
(Trying to figure this out without using the code for case routing is extremely complicated, so I used the case routing code. At any rate, you need to have a real case to figure out the next task if you have gateways with conditions or Value Based Assignment.)
3. But here before i could execute the process i would like to get the TASK1, TASK2 and TASK3 with correct orders as a (task wise).
This code only works for the currently open task in the case to get its next task.
For example if you have this process:
[task1] -> [task2] -> [task3]
and "task1" is currently open in your case, then you can only call this endpoint for delegation index of 1 (which is "task1").
You can't use the delegation index of 2 (which is "task2") before "task2" is open in the case.
4. Can i get the next task of the each task without application id(@@APPLICATION), instead can i pass the process id(@@PRO_UID Process Id)
No, you need to have a case ID (which is @@APPLICATION).
PS: If you need the list of tasks which were executed in a case, then see:
https://wiki.processmaker.com/3.0/REST_ ... 7D.2Ftasks
Amos B. Batto ♦ ProcessMaker Forum Manager since 2009