Only use 'Expression' instead of making distinction between value/method

Description

Since internally parametrised method-expressions are actually ValueExpressions, there is no need for 2 different approaches. Also,
the ActivitiMethodExpression only supports calling without params.
We introduce a new interface: Expression, backed with a Juel ValueExpression.

This will also be used for Field Injection in Java service task delegates and event-listeners. This way, a single field can be used to be target of different types of injected fields:

  • Expression (value and method)

  • Literal strings

This makes it a lot easier for developers to have dynamic values injected into their own classes, while the delegate instances still contain no state. As it is implemented now, the field types depend on what is declared on the field, eg:
<activiti:listener activiti:class="org.activiti.examples.bpmn.eventlistener.ExampleFieldInjectedEventListener"
activiti:eventName="start">
<activiti:field activiti:name="fixedValue" activiti:stringValue="Yes, I am " />
_<activiti:field activiti:name="dynamicValue" activiti:valueExpr="${myVar}" />
</activiti:listener>

The 2 fields (fixedValue and dynamicValue) will both be of type 'Expression' backed by another implementation, opposed to one String field and one ValueExpression field.

Assignee

Frederik Heremans

Reporter

Frederik Heremans

Labels

None

Fix versions

Priority

Major
Configure