ConnectorRequest<?> request = connectorInstance.createRequest();
applyInputParameters(execution, request);
try {
// execute the request and obtain a response:
ConnectorResponse response = request.execute();
applyOutputParameters(execution, response);
} catch(Exception e) {
throw new ProcessEngineException("Exception while invoking connector "+e.getMessage(), e);
}