Obtain Process Instance ID

Hi.

I have a process in which i generate tickets of support and i want that every ticket has an identifier so i have a field named “FOLIO” what i want to do is when te process start in that field appear the processinstanceid and use it as the identifier. eg. Ticket: 231.

Hope you can help me!!

Thanks.

A few ways to do this, here’s a couple:

-1-

The auto-magic variable “processInstanceId” is almost certainly what you want.
It’s automatically available in the connectors, instantiators and operations.

Eg, for an operation, declare a process variable “procId” and give it a default value using a script, the content of which is…

return processInstanceId;

-2-

You’ll also find the same value in the “processId” subfield of the task structure that your form normally receives by default in the “task” structure.