How to get Task ID?

I want to get task id of a user task by executing java, how can I do that?

@nobin are you using java API or rest api to query for tasks?

Java API…

Depending on how you’re accessing the engine and what query parameters you’re working with something like this should work

 execution.getProcessEngineServices().getTaskService().createTaskQuery().processInstanceId("someinstanceID").list();

this would return a list of user task and their IDs

2 Likes