As mentioned in our previous post about managing controlled documents in Alfresco, Active Wizard 5.0 utilizes the Activiti BPM platform for dynamic workflow processes. If you’re curious about how dynamic workflow works in the Active Wizard, check out this post from earlier this year, which we wrote after we had posted our initial thoughts about Activiti. In this post, we will review how Dynamic workflow has worked in the Active Wizard in the past, and contrast that to how we’re using Activiti in Active Wizard 5.0.
If you’re interested in a live demo of Active Wizard 5.0, check out the following screencams in the TSG Learning Zone:
Active Wizard 3.4 to 4.0 – Dynamic Workflow with Documentum
In 2004, TSG developed the first iteration of the dynamic workflow module in the Active Wizard’s 3.4 release. At the time, jBPM and Documentum BPM were in their infancy, and frameworks like Activiti did not exist. So we built the workflow on Documentum’s standard workflow engine, which made sense since, at the time, Active Wizard was built on top of Documentum. The first design decision we had to make was how to structure the workflow template. For the reasons mention in this post, we chose to implement dynamic workflow by building the workflow template on the fly each time a workflow was started. This approach was great because we could handle an infinite number of workflow configurations, while also handling any requirement changes in the business rules rather than requiring any updates to the underlying workflow template. There are a few downsides with this approach, however:
- A new template is created when a workflow starts, and is orphaned when the workflow ends. This limitation is easily mitigated. We simply include a job that cleans up orphaned templates each night.
- User-based, group-based, and automatic activities cannot be executed in parallel. In other words, you cannot send a task to a user and a group at the same time. We could have accounted for this, but the order of magnitude change in complexity on the infinite possibilities of workflow templates to generate did not pass the cost/benefit analysis.
- New templates limit reporting capabilities. Since we are generating a template each time, there is no way to report by workflow template. Cycle time reporting can be done, however, based on document metadata like creation date, approved date, etc.
Active Wizard 5.0 – Dynamic Workflow with Activiti
Dynamic workflow in Active Wizard for Alfresco was built from the ground up using the Activiti workflow engine included with Alfresco 4.x. With a fresh start, we took another look at how dynamic workflow could work with the latest BPM technologies. Utilizing Activiti, we were able to retain all of the Active Wizard’s dynamic workflow capabilities, while only using one template. This is great because now we don’t need to generate a template on the fly anymore. In fact, all three of the above limitations on our dynamic workflow approach in Active Wizard 3.x and 4.x are cured by Activiti.
The approval workflow template is actually structured using two workflow templates. The first template acts as the main process template while the sub-process is where the actual user activity is defined.
For our first Active Wizard 5.0 client, we only implemented user-based tasks. However, it will be easy to incorporate group-based and automatic tasks to the sub-process template in the future. Once that is in place, we’ll be able to handle sending user, group and automatic tasks at the same time.
And, now that we’re not generating a template for each workflow instance, all of Activiti’s built-in workflow reporting components will work out of the box.
Along with the features mentioned in the above section, we’d love to get current Documentum customers’ thoughts on dynamic workflow for Activiti. Since Activiti can be deployed as a standalone workflow engine, it would be possible for us to utilize it in a Documentum environment. While it would be possible to build something like the above solution using Documentum’s BPM product, it would require additional licenses whereas Activiti is open source. Whether you’re a Documentum or Alfresco client, let us know your thoughts below on dynamic workflow and Activiti.