I am trying to implement a purchase order (PO) workflow using a React front end. I have a listing page for showing all the POs. As per the suggested answer to my previous question, I have implemented a status variable in camunda process instance to capture the current milestone/stage of the instance. Some of the PO data is on my application database, and I have added the processInstanceId
as a reference to each instance in camunda.
Right now I am fetching all the entries from my db, and then subsequently making a bunch of REST API calls to get the status variable - http://localhost:1234/engine-rest/process-instance/processInstanceId/variables. This works fine for processes that are running. However for instances that are not running, I am getting a server 500 error. Is there any way to generalize accessing the status variable? Thanks
Link to previous question explaining use case - How can I get the process definition tasks through API - #4 by Niall