Cancel a process instance using Bonita Engine API

1
0
-1

Hi,

I want cancel a process instance when I press a button of a Form, I use the Engine API

import org.bonitasoft.engine.api.APIAccessor;
import org.bonitasoft.engine.api.ProcessAPI;

ProcessAPI processAPI = apiAccessor.getProcessAPI();
processAPI.cancelProcessInstance(processInstanceId);

I get an Null pointer Exception

Comments

Submitted by Sean McP on Wed, 12/23/2015 - 15:45

I think you're missing the bit that says

getprocessInstanceId...

You've got the api now you need to cancel the actual instance of the process :)

Good hunting, off to catch a plane...can't do any more today.

regards

Submitted by aissaelouafi4 on Thu, 12/24/2015 - 09:59

Thank you for you response, I can get the processInstanceId using the super variable processInstanceId of Bonita, I want to cancel the current instance of the process.

Submitted by antoine.mottier on Tue, 12/29/2015 - 11:44

Which version of Bonita BPM are you using?

Do you want the user to be able to cancel the process instance at a specific point in process execution or at anytime?

No answers yet.
Testing
Notifications