Is it possible to maintain same task id among all the flows in flowable BPM?

Is it possible to maintain the same task id among all the flows in flowable BPM? I have a requirement to maintain the same task id.

Hey @sha_flow,
if you mean the actual task ID, I would not recomment doing so. I suggest using some unique variable.
What is the usecase for that request?

Greetings

Christopher

Hi Chris, thanks for responding.

We have configured emails to be sent with the hyperlink of the task (URL) when a new task is created and moved to another flow and so on.

URL will be like : https://applicationname:8181/module/flowname?taskid=123456

When the email gets generated for one flow, it is associated with the task id like above. So when that task is moved to another flow, it will have a new task id, and the hyperlink in the email is no longer valid (Since it is associated with the old task id and this task already moved to new flow and gotten new task id) and that task never loads when you click on it.

So we want to have the same task id across all the flows so that if the link in the email is clicked, that task is loaded irrespective of when it link is created.

Please check and let me know.

Thanks.

@WelschChristopher - Hi Chris, did you get a chance to check this?

Hey @sha_flow,
I’m not 100% sure I understood that correctly. A hyperlink pointing to a specific task ID should not be rerouted to some different task. (IMHO).
Also, this scenario will not work as soon as you use gateways to create multiple active tasks.

If you always want the link to end on the “current task”, I suggest you send the processId/caseId as a parameter instead of the taskId. With these IDs, you can always retrieve the runtime task instances.

Greetings

Christopher

I recommend you use businessKey for this, that way you can maintain a consistent key across multiple tasks and query accordingly.
As @WelschChristopher says, a task id is unique and should not direct to another task.

@WelschChristopher @gdharley Thanks guys for your response.