Integrating Workflow With Activiti

Authored by: Phil Rhodes, Senior Consultant at Open Software Integrators

“Workflow Engines” or “BPM” systems are quite a trendy topic these days.  Everywhere you turn, somebody is talking about BPM, BPMS, or Workflow.  So, what is all this stuff?  And how can you implement it in your organization with minimal expenditure and up-front risk?   These are some of the questions we will examine in this article.

To get started, let’s look at what a “Workflow Engine” is.  A Workflow Engine or Business Process Management System (BPMS) allows an organization to define and execute pre-determined processes in response to relevant business events.  For example, an insurance company might start a process which validates address information; calculates available coverages and rates; and then prints a batch of physical documents for delivery in response to an “Application Received” event.  Similarly, a firm might start a “Vacation Approval” process in response to a document being uploaded to a Document Management System or an email being received.  When combined with Natural Language Processing technologies that extract events from unstructured or semi-structured text documents; it can enable a tremendously powerful level of automation for a company.  Automation can both speed processing and reduce costly mistakes. Ultimately, it will improve productivity by allowing computers to do the mundane work wasted on knowledge workers.

How can you test the BPM waters without exposing yourself to significant costs or risk?  One tactic is to utilize one of the many freely available Open Source BPMS projects.  For a firm looking to dip its toes in the BPMS world, several high quality Open Source workflow systems are available.  Utilizing an OSS platform means a company can get started with BPMS, evaluate the technology, and realize some of the gains from adopting automation, without spending an arm and leg enriching IBM or Oracle.  Later, if commercial support is required for the system, support is available for a number of vendors and consultancies.  As is always the case with OSS, support from the community, via forums, mailing lists and Stackoverflow is also an option.

Activiti, compared to other widely available workflow engines, seems to have the bulk of the mindshare at the moment.  Activiti is a Java based engine licensed under the Apache Software License v2, and is developed and supported by a vibrant community of BPM developers and enthusiasts.  It supports of the industry standard, BPMN2 (Business Process Modeling Notation 2) and a customizable Process Virtual Machine underneath which allows for seamless integration of workflows into enterprise applications of any sort.

Activiti can integrate with any commonly encountered enterprise messaging system, thanks to built in support for Apache Camel.  Camel is an Open Source Message Routing and Mediation engine with support for JMS, FTP, SMTP, HTTP, JBI, SOAP Web Services and, basically, any message exchange protocol you are likely to need.  Camel integration ensures that you receive messages from a service bus or message queue and automatically launch a BPMN process, passing the data received from the source message right into the process instance.  Once launched, the process instance can invoke other web-services; execute scripts written in Javascript or Groovy or wait for a human to mediate problematic situations by branching into a UserTask.

If a process needs to “go human” this is where the power of Activiti’s rich Java API shines through.  You can easily build whatever kind of user interface you need, to allow your human operators to search for, claim, operate on, transfer, escalate, and close User Tasks.   Custom variables can be assigned to these tasks to enable highly specific searches.  For example, an “expectedTransactionValue” variable can be attached to a Task, and a search can allow users to select tasks with an “expectedTransactionValue” that is either: equal to, less than or greater than a user supplied value.  Form variables can also be associated with User Tasks allowing for convenient programmatic construction of web-forms to manipulate the tasks.  The Activiti APIs are flexible enough to allow you to embed BPM interactions into existing CRM or ERP systems like Siebel, SAP, Peoplesoft or into entirely custom built applications.  If you prefer to work in something other than Java, of course there is also a REST API, which is completely language neutral.  You can also get creative with the Activiti APIs, and integrate workflow tasks into an Enterprise Social Network, Document Management System, Case Management System, or anything else that makes sense for your process.

Maybe you don’t want to build your own UI, or integrate with CRM, ERP, etc.. The Activti Explorer is a lightweight web-based management console which runs in Tomcat or other standard Servlet containers and allows users to login, view, claim and complete tasks, and examine the state of running processes.  Activiti also features an Eclipse based modeling / design tool which allows business analysts and process experts to design the business process in BPMN2, without needing to know, or touch, any Java or low-level code.   

In short, for a firm looking to achieve a higher level of operational excellence through automation, BPM using an Open Source workflow engine like Activiti is an excellent starting point.  Build your BPM process on Activiti without paying exorbitant license fees to a proprietary vendor, and - if Activiti ever proves to be inadequate in some way - rest easy knowing that your BPMN2 processes can easily be migrated to another standard process engine, whether it’s another Open Source engine like jBPM, or a proprietary offering like IBM Websphere Process Server or Oracle BPM Suite.  

Should you need help getting started or if you are struggling with a partially implemented BPM solution, consider Open Software Integrators.  Our team of masterful consultants and architects possess the comprehensive depth of knowledge and experience of the OSS development stack.  We can help guide your project to a successful conclusion and provide support and services for any of your future initiatives.  

Wanting more...check out Phil's blog and learn how to benefit from open source Natural Langauge Processing.

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
Are you for real?
Image CAPTCHA
Enter the characters shown in the image.