Hello all,
I’m trying to use Camunda workflow to manage the requests within my application. I’m having a tough time right now deciding how to track the status of the request as it goes through the workflow. The status could be one of the following: PENDING, APPROVED, REJECTED, CANCELED, or REVOKED.
I understand I can create a process variable called status and update this value as it goes through my workflow.
execution.setVariable("status", RequestStatus.PENDING);
When I try to retrieve all requests according to the request status from my APIs, would I use Camunda’s HistoryService to get HistroricProcessInstances by my ProcessDefinitionKey and process variable “status” = “{DESIRED_STATUS}”? Or is there a better way to retrieve my requests according to their status?
In my workflow, PENDING requests will be considered active process instances and APPROVED, REJECTED, CANCELED, and REVOKED are process instances that have finished.