Process state for synch service task is not showing in Standalone Camunda Webapp

I’m not able to see the process states for the synchronization task in the standalone cammunda web app.
I’m using shared database for my spring boot microservice application and standalone Camunda web app.

Any help appreciated. Thank ou.

sample.bpmn (3.3 KB)

Attached my bpmn file.

Hi Sindhu,

Since the process was executed synchronous way, there’s no wait state in the process and all the activities will be executed in the same thread. So the process would have completed the meantime when you try to track it in the camunda cockpit.

To check the status, you need to add waiting state in your process.

In the java delegate put Thread.sleep(100000); by adding this, thread will be in sleep state and execution was paused. So that you can track it in cockpit. when thread sleep time lapses the execution will continue.

Otherwise,

Add userTask before the endEvent, by default userTask has a waiting state behaviour.

image

UserTask added: sample.bpmn (3.7 KB)

Otherwsie,

Instead of usertask, add intermediate timer catching event.

image

timer catching event: sample.bpmn (3.9 KB)

I have configured timer event to trigger after : PT5M, so when the execution token arrives at the intermediate event, it will wait for 5 mins (PT5M), once the time lapses, it will execute the flow.

Thanks aravindrs. How do I know the my workflow execution is completed?. I though once workflow is completed I could able to see in the tasklist. But when I visit that page I dont see any completed task. Is there way to see it? Thank you.

Hi Sindhu,

Completed tasks can be viewed from History in the camunda cockpit. This feature is available only for enterprise customers. So for community users you can always view only runtime data.

You can query the db with processInstanceId in history tables or you can access either using Java API/Rest API.

To query service tasks and events (history): https://docs.camunda.org/manual/7.12/reference/rest/history/activity-instance/get-activity-instance-query/

To query user tasks (history): https://docs.camunda.org/manual/7.12/reference/rest/history/task/get-task-query/

To query process instance (history): https://docs.camunda.org/manual/7.12/reference/rest/history/process-instance/get-process-instance-query/

To query service tasks and events (history):

HistoricActivityInstance historicActivityInstance = execution
        .getProcessEngineServices()
        .getHistoryService().createHistoricActivityInstanceQuery()
        .processInstanceId("processInstanceId").singleResult();

To query user tasks (history):

HistoricTaskInstance historicTaskInstance = execution
    .getProcessEngineServices().getHistoryService()
      .createHistoricTaskInstanceQuery().processInstanceId("processInstanceId")
        .singleResult();

To query process instance (history):

HistoricProcessInstance historicProcessInstance = execution.getProcessEngineServices()
        .getHistoryService().createHistoricProcessInstanceQuery()
        .processInstanceId("processInstanceId").singleResult();

For DB queries, check this post:

Creating multiple topics for same issue: Current topic is duplication of below one.