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

JWT2XPDL

Presentation

This transformation reads a JWT workflow and writes a XPDL 1.0 file, adapted to Bonita.

There are two XSLT files involved into this transformation:

  1. jwt2xpdl-part1.xsl: add missing names to each element (required by XPDL).
  2. jwt2xpdl-part2.xsl: do the transformation.


Element mapping

JWT XPDL
elements[@xsi:type = 'organisations:Role'] Participant
elements[@xsi:type = 'data:Data'] DataField
elements[@xsi:type = 'application:Application'] Application
elements[@xsi:type = 'processes:Activity'] WorkflowProcess
nodes[@xsi:type = 'processes:StructuredActivityNode'] ActivitySet
nodes[@xsi:type = 'processes:ActivityLinkNode'] not supported
nodes[@xsi:type = 'processes:InitialNode'] nothing
nodes[@xsi:type = 'processes:Action'] Activity
nodes[@xsi:type = 'processes:DecisionNode'] Activity/Route
nodes[@xsi:type = 'processes:ForkNode'] Activity/Route
nodes[@xsi:type = 'processes:MergeNode'] Activity/Route XOR
nodes[@xsi:type = 'processes:JoinNode'] Activity/Route AND
nodes[@xsi:type = 'processes:StructuredActivityNode'] Activity/BlockActivity
nodes[@xsi:type = 'processes:FinalNode'] Activity/@name="BonitaEnd"
edges Transition
edges/guard Transition/Condition

Extended attributes for Bonita

Some extended attributes are usefull to ProEd (the Bonita's XPDL editor) in order to locate graphical items or associate Java class to activities (hooks).

Name Value
Package/ExtendedAttributes:
MadeBy JWT2XPDL
View Activity
Activity/ExtendedAttributes:
XOffsetParticipantView 0
YOffsetParticipantView 0
XOffset Location/@x
YOffset Location/@y
CellHeight Size/@height or 30
CellWidth Size/@width or 150
hook @executedBy if the value starts with "hero.hook."

Other extended attributes

The following extended attributes are not used by Bonita but keep some data present in the JWT file who may be usefull to other workflow engines.

Name Value
Participant/ExtendedAttributes:
icon elements[@xsi:type = 'organisations:Role']/@icon
DataField/ExtendedAttributes:
icon elements[@xsi:type = 'data:Data']/@icon
Application/ExtendedAttributes:
jarArchive elements[@xsi:type = 'application:Application']/@jarArchive
javaClass elements[@xsi:type = 'application:Application']/@javaClass
method elements[@xsi:type = 'application:Application']/@method
icon elements[@xsi:type = 'application:Application']/@icon

Limitations

  • Process properties and activity properties: all the JWT data are translated into process properties, there is no activity properties.
  • Participant type is always HUMAN, the other types are unavailable (ROLE, SYSTEM, RESOURCE, RESOURCE_SET, ORGANIZATIONAL_UNIT). To choose ROLE and mapper (for Bonita: LDAP, custom or properties), edit the XPDL file with ProEd.
  • Hook: a hook is added only if the package begins with "hero.hook.". The event is always "afterTerminate": there is no way to choose other events like onReady or onStart.
  • Cycles are not translated into iteration: the transformation should replace the last transition of cycles by an iteration. Without iteration, Bonita can not import a XPDL containing a cycle.
  • Subprocess calls are not supported. You can use an embedded suprocess, wich is translated into a block activity.

Samples

There are samples in the CVS : org.eclipse.jwt/transformations/jwt-xpdl/samples.

You can open the *.workflow files with the JWT Workflow Editor and the *.xpdl files with ProEd or an other XPDL editor.

The file jwt-xpdl/samples/jwt2xpdl/samples.csv contains the result of the tests executed with the sample files: the date, if it loads in JWT, ProEd and Bonita, if it performs in Bonita, the users and hooks needed.

Back to the top