
## 3. **Rules For Choreography Scientific Workflow Execution**

Process Makna is a Wiki-based tool for distributed knowledge engineering. It extends the existing Makna Wiki engine with generic, easy-to-use ontology-driven components for collaboratively authoring, querying and browsing Semantic Web information. The architecture of Makna consists of the Wiki engine JSPWiki (http://www.jspWiki.org/), 
extended with several components for the manipulation of semantic data, and the underlying persistent storage mechanisms. A more detailed description of core Makna Wiki and the user interfaces it supports can be found in [DPT06]. 

For this work we integrated the semantic Wiki Makna and the workflow engine jBPM
(jboss.com/products/jbpm) and the RuleML Rule Responder ESB middleware (responder.ruleml.org/). The architecture of the distributed system with jBPM and Makna consists of a J2EE server, J2SE server(s), and a workstation and AllegroGraph triple store server (agraph.franz.com/) that serve as persistence stores. In this section we consider the aspects of this integration which were implemented for Process Makna.

## 3.1 Semantic Workflow Annotation And Rule Integration

It is necessary to reflect the workflow instances (e.g. tasks and processes) in the semantic model in order to support search for and enhanced presentation of tasks and processes. 

The insertion of workflow concepts into the semantic model at runtime has two prerequisites: first, a mechanism must be provided which assigns the URIs of the ontology concepts to the scientific workflow models and the domain-specific workflow instances; second, these URIs must be made accessible in the process execution definitions. This integration of ontologies has the advantage of allowing access to existing domain specific glossaries, taxonomies and ontologies from within the processes. Different scientific vocabularies, e.g. from different research domains, can be mediated via the semantic inference capabilities. With these prerequisites met, semantic decoration of workflow execution can be performed with standard jBPM procedures.

While traversing a process graph the engine fires events (event messages) - e.g. processstart, process-end, task-start, *task-end* and *task-assign* - which are associated with reaction rules which trigger custom actions. In our rule-based extension for Process Makna arbitrary complex scientific workflow logic can be declaratively represented in terms of combinations of derivation and reaction rules which associate the workflow events with conditions (implemented as derivation rule sets) and actions that perform e.g. RDF update queries based on URIs for workflow instances, i.e. the progress of a workflow can be reflected in the semantic model.

## 3.2 Semantic Flow Conditions

Facilitating semantically enhanced flow conditions in the process execution phase is desirable, because inference allows for transitions and control flow, based on the description of a workflow in the semantic model itself. jPDL and BPEL already support