Reputation: 118
In jBPM I have a process that contains a human task. This human task is used to populate a custom data object.
With the jBPM REST API, you can complete a task with parameters like so:
localhost:8080/jbpm-console/rest/task/93/complete?map_price=1800
And the process will have a process variable "price" with value 1800.
But how can you send a custom data object?
My object is called "expense" and if I complete the task manually in jbpm-console using the form, the variable expense in the process has the value "expensetest.Expense@33d6ffc0"
My guess is I'll have to provide this data object in the body of my POST but I can't seem to get it working. Perhaps I'm missing a step?
Upvotes: 1
Views: 1457
Reputation: 2918
The task/{id}/complete REST url only supports simple data types. To use custom data types, you should use the /execute operation. This supports (de)serializing Java Objects to XML using JAXB.
Upvotes: 2