ApiClient

Is it possible to create bonita user using script task?

I tried to create a user in bonita portal using a script task.

use the following code and failed without success.

// First of all, let's log in on the engine: org.bonitasoft.engine.api.APIClient apiClient = new APIClient() apiClient.login("install", "install") // create new user, with username john and password bpm IdentityAPI identityAPI = apiClient.getIdentityAPI() final User user = identityAPI.createUser("john", "bpm") System.out.println("New user created: " + user)

Is it possible to create bonita user using script task? If possible what am I got wrong here?

How can I log into bonita engine from external java application with APIClient?

I have a program in a different server but i need to acces some of the API-s of the bonita engine. How can i do that?

I already tried:

parameters.put("server.url", "http://URL:PORT");
parameters.put("application.name", "bonita");
APITypeManager.setAPITypeAndParams(ApiAccessType.HTTP, parameters);

org.bonitasoft.engine.api.APIClient apiClient = new APIClient();
apiClient.login("user", "password");

But I always get some error like:

Notifications