zWorkflowState is the query parameter of the Teamworks / IBM BPM task URL (/teamworks/process.lsw?zWorkflowState=…&zTaskId=…) that tells the coach runtime in which mode to open the task's human service. The values the runtime understands:
| zWorkflowState | Meaning |
|---|
| 1 | Run the task: open the human service for completion (claims the task for the user if it is not assigned); the value the portal uses when a user clicks a task |
| 2 | View the task in read-only / preview mode (used by the portal's task details view on older releases) |
| 3 | Open the task without changing its assignment (administrative view) |
| 5 | Continue a task's service after a postpone (resume the saved coach state) |
In practice only 1 (run) is used by applications; the other states are internal to the portal and changed between releases - IBM never documented them as an API, which is why "how many are there" has no stable answer. Building your own task links: use /teamworks/process.lsw?zWorkflowState=1&zTaskId=<taskId>&zResetContext=true on 8.5.x, or better the portal URL /ProcessPortal/launchTaskCompletion?taskId=… (8.5.7+) and, on BAW 20+ / CP4BA, Workplace's task URL or the REST task actions - those are supported and do not depend on the state parameter.
// coach view: open a task for completion in a new tab (works on 8.5.x - BAW; on CP4BA prefix the instance path)
window.open(base + "/teamworks/process.lsw?zWorkflowState=1&zTaskId=" + taskId + "&zResetContext=true", "_blank");
References