Class ArrayNodeServiceInvocationResult
java.lang.Object
com.flowable.serviceregistry.engine.impl.invoker.result.BaseServiceInvocationResult
com.flowable.serviceregistry.engine.impl.invoker.result.ArrayNodeServiceInvocationResult
- All Implemented Interfaces:
ServiceInvocationResult
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.fasterxml.jackson.databind.node.ArrayNode
-
Constructor Summary
ConstructorsConstructorDescriptionArrayNodeServiceInvocationResult
(com.fasterxml.jackson.databind.node.ArrayNode arrayNode) -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.JsonNode
asJsonNode
(com.fasterxml.jackson.databind.ObjectMapper objectMapper) extractValue
(ServiceOutputParameter outputParameter) com.fasterxml.jackson.databind.node.ArrayNode
getValue
(int index) handleObjectOutputTypeForArrayResponse
(ServiceDefinitionModel serviceDefinitionModel, ServiceOperation serviceOperation, ServiceInvocationContextImpl context, ServiceRegistryEngineConfiguration serviceEngineConfiguration, ServiceInvocationResultResponse invocationResponse) Handles service object output for array responses.boolean
processResultsAccordingToServiceDefinitionModel
(ServiceDefinitionModel serviceDefinitionModel, ServiceOperation serviceOperation, ServiceInvocationContextImpl context, ServiceRegistryEngineConfiguration serviceEngineConfiguration, ServiceInvocationResultResponse invocationResponse, com.fasterxml.jackson.databind.ObjectMapper objectMapper) int
size()
Methods inherited from class com.flowable.serviceregistry.engine.impl.invoker.result.BaseServiceInvocationResult
handleEmptyOutputParameters
-
Field Details
-
arrayNode
protected com.fasterxml.jackson.databind.node.ArrayNode arrayNode
-
-
Constructor Details
-
ArrayNodeServiceInvocationResult
public ArrayNodeServiceInvocationResult(com.fasterxml.jackson.databind.node.ArrayNode arrayNode)
-
-
Method Details
-
getValue
-
hasValue
-
getValue
-
size
public int size() -
getResultType
-
processResultsAccordingToServiceDefinitionModel
public ServiceInvocationResult processResultsAccordingToServiceDefinitionModel(ServiceDefinitionModel serviceDefinitionModel, ServiceOperation serviceOperation, ServiceInvocationContextImpl context, ServiceRegistryEngineConfiguration serviceEngineConfiguration, ServiceInvocationResultResponse invocationResponse, com.fasterxml.jackson.databind.ObjectMapper objectMapper) - Specified by:
processResultsAccordingToServiceDefinitionModel
in classBaseServiceInvocationResult
-
handleObjectOutputTypeForArrayResponse
protected Map<String,Object> handleObjectOutputTypeForArrayResponse(ServiceDefinitionModel serviceDefinitionModel, ServiceOperation serviceOperation, ServiceInvocationContextImpl context, ServiceRegistryEngineConfiguration serviceEngineConfiguration, ServiceInvocationResultResponse invocationResponse) Handles service object output for array responses. Mappings extract the values into an array:GIVEN
- output parameter mappings:
[ {name: 'rawResponse', source: 'responseBody', type: 'json'}, {name: 'muppetName', mappingName: 'muppetCharacterNames', type: 'string'} ]
- payload:
[{id: 1, muppetName: 'Kermit'}, {id: 2, muppetName: 'Gonzo'}]
The resulting service output object looks like:
{ rawResponse: [{id: 1, muppetName: 'Kermit'}, {id: 2, muppetName: 'Gonzo'}], muppetCharacterNames: ['Kermit', 'Gonzo'] }
- output parameter mappings:
-
extractValue
- Specified by:
extractValue
in classBaseServiceInvocationResult
-
asJsonNode
public com.fasterxml.jackson.databind.JsonNode asJsonNode(com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
getArrayNode
public com.fasterxml.jackson.databind.node.ArrayNode getArrayNode()
-