I’m looking at the java API documentation, and I have not found any way to execute a task setting its contract inputs values at the same time ?
The goal is to design processes with human tasks, using the contract variables to define what should be user’s input, but execute them from external systems (exposing web services in our case).
Hello.
In deed, this seems to be the solution. I’ve seen the API operation before, but I didn’t understand that it involves the task’s contract inputs.
We’re still at a pre-design step, and we’ll do the first prototyping code in few weeks.
I keep your advice and I’ll come back to tell you about our results.
Thanks a lot.
Regards.
Here is a short example of how to execute a task with some contract inputs (note the task need to be assigned to the user, this is why we use assignAndExecuteUserTask method instead of executeUserTask):
HashMap<String, Serializable> book = new HashMap<>();
book.put("title", "A book title");
book.put("summary", "A book summary");
Map<String, Serializable> contractValues = new HashMap<>();
contractValues.put("aBookInput", book);
apiClient.getProcessAPI().assignAndExecuteUserTask(apiClient.getSession().getUserId(), 200002L, contractValues);
// 200002L is the id of the task in my example
If you need more help on this topic please create a new question. Thanks.
Thank you antoine. Its working for me.
I am building a custom page to show all pending tasks for a users and complete them in one attempt.
This will help me a lot.
Bonitasoft empowers development teams with Bonita, the open-source and extensible platform to solve the most demanding process automation use cases. The Bonita platform accelerates delivery of complex applications with clear separation between capabilities for visual programming and for coding. Bonita integrates with existing solutions, orchestrates heterogeneous systems, and provides deep visibility into processes across the organization.