Book Image

OSWorkflow: A guide for Java developers and architects to integrating open-source Business Process Management

Book Image

OSWorkflow: A guide for Java developers and architects to integrating open-source Business Process Management

Overview of this book

OSWorkflow is an open-source workflow engine written entirely in Java with a flexible approach and a technical user-base target. It is released under the Apache License. You can create simple or complex workflows, depending on your needs. You can focus your work on the business logic and rules. No more Petri Net or finite state machine coding! You can integrate OSWorkflow into your application with a minimum of fuss. OSWorkflow provides all of the workflow constructs that you might encounter in real-life processes, such as steps, conditions, loops, splits, joins, roles, etc.This book explains in detail all the various aspects of OSWorkflow, without assuming any prior knowledge of Business Process Management. Real-life examples are used to clarify concepts.
Table of Contents (13 chapters)
OSWorkflow
Credits
About the Author
About the Reviewers
Introduction

Real-World Examples


This section shows examples of CEP within a BPM environment.

Event-based Mail Alerts

After integration with OSWorkflow, the work that is left to implement the CEP solution over a BPMS is to generate the appropriate patterns and listeners. For example, with a SendMailListener we can implement an event-based alert. Additionally, if the pattern is an EQL query, we can use it to mail process performance indicators to a manager in a real-time fashion.

package packtpub.osw.cep;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import net.esper.client.UpdateListener;
import net.esper.event.EventBean;
/**
* This listener send an email with the current data each time
* in each invocation.
*/
public class SendMailListener implements UpdateListener
{
private String host;
private String to;
private String from;
private String subject...