AnsweredAssumed Answered

How to get activiti:field name from a service Task

Question asked by zaridak on Jul 26, 2018
Latest reply on Aug 4, 2018 by zaridak

Hello all,


I would like your help whether there is a way to get from a java class the "activiti:field name" from a service Task and not only the value. For instance if we have this service task:


<serviceTask id="servicetask1" name="Service Task" activiti:class="Test">
        <activiti:field name="theName" stringValue="test value"/>


And on the other hand: 

    class Test {              

             org.activiti.engine.delegate.Expression theName;

             public void execute(DelegateExecution execution) throws Exception {       

             String value1 = (String) theName.getValue(execution);

             //now value1 contains the string: "test value"


Can I somehow get the activiti:field name(="theName") (maybe from the bpmn file) without the need of declaring  "Expression theName in the class??


Thanks in Advance,