in a certain process instance and only active (i.e. not suspended) tasks.
Assumes there is only one result. If there are more results, this method throws an exception.
None :). The term task here refers to a work item for a human, to instances of BPMN user tasks (e.g. accessible via Camunda task list). Unfortunately, this term is overloaded and has a different meaning in BPMN.
I hope this makes sense.
Best regards,
Thorben
Edit: By the way, if you need a representation of all currently active activities in a process instance, then have a look at the API RuntimeService#getActivityInstance.
Okay, if the process instance is at Get Selected ISBN, then the query returns only the work item that corresponds to this activity. It does not include tasks for activities that have not yet been reached.
No, this is a different concept. There are APIs to suspend tasks (e.g. TaskService#suspendTask), which ensure it can not be worked on (completed) until it is activated again. This still requires that process execution has reached the user task in the BPMN model.