// get workflow variables
Map<String, String> variableMap = AppUtil.retrieveVariableDataFromMap(getRequestParameters());
String formUrl = getUrl() + "?_action=start";
WorkflowProcessResult result = appService.submitFormToStartProcess(getRequestParameterString("appId"), getRequestParameterString("appVersion"), getPropertyString("processDefId"), formData, variableMap, recordId, formUrl);
PackageActivityForm startFormDef = appService.viewStartProcessForm(getRequestParameterString("appId"), getRequestParameterString("appVersion"), getPropertyString("processDefId"), formData, formUrl);
if (startFormDef != null && (startFormDef.getForm() != null || PackageActivityForm.ACTIVITY_FORM_TYPE_EXTERNAL.equals(startFormDef.getType()))) {
if (result == null) {
// validation error, get form
Form startForm = startFormDef.getForm();