The Almo Project
Ontology-based Workflow Engine for Java
previous section:
Understanding Almo 2.0:
Adding, removing, getting and deleting elements
next section:
Integrating Almo in Java applications:
Loading and executing a Workflow

Using the Almo application: Building a Workflow with the Almo application

In this section you will learn how to use the Almo application.

Content

The Almo application

Go to the folder where you unzipped the release. Start the Almo application by executing the hydra.bat file on Windows systems or the hydra.sh file on Linux systems. The graphical interface will show up. After creating a new Almo document, you will see the panel, which allows you to build an Almo Workflow with just a few clicks.

Select the Workflow node and add a new Task labelled "t1". As implementation choose the DefaultTask offered by Almo. After the Task was added to the WorkflowConfiguration, you will see its properties at the bottom of the panel. Change its usage value to "optional".

Now add the following elements to the WorkflowConfiguration:

Label Type ParentElement Implementation Usage
o1 Operation t1 org.ontoware.almo.example.Operation1 required
t2 Task Workflow org.ontoware.almo.example.Task2 required
o2 Operation t2 org.ontoware.almo.example.Operation2 required
c1 Container t2 org.ontoware.almo.api.defaults.DefaultContainer optional
o3 Operation c1 org.ontoware.almo.example.Operation3 required
o4 Operation c1 org.ontoware.almo.example.Operation4 optional
t3 Task Workflow org.ontoware.almo.api.defaults.DefaultTask optional
o5 Operation t3 org.ontoware.almo.example.Operation5 optional
o6 Operation t3 org.ontoware.almo.example.Operation6 optional

Change the error handling property of all Operations to "collect". Your WorkflowConfiguration should look like this:

If you click the "Test" button you will get the WorkflowConfiguration which would be generated if you load the saved WorkflowConfiguration in your application.

Because we have not changed any 'include / exclude' actions, only the skeleton of required elements is initialzed. If you right-click on an element with a "(+)", a context menu will show up, that allows you to add the optional elements.

Editing 'include / exclude' actions

When the WorkflowConfiguration is initialized, you can choose the optional Tasks that should be added. Right-click on the Workflow node and add the Task "t1" to the "Default Optional Tasks".

Required elements can also add initial optional elements, that shall be added when the WorkflowConfiguration is initialized. You can only add optional elements that are children of the required ParentElement. Right-click on the Task "t2" and add the Container "c1" to the list of "Initial Optional Elements".

Optional elements leave you with more choices about what elements to include and exclude, when they are added or removed. Let us say, that we want to add the Operation "o4" to the optional Container "c1". Right-click on the Container and choose the Operation to be included, after you selected "add" as action.

Note that after selecting an element type, all optional elements of that type are displayed in the available list, which gives you the opportunity to create a very flexible behaviour of the WorkflowConfiguration. We want to use this for Operations "o5" and "o6". When their parent Task is added "o5" should be added as well:

Now let us modify in the 'include / exclude' actions in a way, that whenever Operation "o5" or "o6" is added or removed the other Operation is included or excluded. As an example we will take Operation "o5", but the same has to be done with Operation "o6", only then Operation "o5" must be selected.


After you have edited the 'include / exclude' actions, you can selected the Workflow node and display the resulting include / exclude dependency graph by clicking the button at the bottom of the panel.

If you test your WorkflowConfiguration now, you will see that not only the required elements are initialzed but also the optional elements that shall be included. If you add Task "t3", Operation "o5" is added to it as well. And if you remove the Operations "o5" or "o6" and you will see that there will always be one Operation available.

As author of the Workflow the 'include / exclude' feature gives you the chance to build a flexible and consistent Workflow. Normally, the user will not know anything about the dependencies between all elements. He will just add and remove elements. But if you take some time to modify the 'include / exclude' actions, you will always present a valid Workflow to the user, no matter what he does.

Creating a WorkflowInstance

The Almo application just allows to create WorkflowInstances from a valid WorkflowConfiguration. Use the "Create instance" button of the Test panel to add a WorkflowInstance to your Almo document.

You can not edit the WorkflowInstance directly. If you want to replace the WorkflowInstance, you have to test your WorkflowConfiguration and create a new instance from it. If you want to remove the WorkflowInstance from your Almo document, click "Elements -> Remove instance". Since we need the WorkflowInstance in the next section of the tutorial, we will not do this, but save our Almo document instead.

previous section:
Understanding Almo 2.0:
Adding, removing, getting and deleting elements
next section:
Integrating Almo in Java applications:
Loading and executing a Workflow
© 2003-2006 AIFB - OntoWare Team