« IX Modeler - new... | Main | Building a Workflow... »

Building a Workflow Application - Part I

Please read the new and updated tutorial of how to build a Imixs Workflow Application:

http://workflow.imixs.org/roller/imixsworkflow/entry/building_a_imixs_workflow_webapp


The following Tutorial I will explain how easy it is to build a Workflow Application using the IX Open Source Workflow Components. The Tutorial is divided into three parts:

I assume that you are familiar with Java development and also a little bit with JEE. But you need not to be a JEE expert to follow this tutorial. I use Maven to simplify the build and deployment process so you can setup a project very fast.

My goal is to develop a Callcenter application - very simplified. As this application should be workflow centric I use the IX JEE Workflow components to implement a human based workflow application. Users can create new tickets and a support team can accept these tickets and hopfully solve the tickets in a appropriate time. The business process behind the scene can be modeled using the IX Workflow Modeler and so the application is very easy to configure at runntime.

The application can be downloaded directly from the Subversion repository on our java.net project homepage.

Go to the following repository location to checkout the Maven Project

https://ix-workflow.dev.java.net/source/browse/ix-workflow/examples/org.imixs.callcenter/trunk/

If you have questions or feedback please post you comments.

The Environment

To start the development it is necessary that you have installed a Glassfish Server and also the Eclipse IDE. You can also work with other IDEs like Sun NetBeans which is very cool managing Maven Projects! But as we also need to model the business process we need an Eclipse IDE as well.

As I am building a Workflow Application I also need a Database and a User Management. You can setup these parts easily using the Glassfish Web Admin Console. We support an Installation Guide on the project homepage. This guide explains how to setup a database pool  and a default user group with different roles.

After you have installed and configured the Server you continue to install the IX Workflow Modeler and the Eclipse Maven2 Plugin. Both are Eclipse Plugins which can be installed easily using the Eclipse Update Manager. To install the IX Workflow Modeler use the following Update Site:

http://www.imixs.org/org.imixs.eclipse.updatesite/

A detailed Installation Guide can be found here.

Also the Maven2 Plugin can be installed using the Eclipse Update Manager. Informations about Maven2 and Eclipse can be found here.  I also have written a Blog about how to install Maven2 in Eclipse Ganymede.

Creating a new Maven Project

As explained before I use Maven to develop this application. Maven is a build an configuration tool which makes it easy to develop JEE applications. You need not to care about libraries and configuration of artifacts. This is done by the magic of maven.

So first setup a so called parent project. This project will include all the parts of the application I build during this tutorial.

Choose new project and select in the Wizzard "Maven->Maven Project"

 

Select "Create a simple Project" and skip the archetype selection.

 

Define a new Group and Artifact ID for your project and select "POM" for the Packaging (this is important to create a parent project)


Now you have the groundwork for your JEE workflow application.

Create a Workflow Model

Now as you setup your Environment you can start to create a Workflow Model. The Workflow Model is the beginning of a Workflow Project. Here you define the behavior of the Business Process for your application. In large projects it is useful to describe a business process formal using a general business modeling tool. But now I start modeling directly in the Imixs IX Workflow Modeler.

You can create you new Model file in the /src/ folder of your maven parent project. Create a new folder /workflow and create a model file "model.ixm". You can use the New Wizzard or simply create a empty file "model.ixml".
When you open this file you see the IX Workflow Editor:

 

Now I create a new Process Group called "ticket" and add three  Process Entities 

  • new Ticket
  • in process
  • closed

You will find a full description how to model a business process on the IX Modeler project Page.

After all you model can look like this:


 

You will find the model also in the subversion repository explained at the beginning. 

Now the first Part of our Tutorial is finished.

You have setup a Environment and created a new workflow model. Next we will create a Business Logic by implementing an EJB 3.0 statless session bean.