Human Task Versioning
Task versioning allows deployment of new version of the task on top of the existing deployed task. This allows the modification of the task after deployment to cater for changing business requirements.
In WSO2 BPS, task versioning is done at the task package level. A human task package is a self contained entity which contains the human task definition file (.ht), task deployment descriptor (htconfig.xml) and the associated WSDL files.
Task versioning at package level
When a task package is deployed, the server will generate a unique number accross the server which is used to name the extracted task package.
For example, consider we are deploying a human task package named ClaimsApprovalTask.zip. When we deploy this task package using the admin console, the package will be uploaded to the repository/deployment/server/humantasks
directory.
Once the task deployer is notified of the availability of the new task, it will generate a unique ID and extract the task package. In this example, if the above task is the first task package to be deployed on the server, the extracted task package content will be located in a directory named “ClaimsApprovalTask-1”. Additionally, the runtime task definitions will also carry this task versioning information.
When task instances are created based on this task version, those task instances will keep the versioning information such that it can be completed even after a new version of the task becomes active.
All task/notification definitions of a given human task package carry the same version number. This version number is appended to their qname which will be visible on the admin console.
Deploying a updated task on top of existing task
When a new version of the task is deployed on top of the existing task, another version of the task will be created and the older version of the task will be marked INACTIVE/RETIRED. BPS will not allow creation of new task instances from the older version of the task. However, the previously created task instances of the older task can be completed.
Any new requests coming to the task service will result in creating instances of the new task version.
Task package un-deployment
Task un-deployment is supported at the task package level. When a task is un-deployed, it will remove the following from the server.
- All the task package versions of the given task package.
- All task/notification configurations of relevance to the given task package.
- All the task instances created based on the given task package.