The document describes an OSGi-based workflow engine used in the Remote Component Environment (RCE) platform. The RCE is used for coupling tools from diverse technical disciplines in aircraft design. The workflow engine exposes workflow components as OSGi services and uses declarative services to manage component factories. It also includes a workflow component registry to store information about available components extracted by instantiating them. Workflows are created by connecting component inputs and outputs, then instantiated by starting the components.
1. OSGi-based Workflow Engine
Doreen Seider (German Aerospace Center (DLR))
OSGi DevCon London 2010
Slide 1
OSGi-based Workflow Engine > Doreen Seider > February 22nd 2010
2. Outline
Background (Use Case, Platform Providing the Workflow Engine)
OSGi-based Workflow Engine
Characteristics of Workflows
Usage of Declarative Service Concepts
Slide 2
OSGi-based Workflow Engine > Doreen Seider > February 22nd 2010
3. Use Case: Preliminary design of new airplanes
Involvement of many different technical disciplines
Goal: Optimal global design
Therefore: Coupling of tools from diverse disciplines needed
Slide 3
OSGi-based Workflow Engine > Doreen Seider > February 22nd 2010
4. Remote Component Environment (RCE)
General purpose, distributed software integration platform
Provision of base software components
Based upon OSGi (Equinox) and Eclipse RCP
Application-specific Software
Custom Bundles
Tool A Tool B …
Framework with provided Bundles
RCE
Workflow GUI Data
Privilege Notification Distribution
Slide 4
OSGi-based Workflow Engine > Doreen Seider > February 22nd 2010
5. Remote Component Environment (RCE)
Distribution Bundle
Each OSGi service is accessible from a remote RCE platform
On each platform a proxy object for a remote service can be created
RCE
RCE
RCE
Slide 5
OSGi-based Workflow Engine > Doreen Seider > February 22nd 2010
6. Characteristics of a Workflow
In the RCE Context
Data-based control flow
Data channels between components
1 component consists of n inputs and m outputs
1 output is linked with 0..1 input
Configuration map for each component instance
mess = „pong“
count = 6
mess = „ping“
count = 17 Comp B
Comp A Comp B
Comp C
Slide 6
OSGi-based Workflow Engine > Doreen Seider > February 22nd 2010
7. Function of a Workflow Engine
Fit into the RCE distribution concept
Expose components (and workflows) as OSGi services
Manage basically available components
Which are installed?
How do they look like?
Describe them declaratively
Support multiple instantiation of components
Provide them via Component Factories
Slide 7
OSGi-based Workflow Engine > Doreen Seider > February 22nd 2010
8. Provision of Workflow Components
Each workflow component is realized as DS Component Factory
Service Component Description (of Comp B):
<?xml version="1.0"?>
<component factory="de.rcenvironment.rce.component" name="Comp B">
<implementation class="de.rcenvironment.samples.CompB"/>
<service>
<provide interface="de.rcenvironment.rce.component.Component"/>
</service>
[properties]
</component>
Slide 8
OSGi-based Workflow Engine > Doreen Seider > February 22nd 2010
9. Provision of Workflow Components
Required information: inputs, outputs, expected configuration
Declared as properties of the DS Service Component:
<property name="component-inputs" type="String">
myInputOne:java.lang.String
myInputTwo:java.lang.Integer
</property>
[component-outputs]
<property name="component-configuration" type="String">
mess:java.lang.String
count:java.lang.Integer
</property>
Slide 9
OSGi-based Workflow Engine > Doreen Seider > February 22nd 2010
10. Management of Workflow Components
Workflow Component Registry
Realized as DS Service Component
Inject Component Factory of type de.rcenvironment.rce.component
Custom bundle Manifest header: RCE-Component („auto-deploy“)
<component name=„Workflow Component Registry">
[..]
<reference name="de.rcenvironment.rce.component"
interface="org.osgi.service.component.ComponentFactory"
bind="addComponentDescription"
unbind="removeComponentDescription"
cardinality="0..n"
policy="dynamic"
target="(component.factory=de.rcenvironment.rce.component)"/>
</component>
Slide 10
OSGi-based Workflow Engine > Doreen Seider > February 22nd 2010
11. Management of Workflow Components
Workflow Component Registry
How to differentiate diverse workflow components?
- No way but instantiation in order to get the implementing class
How to retrieve the required information (declared as properties)?
- No way but instantiation in order to get the properties
Bind method
Instantiate component
Pull all needed information to manage appropriate component
Add component (model object) to registry
Dispose component instance
Unbind method
Remove component (model object) from registry
Slide 11
OSGi-based Workflow Engine > Doreen Seider > February 22nd 2010
12. Creation of Workflows
Retrieve all workflow components and its characteristics from the
Workflow Component Registry
Slide 12
OSGi-based Workflow Engine > Doreen Seider > February 22nd 2010
13. Instantiation of Workflows
Straightforward Iterations = 5 mess = „ping“
count = 17
Instantiate components
Connect in- and outputs Comp A Comp B
Start components
Noteworthy
Instantiate component with additional property (unique ID)
Register each workflow object as OSGi service (with unique ID)
Slide 13
OSGi-based Workflow Engine > Doreen Seider > February 22nd 2010
14. In a Nutshell
Slide 14
OSGi-based Workflow Engine > Doreen Seider > February 22nd 2010
15. In a Nutshell
Slide 15
OSGi-based Workflow Engine > Doreen Seider > February 22nd 2010
16. In a Nutshell
Slide 16
OSGi-based Workflow Engine > Doreen Seider > February 22nd 2010