public class SuccessSourcePolicyResult extends Object
SourcePolicy.
It contains the Event result of the flow execution and the response parameters and error response parameters to be sent
by the source.| Constructor and Description |
|---|
SuccessSourcePolicyResult(Event flowExecutionResult,
Map<String,Object> responseParameters,
MessageSourceResponseParametersProcessor messageSourceResponseParametersProcessor)
Creates a new successful result from a policy execution.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
createErrorResponseParameters(Event event)
This method generates the set of error parameters from an
Event to use on the error response function. |
Event |
getFlowExecutionResult() |
Map<String,Object> |
getResponseParameters() |
public SuccessSourcePolicyResult(Event flowExecutionResult, Map<String,Object> responseParameters, MessageSourceResponseParametersProcessor messageSourceResponseParametersProcessor)
flowExecutionResult - the result of the flow execution.responseParameters - the response parameters to be sent by the source.messageSourceResponseParametersProcessor - a processor to create response parameters from an Eventpublic Event getFlowExecutionResult()
public Map<String,Object> getResponseParameters()
public Map<String,Object> createErrorResponseParameters(Event event)
Event to use on the error response function.
Even though this class represents a successful execution it may be that when evaluating the response parameters there's a
failure which most likely can be an expression execution error. In such scenarios the error handler must be executed and an
error response must be send. This method must be used to generate the error response parametersevent - the event to use as source for generating the error response parameters.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.