Solved

How to save a task serial number

  • 31 January 2020
  • 1 reply
  • 65 views

I have a workflow where I save the workflow ID_TaskID so that I can complete the task via a separate form.

However sometimes the TaskID isn't the correct ID and when the end users are trying to complete the task via the separate form they do not get the proper serial number and can't complete the task.

I have this TaskID saved in a multi step running before the task.
Is there potentially a better way to save a task ID/serial number?


11896i3FE72D158B72A0D6.png

icon

Best answer by boringNerd1 3 February 2020, 03:43

View original

1 reply

Badge +15

Hi,


 


The serial number of a task is only valid for that task step. That means you can only open the task (via your form) if the process instance is curently waiting at that exact task. Each task generates its own serial number. If you are expecting the same serial number to be used throughout the process instance, you are wrong. 


 


A task serial number is in the following format: XX_YY


XX refers to the process instance ID


YY refers to the activity instance destination ID


 


As your process instance moves through to the next task, XX remains the same, but YY will change. Depending on how you configure the task to be assigned, YY may be the same for all assigned task users, or YY may be different. 


 


You can perhaps make use of the Activity Instance Destination SmartObject to get the activity instance destination ID for a particular task, then combine it with the process instance ID to form your task serial number. The SmartObject is a reporting SmartObject, so it returns every task records that have been completed as well. You will need to filter the results to return only the active task.


 

Reply