Workflow Event Based Processing

Workflow Event Based Processing

Event based processing is a very powerful functionality when designing workflow applications.

Event based processing is a concept that migrated from the hardware world to the software world. In the hardware world, interrupts can be used to handle events. For example, when a USB thumb drive is plugged into a USB port, a hardware interrupt is raised to recognize it as an external drive. Most software applications have events too; when a mouse is dragged over an item or when the mouse is clicked on a button, an event is triggered. The software is programmed to listen for these events and perform certain actions when they are received.

cDevWorkflow uses the same concept to implement an Event Service Bus (ESB). Here’s how it works:

  1. Events are defined within cDevWorkflow.
  2. Event handlers are defined within cDevWorkflow.
  3. Event handlers are mapped to events.
  4. Events are published using the cDevWorkflow .Net API or the Web Service API.
Workflow Event Based Processing Manage Events

Workflow Event Based Processing Manage Events

Events can be triggered by anything that happens in an application. For example, when a Purchase Order is created in Microsoft Dynamics, an event can be triggered within cDevWorkflow to perform some activity. That activity might invoke a Workflow Instance for approving that Purchase Order. Events can be easily defined using the ESB->Event Definitions tab in the cDevWorkflow Configuration Manager.

Events can be configured with one or more event handlers. Handlers perform the actual work. Here’s an example of an event handler:

Workflow Event Based Processing Event Code

Workflow Event Based Processing Event Code

The sample event handler shown above iterates through the passed in event parameters and writes them to a temporary text file.

Event handlers can be registered using the ESB-> Event based Handlers cDevWorkflow page shown below.

Workflow Event Based Processing Manage Event Handler

Workflow Event Based Processing Manage Event Handler

One or more event handlers can then be mapped to events within the cDevWorkflow Configuration Manager, under the ESB tab. Select the event, select the handler, and map them together.

Workflow Event Based Processing

Workflow Event Based Processing Manage Event Handlers

Multiple applications are able to publish events to the cDevWorkflow ESB using the .Net API or the Web service API. All published events are persisted to the database and processed using the cDevWorkflow Event Engine.

cDevWorkflow Version 8.0 brings more visibility to the event engine processing. Here’s snapshot of the BI from an events engine instance:

Workflow Event Based Processing manage event handler graph

Workflow Event Based Processing Manage Event Handler Graph

 

Event based workflow processing is a very powerful concept when designing applications. When the timing of processes is not sequential or predictable, event based processing can be the best model to use.

Come visit us at www.cDevWorkflow.com and learn more about Event Service Bus and Workflow applications.

A small sampling of the Workflow Technology for BPM Solutions contained within our cDevWorkflow product offering can be found here: Workflow Technology That Works.

Learn more about our Process Automation & IT, QA Services or Software Development products and solutions on the Web!  Visit us at: Innovative Process Solutions