I am a Camunda developer and i am looking for any API for user task life cycle management. I need API to pause and resume the user task and to calculate actual woking time on any user task.
@Bajrangi_Lal - user tasks don’t have pause/resume functionality - the task is started, and when the user completes it then it finishes. It is up to the user how long that takes.
For gathering metrics on working time, you should be able to get that information in Optimize. If you want to fetch the data yourself, you could build a report in Optimize and fetch the data via the API; or you could query the Tasklist API and/or the new unified endpoint (available in production starting with 8.8), and get the timestamps from the results.
Hi @nathan.loding
I’m working with Camunda 8, and I’m looking to implement a pause and resume functionality for a user task.
Here’s the use case:
- A user claims a task from the Tasklist.
- At any point, the user may need to pause their work on the task (e.g., for a break or to handle something else).
- Later, they should be able to resume the same task.
- Once the task is finally completed, I need to calculate the actual working time, excluding any paused durations.
Has anyone implemented something similar in Camunda 8?
I’m open to using custom variables, Operate APIs, Tasklist extensions, or connectors—whatever fits best within the platform’s model.
Would appreciate any suggestions, best practices, or sample implementations!
Thanks in advance!
@Bajrangi_Lal - there is no pause or resume in Camunda. A user task starts then is completed whenever it is completed. If you need additional tracking, you would need to implement a custom tasklist application that tracks that data.
Also, please don’t open new threads for existing questions.
Hi @nathan.loding
Thanks for the clarification. Here’s how we’re currently handling the pause/resume use case:
- We use the following endpoint to retrieve variables for a specific element instance:
PATCH http://localhost:8080/v2/user-tasks/:userTaskKey - When a user chooses to pause or resume a task, we:
- We update the action accordingly as pause and resume
- We’re referring to the official documentation here: [Update user task | Camunda 8 Docs](Update user task | Camunda 8 Docs)
Could you please confirm if this is the correct or recommended approach for this kind of requirement?
Also, if possible, could you provide more details or best practices for handling such scenarios? and Is there any api available to fetch the updated status?
@Bajrangi_Lal - again, Camunda doesn’t have any notion of pause or resume built in to user tasks, so there is no correct approach or API - it is whatever you want you to design for yourself, that meets your requirements.
However, I am not sure if you’re able to use the action
variable anywhere else - I have asked the product team for clarification and will reply when I hear from them.
@Bajrangi_Lal - I learned what the action
field does. It will be available in user task listeners, which will be available in the upcoming 8.8 release in October. When you update a task, it can optionally trigger an “update user task listener” and it sends the contents of the action
field with it.
Setting the action
value doesn’t change anything inside Camunda, and isn’t currently available in any metrics or reporting. If you want to track the intervals between pause and resume, I would recommend doing that within your application.
This is not elegant (I think) but you can try mimicking pause and resume of a task with messages, maybe.
Send a Pause message to interrupt the task.
Send a Resume message to “resume” the task.
It’s not a pause, strictly speaking. You will have many executions of the User Task, so it may not fit your requirements (don’t know how you handle the task internally).
You would have to sum the execution time of each task execution.