Integrating Applications

You can model both manual activities and activities supported by your applications in the Infinity Process Workbench. The latter can be performed via an application integrated in your system. Integrated applications can be for instance SAP applications, Enterprise JavaBeans™ or JavaServer Pages™. In this tutorial, you will use the Infinity Process Platform Workflow Execution Perspective of the Infinity Portal. to assist with automatic generation of a JSF browser user interface. Application activities will be used for Java code integration and e-mail notifications.

Adding Sources to the Project

To use this tutorial for hands-on learning you need the classes from the org.eclipse.stardust.examples.supportcase package which you can find in the support-case/src folder of the provided support case example. In case you have not yet downloaded the example ZIP file, click the following link to get the needed resources:

You find the resources in folder support-case.

This package has been designed to use the Spring JTA local mode. The business logic and the application functionality within Infinity Process Platform will be demonstrated here.

To make the classes available in the project you can add the source files to your project:

Add Sources to Project
Figure: Add Sources to Project

Figure: Browse to the Source Directory

After the import is done you can access the class files in the src folder. If you like you can change them or add additional class files to extend the tutorial process model.

Src Folder Structure after Import
Figure: Source Folder Structure after Import

Configuring an Application

Our example needs to integrate applications implemented as plain Java beans to manage their support process. The applications are available as the following Java classes:

To integrate them in your workflow model, you create an application object by using one of the following:

Now create a Plain Java Application as the needed application for the Init Data activity.

Application selection
Figure: Adding an Application to the Process Definition

Either of these two steps will place an application icon on the canvas. Drag the application icon, Plain Java Application 1, and drop it near the Init Data Application Activity.

Setting up Applications

Applications represented in your model are invoked at process execution time by the workflow management system and support the processing of activities to which they are assigned.

Support Case Application

To set the properties of the created application and assign it to the activity Init Data:

App prop dialog
Figure: Application Properties Dialog

In this ACME example, the SupportCase class creates a data object which will represent the case as it progresses through the workflow. This is a popular pattern for Infinity Process Platform applications, though there are many other ways the solution can be implemented.

Proceed with the assignment of the application to the activity Init Data:

Connect Application Activity
Figure: Assigning an Application to an Activity

The Java Factory application is now configured and assigned to the activity Init Data

Notification Application

Then create a second application named Notification also as a plain java application.

Properties for Notification Application
Figure: Integrating a Plain Java Bean

Proceed with the assignment of the application to the activity Notify Customer:

Connect Application Activity
Figure: Assigning an Application to an Activity

The Notification application is now configured and assigned to the activity Notify Customer.