Improved support of workflows with plugin
When starting an activity from a plugin, OFS will dynamically determine the associated workflow based on configured conditions; similar to the behavior when starting activities directly within OFS. A workflow may also be set by a plugin for activities in "Pending" and "En Route" statuses. Previously, plugins could only set the workflow for an activity via an incoming API call.
Configuration
As the very first step, customers should properly configure the application. It is required add the 'Activity workflow' into the 'Available properties' for the plugin which will deal with workflows.
The application will use this field to store a label for a workflow, hence keep the activity to workflow association.
Dynamic workflow calculation
To realize the advantage from this feature, clients have to simply use a plugin to start activities and configure workflow conditions. Then the application will automatically do the following:
- It will calculate workflows based on values of activity fields, properties and updates passed from the plugin when performing the action.
- It will associate a workflow with an activity as it is set to Started.
Supported actions
The following actions via Plugin API Framework are supported:
start activity
create started activity
Info
The application will dynamically calculate the workflow and establish the activity to workflow association when the 'Activity workflow' field (which maintains this association) is empty.
Set workflow from plugin
It is possible to directly set the workflow label from the plugin. For this, you'll need to implement the logic to define the workflow and pass the workflow label to the application. Similar to how it works for other APIs, it will be possible to set the workflow for activities in 'Pending' and 'En route' statuses.
Supported actions
The following actions via Plugin API Framework are supported:
update activity
create activity
start activity
create started activity
The feature will reduce integration effort and decrease 'time to production' for workflows via the embedded 'no code' capabilities of the application.
Another benefit of the feature is that now customers can encapsulate the logic related to workflows within plugins and, as a result, directly set the workflow from the plugin.
Steps to Enable
To enable the feature it's required to add the 'Activity workflow' field into the "Available fields' within the configuration of the plugin.
If the field is not added, then the system won't be able to associate a workflow with an activity, neither when it's dynamically calculated nor when specifying it from the plugin.
Tips And Considerations
The functionality to set workflows via public APIs within activity 'create/update' commands will remain the same for now. Therefore customers won't have to change their integrations upon the update to the new release.