AnsweredAssumed Answered

Converting business friendly attributes to a JUEL Expression in Activiti

Question asked by jwestra on Aug 16, 2016
We want to use more 'business-friendly' (BF) terms in the designer and have them translated into Activiti juel expressions for execution at runtime.  For instance, the designer would offer a business process modeler person, "Event" as an entity and "Name" as an attribute of the Event instead of "eventDTO" and "nameTxt", which are very development-specific.

The individual would be able to choose "Event.Name" and do something like stick it in the subject of a MailServiceTask.  Under-the-covers it would really convert into "${eventDTO.nameTxt}" to be executed by Activiti when the time comes. 

The solution must also be reverse engineered.  Either we convert ${eventDTO.nameTxt} BACK to "Event.Name" from the XML to the designer form, or perhaps, we keep a copy of both the BF expression AND the Activiti expression in the bpmn20.xml.

Does anyone have thoughts on how to approach this? 

Here's a couple of options I've thought of, but haven't fully-baked how to implement either:
1.) generate from BF to Activiti expression at design time and store both.  BF expression is held in a custom field and the Activiti expression goes into the normal XML field.

2.) Put the BF expression into the bpmn20.xml where the normal Activiti expression should go and somehow hook into the runtime evaluation to intercept and do the "Event.Name" –>> "${eventDTO.nameTxt}" translation only at runtime.