code: protected String extractFormData(JSONObject datadoc)
              throws ActivityException, JSONException {
          String varstring = this.getAttributeValue(TaskActivity.ATTRIBUTE_TASK_VARIABLES);
          List<String[]> parsed = StringHelper.parseTable(varstring, ',', ';', 5);
          for (String[] one : parsed) {
              String varname = one[0];
              String displayOption = one[2];
              if (displayOption.equals(TaskActivity.VARIABLE_DISPLAY_NOTDISPLAYED)) continue;
              if (displayOption.equals(TaskActivity.VARIABLE_DISPLAY_READONLY)) continue;
              if (varname.startsWith("#{") || varname.startsWith("${")) continue;
              String data = datadoc.has(varname) ? datadoc.getString(varname) : null;
              setDataToVariable(varname, data);
          }
          return null;
      }
docs: This method is used to extract data from the message received from the task manager.
  The method updates all variables specified as non-readonly
  
  @param datadoc
  @return completion code; when it returns null, the completion
  code is taken from the completionCode parameter of
  the message with key FormDataDocument.ATTR_ACTION
  @throws ActivityException
  @throws JSONException