AnsweredAssumed Answered

How to access fields in java service task

Question asked by sk8192 on Nov 12, 2012
Latest reply on Nov 16, 2012 by frederikheremans1
If I have the following task definition:

    <serviceTask id="myServiceTask" name="My Service" activiti:expression="#{myService.myMethod(execution)}" activiti:resultVariableName="result">
        <activiti:field name="testField">

which corresponds to this java class:

public class MyServiceTask {
  public String myMethod(DelegateExecution execution) {
    // do something with testField
    return "";

How can I obtain the value of testField (i.e. "testing123") within the Java class?