cancel
Showing results for 
Search instead for 
Did you mean: 

Questions regarding HistoricTaskInstanceQuery

d_y_
Champ in-the-making
Champ in-the-making
Hey guys,

this is what i want to do:

I want to retrieve a list of all current tasks of all processInstances of a certain processDefinition.

This is how I think i have to do it:

processEngine.getHistoryService().createHistoricTaskInstanceQuery().processUnfinished().processDefinitionId("myProcessId").list();

Is this right?

I'm also not quite sure about these methods:

HistoricTaskInstanceQuery processInstanceId(String processInstanceId); = ?

HistoricTaskInstanceQuery processDefinitionId(String processDefinitionId); = id in the xml file?

HistoricTaskInstanceQuery processDefinitionKey(String processDefinitionKey); = the file name?
 
HistoricTaskInstanceQuery processDefinitionName(String processDefinitionName); = the name in the xml file?
1 REPLY 1

trademak
Star Contributor
Star Contributor
Hi,

It would probably make more sense to use:

processDefinitionKey

Because you then can point to the id attribute of your process definition.
processDefinitionId points to the internal database id of the process instance.

Best regards,