authentication 6.5 engine apis

Cancel a process instance using Bonita Engine API

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

How do I bypass authentication to get the API session

Integrating Bonita engine APIs into my app. Since the user is already authenticated, how do I bypass the authentication to ensure that the API session can be obtained? If there is no straight forward way as I came across this unanswered question for bos 5.9, can you give some work around? Thanks.

Notifications