Class InvokeServiceCmd
java.lang.Object
com.flowable.serviceregistry.engine.impl.cmd.InvokeServiceCmd
- All Implemented Interfaces:
org.flowable.common.engine.impl.interceptor.Command<ServiceInvocationResponse>
public class InvokeServiceCmd extends java.lang.Object implements org.flowable.common.engine.impl.interceptor.Command<ServiceInvocationResponse>
-
Field Summary
Fields Modifier and Type Field Description protected ServiceInvocationBuilder
serviceInvocationBuilder
-
Constructor Summary
Constructors Constructor Description InvokeServiceCmd(ServiceInvocationBuilder serviceInvocationBuilder)
-
Method Summary
Modifier and Type Method Description ServiceInvocationResponse
execute(org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
protected java.lang.Object
getLookupId(ServiceDefinitionModel serviceDefinitionModel, ServiceInvocationResponse invocationResponse)
Search for the lookup id value in the response according the mapping in the service definition and do proper handling of the response type (e.g.protected ServiceDefinitionEntity
getServiceDefinition(ServiceInvocationContextImpl context, org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
protected ServiceDefinitionModel
getServiceDefinitionModel(ServiceDefinitionEntity serviceDefinition, org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
protected ServiceInvoker
getServiceInvoker(ServiceDefinitionModel serviceDefinitionModel, org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
protected ServiceOperation
getServiceOperation(ServiceDefinitionModel serviceDefinitionModel)
protected ServiceInvocationResponse
invokeService(ServiceDefinitionModel serviceDefinitionModel, ServiceOperation serviceOperation, ServiceInvoker serviceInvoker, ServiceInvocationContextImpl context, org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
protected ServiceDefinitionEntity
resolveServiceDefinitionByKey(java.lang.String tenantId, ServiceRegistryEngineConfiguration serviceEngineConfiguration)
protected ServiceDefinitionEntity
resolveServiceDefinitionByReferenceKey(ServiceInvocationContextImpl context, ServiceDefinitionEntityManager serviceDefinitionEntityManager, org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
protected void
validateParameters()
-
Field Details
-
Constructor Details
-
Method Details
-
execute
public ServiceInvocationResponse execute(org.flowable.common.engine.impl.interceptor.CommandContext commandContext)- Specified by:
execute
in interfaceorg.flowable.common.engine.impl.interceptor.Command<ServiceInvocationResponse>
-
validateParameters
protected void validateParameters() -
getServiceDefinition
protected ServiceDefinitionEntity getServiceDefinition(ServiceInvocationContextImpl context, org.flowable.common.engine.impl.interceptor.CommandContext commandContext) -
resolveServiceDefinitionByKey
protected ServiceDefinitionEntity resolveServiceDefinitionByKey(java.lang.String tenantId, ServiceRegistryEngineConfiguration serviceEngineConfiguration) -
resolveServiceDefinitionByReferenceKey
protected ServiceDefinitionEntity resolveServiceDefinitionByReferenceKey(ServiceInvocationContextImpl context, ServiceDefinitionEntityManager serviceDefinitionEntityManager, org.flowable.common.engine.impl.interceptor.CommandContext commandContext) -
getServiceDefinitionModel
protected ServiceDefinitionModel getServiceDefinitionModel(ServiceDefinitionEntity serviceDefinition, org.flowable.common.engine.impl.interceptor.CommandContext commandContext) -
getServiceInvoker
protected ServiceInvoker getServiceInvoker(ServiceDefinitionModel serviceDefinitionModel, org.flowable.common.engine.impl.interceptor.CommandContext commandContext) -
getServiceOperation
-
invokeService
protected ServiceInvocationResponse invokeService(ServiceDefinitionModel serviceDefinitionModel, ServiceOperation serviceOperation, ServiceInvoker serviceInvoker, ServiceInvocationContextImpl context, org.flowable.common.engine.impl.interceptor.CommandContext commandContext) -
getLookupId
protected java.lang.Object getLookupId(ServiceDefinitionModel serviceDefinitionModel, ServiceInvocationResponse invocationResponse)Search for the lookup id value in the response according the mapping in the service definition and do proper handling of the response type (e.g. JSON vs map).- Parameters:
serviceDefinitionModel
- the service definition model where the lookup id mapping is taken frominvocationResponse
- the invocation response containing the lookup id field and its value- Returns:
- the lookup id value, if available, null otherwise
-