Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

JWT Transformations (up to JWT 1.2.0 included)

Revision as of 12:06, 5 March 2008 by Mickael.istria.openwide.fr (Talk | contribs) (Architecture)

Terminology

In this page, transformation will stand for a transformation of a workflow from one standard to another.

Since JWT workflow file type is the core of this project, the term import will stand for transformations that produce a JWT workflow file, and the term export will stand for transformations that produce a description of a workflow into another format, from JWT.

Aim

The aim of transformations is to make possible to use workflows designed with JWT in another contexts. While JWT workflow file format is not a standard used by other workflow editors, engines, etc..., it is necessary to give to JWT the ability to export workflows to use them elsewhere, and to import other workflow description file types not to discourage users that would migrate from external workflow editor to JWT.

Transformations are the basis of compatibility.

Transformations will be used when we will implement a function that will deploy the JWT workflow on a workflow engine only with a few clicks...

Architecture

To facilitate the add of a transformation, we chose to use the extensions-based Eclipse plug-in architecture, as described by the picture:

JWT Transfo archi.jpg

When the plugin is started

Activator is called on the generic transformation plug-in. This activation calls the ProcessServiceMember.process method, which will get all informations to get informations from the extension point and add it to a registry that will be use later. (This mechanism is done as explained at http://www.eclipse.org/articles/Article-Plug-in-architecture/plugin_architecture.html) This part of the code is used only once, at activation.

When a transformation is called

The method that handle the call just has to call TransformationsRegister.getInstance.getTransformation(transformationName_defined_in_extension).transform It is aimed to have one or several generic handlers that would be defined in generic plug-in, to unify transformations that have the same goal (export to model, export to execution platform compliant type...)

Extensibility

If necessary, it is easy to add some metadata to a transformation. To do it, just had an attribute to the extension point, add it as an attribute to the transformationService class, and set it when you load the extension is ProcessServieRegistry.

How do I add a transformation to JWT?

Nothing is easier!

Of course, it requires org.eclipse.jwt.transformation.base plug-in.

You just have to implement a class that extends TransformationService, with its method transform (that will be called to apply the transformation). Then, you create an extension for the extension point org.eclipse.jwt.compatibility.transformations that defines a name for your transformation and the class that implements the transformation (extending TransformationService), and more other optional fields.

Take a look at the extension of StubTransformation from JWT repository to give you a concrete example.

Transformations Gallery

Here are the file types that are already compatible, ore that will soon be, with JWT

XPDL

Only export JWT to XPDL is available. But there are some errors...

BPMN

Export

Export is starting to work well, but there are still some errors.

Import

Import does not work at all for the moment

Back to the top