Menu

Adapters

Maciej Swiderski

Introduction

As mentioned on the home page for Simulation Engine, core is independent of process diagram format. To achieve such flexibility adapters were introduces.

The role of adapter is to simple provide implementation of interfaces that can be understood and processed by the engine. To name few (detailed description will be provided in Developers guide section):

  • Process Element
  • Process Definition
  • Process Definition Loader

Of course complexity of the adapter depends on the provider that will be be used as back end for the adapter ( for instance Activiti Engine). So it can be as simple as implementing 4 or 5 classes or it could lead to rather significant amount of classes to achieve requirements of the engine.

Main development focus is on BPMN2.0 diagram format so first adapter is based on Activiti process engine. To verify that engine is capable of handling various process diagram formats another adapter was introduced - JBPM 4 (the choice was easy - I contributed to JBPM 4 so initial research on possibilities was not so time consuming ;))

Build custom adapter

To build a custom adapter several requirements must be met:

  • package of the adapter must contain META-INF/process-simulation file
  • it must provide implementation of ProcessDefinitionLoader interface that is used to read process diagram file
  • implementation of ProcessDefinitionLoader must be annotated with SimulationComponent annotation that has unique identifier and adapter name
  • it must provide implementation of ProcessDefinition interface
  • it must provide implementation of ProcessElement interface

NOTE: These are minimal requirements to make simulation engine aware of new adapter.


Related

Wiki: Simulation Engine

Discussion

Anonymous
Anonymous

Add attachments
Cancel