addError("'resultVariableName' not supported for " + elementName + " elements using 'delegateExpression'", serviceTaskElement);
}
activity.setActivityBehavior(new ServiceTaskDelegateExpressionActivityBehavior(expressionManager.createExpression(delegateExpression), parseFieldDeclarations(serviceTaskElement)));
} else if (expression != null && expression.trim().length() > 0) {
activity.setActivityBehavior(new ServiceTaskExpressionActivityBehavior(expressionManager.createExpression(expression), resultVariableName));
} else {
addError("One of the attributes 'class', 'delegateExpression', 'type', or 'expression' or a nested 'connector' element is mandatory on " + elementName + ".", serviceTaskElement);
}