This content is dedicated to our next version. It is work in progress: its content will evolve until the new version is released.

Before that time, it cannot be considered as official.

Connectors execution

What are connectors

Connectors are extension points that can be added to a process to extend Bonita Runtime capabilities. They are a piece of code having inputs defined as Expressions and outputs defined as Operations.

Execution mechanism

Diagram of the execution

Connectors execution are triggered by a Work and are executed in their own thread pool.

Connector execution

Connector timeout

For Subscription editions only.

A timeout can be configured to cancel the connector execution if it takes more than a certain amount of time.

The timeout will try to interrupt the thread executing the connector. If the code executing in the thread cannot be interrupted, the thread will not stop. In practice, it means that in this case, the connector will timeout, releasing the execution of the task that called it, but the connector executor will still try to finish executing the connector’s code, and will not be available to execute another connector. A typical example of this is if the custom code in a groovy connector falls into an infinite loop : the connector will timeout, but the connector executor will be running forever.

Connector execution with timeout

Connector failure handling

When a connector fails, it is put as failed and the exception can be retrieved using the dedicated api.

Then the connector can be manually be replayed using the activityReplay api.

On rare cases, when an error occurs on a connector and the engine is unable to mark it as failed (this might be caused by the engine being unable to get a new sql connection), the connector will automatically be retried. That is why it is best to have idempotent connector implementations.

Configuration

The size of the pool to execute connector and the timeout can be configured as described in Connector service performance tuning page