The Taskana Adapter syncs tasks between TASKANA and an external workflow system, e.g. Camunda BPM. In this document, we call a task in the external workflow system 'referenced task'.
The adapter periodically performs the following work::
- retrieve new referenced tasks and create corresponding Taskana tasks
* retrieve newly created referenced tasks
* get the task’s variables
* map referenced task to Taskana task
* create an associated Taskana task
* remember the tasks created in the adapter’s database - retrieve finished referenced tasks and terminate corresponding Taskana tasks
* retrieve finished referenced tasks
* terminate corresponding Taskana tasks - retrieve finished Taskana tasks and complete corresponding referenced tasks
* retrieve finished Taskana tasks
* complete the corresponding referenced tasks in the external system - cleanup Adapter’s database tables
* delete aged entries from the adapter’s database tables
The adapter is structured in an adapter proper that controls the logic and two SPI:
- The SystemConnector SPI that connects to the external system and
- The TaskanaConnector SPI that connects to the taskana system.
The component structure of the adapter is as follows
...
The adapter. Implements the sync algorithm and defines
the service provider SPIs and APIs for
- SystemConnector (connects to the external system)
- TaskanaConnector (connects to taskana)
These connectors are plugged in at runtime via SPI mechanisms
...
Sample implementation of SystemConnector SPI
.
Connects to a camunda systems via camunda's REST API
...
Notes
...
General Architecture
The TASKANA adapter serves as a bridge to all systems in the enterprise, where tasks originates froms. While it is always possible to directly create tasks in TASKANA using the API, there are use cases where a (bidirectional) synchronisation is required. For example:
- BPM / workflow systems
- Packaged applications with an included task component (like ERP, CRM, ...)
The TASKANA adapter provides a generic design to allow to connect to almost any kind of software.
Drawio | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
The adapter implements the general synchronisation algorithm. Both types of connectors are loaded through an SPI.
Task System Connector
The Task System Connector is the connector to the central task management system, which will typically be TASKANA. However, due to the generic design, you could attach any other system as well. Since TASKANA is meant to pool all tasks from various source systems, there is only one Task System Connector per Adapater instance.
There is a default implementation of Task System Connector to connect to TASKANA directly using the Java API. This way the Adapter and TASKANA will be synchronized using a shared database. (see TASKANA Connector)
If TASKANA is embedded into your own application or wrapped in your own services, you can implement your own Task System Connector to make use of your own API instead of directly creating tasks in TASKANA. This makes sense if your API implements additional functionality.
System Connector
The System Connector is responsible to retrieve tasks and their metadata from the source system and to complete them in the source system, once they are completed in TASKANA.
You can have as many System Connectors as you like. TASKANA picks up any Connector it finds on the classpath and processes further on.
There is one default implementation for Camunda BPM, as most of the TASKANA users use Camunda BPM as well. (see Camunda BPM Connector) But the Adapter is designed to be extendable. You can easily build your System Connector by implementing the SPI.