AnsweredAssumed Answered

Injecting Field Expressions instead of String in custom task

Question asked by thilka on Jan 27, 2012
Latest reply on Jul 31, 2012 by pascal1
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">
        <activiti:field name="delegateExpressionProp" expression="${someFixedExpression}" />
        <activiti:field name="stringValueProp" expression="myStringValue" />

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">

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

Thanks for your help,