When you enable a workflow to run concurrently with unique instance names, the Integration Service distinguishes between workflow run instances by the run instance name. You can configure the same run instance name for more than one workflow because each workflow instance is defined by a combination of the workflow name and the run instance name. When you enable a workflow to run concurrently with the same instance name, the Integration Service distinguishes between workflow run instances by the run ID.
The built-in variables $PMWorkflowRunInstanceName and $PMWorkflowRunId return the workflow run instance name and run ID as string values. These variables are read-only. You can access them in the workflow or the mapping to retrieve the name or run ID of the workflow instance. You can apply these variables to expressions, file-watch events, or data. You can also use them to configure unique file names.
For example, create a pre-defined Event-Wait task to delete an indicator file after it appears. Define the file name with $PMWorkflowRunInstance name. When you run two concurrent workflows with unique instance names, each workflow Event-Wait task waits for and deletes a different indicator file.
When you run a workflow that is not enabled to run concurrently, $PMWorkflowRunInstanceName has no value.