cancel
Showing results for 
Search instead for 
Did you mean: 

Injecting Field Expressions instead of String in custom task

thilka
Champ in-the-making
Champ in-the-making
Hi there,

I just played around with the latest version 5.8.1 and the example for extending the Eclipse Designer. I am really impressed how easy it was to create my own task with my self-defined properties.

For our current use case we need to have some construct like this in the resulting bpmn:
<serviceTask id="serviceTask1" name="Special Service Task" activiti:class="myClass">
    <extensionElements>
        <activiti:field name="delegateExpressionProp" expression="${someFixedExpression}" />
        <activiti:field name="stringValueProp" expression="myStringValue" />
    </extensionElements>  
</serviceTask>

Our service task has two fields: the 'delegateExpressionProp' should be fixed for this task (no user input, but still in bpmn.xml output file) and 'stringValueProp' which is a required user-input field. No problem with the 'stringValueProp', but I don't see how we can handle the 'delegateExpressionProp':
(1) the user may not change the value (read only or even better: invisible)
(2) we need the expression, but the output is using activiti:string instead of activiti:expression
     <activiti:field name="delegateExpressionProp">
         <activiti:string>${someFixedExpression}</activiti:string>
     </activiti:field>

Is there any way to influence the behaviour without creating a custom export marshaller as described in the user guide?

Thanks for your help,
Tobias
2 REPLIES 2

blezek
Champ on-the-rise
Champ on-the-rise
Hi,  Have exactly the same question just today.  Have you received any response or solved the problem yourself?

Thanks,
-dan

pascal1
Champ in-the-making
Champ in-the-making
I have the same problem, too. Is there no possibility to do that?

…I also tried to realize it with a custom ExportMarshaller, but it isn´t that easy like the UserGuide says, i think…