[BONITA 6.2 API] Getting activityInstanceId

Hi there,

I’m starting a process through bonita’s API and I’m trying to submit a task doing : processAPI.executeFlowNode(activityInstanceID);
My problem is that I don’t know how to get the “activityInstanceID” when all I’ve got is :

final ProcessInstance processInstance= processAPI.startProcess(processDefinitionId , variables);

Any ideas ?
Thanks for any help
Paul

Hi Paul,

I had a similar problem… here.

The way to get the activityID is (well the way I did it was sort of…like this)…

final HumanTaskInstance userTask = waitForUserTask("step1", processInstance); activityId =userTask.getId();

regards
Seán

Hi Seán, Thanks again for the help.

I’ve cheked on what you did but I can’t make it work on the 6.2 API.
So I found a work around by just going to another humanTask if a variable has a value (that specific to my project).

Paul