StartProcess - Assign a Process automatically when one user...
Hi there,
I remember reading about how to StartProcess (through code) and it would be automatically assigned to a User when there was only one user possible to execute it.
can someone who knows what I'm talking about point me to where to find it again...then I can use it...
Many thanks and best regards Seán
You can use Bonita Engine API (using Bonita Java Client library) or Bonita Web REST API to start a process instance programmatically.
- For the first option checkout: http://documentation.bonitasoft.com/enable-process-and-start-instance
- For the second option checkout: http://documentation.bonitasoft.com/web-rest-api-examples-0#start_case_w...
When you create process instance programmatically it will skip the case start form. The process will be executed until it reach a blocking event (e.g. intermediate timer event) or a human task.
In order to automatically assign a task to a user you need to use a filter that will return exactly one user id.
The filter also need to be configured to auto assign the task if filter return a single result (method shouldAutoAssignTaskIfSingleResult
of the filter).