Hi,
all our extension fields for standard Flowable FlowNode are primitive expression values, which extend the FlowNodes via BPMN2 extension Elements. Upon runtime, when the corresponding behaviors/delegates get called, the relevant values get injected as org.flowable.common.engine.api.delegate.Expression where required.
Is it possible to specify complex extension elements like a list with name/value pairs? If not is there another way?
Regards,
Tina
filiphr
December 23, 2020, 11:08am
2
Hey @tina.bandalo ,
The extension elements are extremely flexible and you can provide nested structures as you want.
As an example have a look at
Cheers,
Filip
Hi @filiphr ,
thanks a lot for the answer. I want to follow-up on Tinas question.
How exactly would I store a list of key-value pairs in the extension then?
Let´s assume I have the following ordered key-value list:
1 = January
2 = February
3 = March
How would I store these pairs as part of the extension elements?
Thanks,
Rouven
Hey @Rouvenday ,
The way you want to store this is entirely up to you.
There are multiple ways to store it e.g.
<flowable:monthPair key="1" value="January" />
<flowable:monthPair key="2" value="February" />
<flowable:monthPair key="3" value="March" />
or
<flowable:months>
<month key="1" value="January" />
<month key="2" value="February" />
<month key="3" value="March" />
</flowable:months>
When you have a control over the creation of the BpmnModel
it is entirely up to you to decide how you want to store it.
Cheers,
Filip
Hi @filiphr ,
Thanks a lot.
Is it also possible to inject complex structures into the field of the delegated class?
Something similar to this (pseudo xml):
<flowable:field name="months">
<flowable:field name="1" expression="${firstMonth}" />
<flowable:field name="2" expression="${secondMonth}" />
<flowable:field name="3" expression="${thirdMonth}" />
</flowable:field>
Best Regards,
Rouven