protected void updateTargetVariables(ActivitiEndpoint endpoint) { toTargetType = null; if (endpoint.isCopyVariablesToBodyAsMap()) toTargetType = TargetType.BODY_AS_MAP; else if (endpoint.isCopyCamelBodyToBody()) toTargetType = TargetType.BODY; else if (endpoint.isCopyVariablesToProperties()) toTargetType = TargetType.PROPERTIES; if (toTargetType == null) setPropertTargetVariable(endpoint); }
public void execute(ActivityExecution execution) throws Exception { setAppropriateCamelContext(execution); final ActivitiEndpoint endpoint = createEndpoint(execution); final Exchange exchange = createExchange(execution, endpoint); endpoint.process(exchange); execution.setVariables(ExchangeUtils.prepareVariables(exchange, endpoint)); if (!handleCamelException(exchange, execution)) leave(execution); }