code: protected String getRequestData() throws ActivityException {
          Object request = null;
          String requestVarName = getAttributeValue(REQUEST_VARIABLE);
          if (requestVarName == null)
              throw new ActivityException("Missing attribute: " + REQUEST_VARIABLE);
          String requestVarType = getParameterType(requestVarName);
  
          request = getParameterValue(requestVarName);
          if (!hasPreScript()) {
              if (request == null)
                  throw new ActivityException("Request data is null: " + requestVarName);
              if (!(request instanceof DocumentReference))
                  throw new ActivityException("Request data must be a DocumentReference: " + requestVarName);
          }
  
          try {
              Object requestObj = request == null ? null : getDocument((DocumentReference)request, requestVarType);
              if (hasPreScript()) {
                  Object ret = executePreScript(requestObj);
                  if (ret == null) {
                      // nothing returned; requestVar may have been assigned by script
                      Object req = getParameterValue(requestVarName);
                      if (req == null)
                        throw new ActivityException("Request data is null: " + requestVarName);
                      requestObj = getDocument((DocumentReference)req, requestVarType);
                  }
                  else {
                      requestObj = ret;
                      setParameterValueAsDocument(requestVarName, this.getProcessDefinition().getVariable(requestVarName).getType(), requestObj);
                  }
              }
              soapRequest = createSoapRequest(requestObj);
              return DomHelper.toXml(soapRequest.getSOAPPart().getDocumentElement());
          }
          catch (TransformerException ex) {
              throw new ActivityException(ex.getMessage(), ex);
          }
      }
docs: Builds the request XML.