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 ServiceInvocationBuilderserviceInvocationBuilder -
Constructor Summary
Constructors Constructor Description InvokeServiceCmd(ServiceInvocationBuilder serviceInvocationBuilder) -
Method Summary
Modifier and Type Method Description ServiceInvocationResponseexecute(org.flowable.common.engine.impl.interceptor.CommandContext commandContext)protected java.lang.ObjectgetLookupId(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 ServiceDefinitionEntitygetServiceDefinition(ServiceInvocationContextImpl context, org.flowable.common.engine.impl.interceptor.CommandContext commandContext)protected ServiceDefinitionModelgetServiceDefinitionModel(ServiceDefinitionEntity serviceDefinition, org.flowable.common.engine.impl.interceptor.CommandContext commandContext)protected ServiceInvokergetServiceInvoker(ServiceDefinitionModel serviceDefinitionModel, org.flowable.common.engine.impl.interceptor.CommandContext commandContext)protected ServiceOperationgetServiceOperation(ServiceDefinitionModel serviceDefinitionModel)protected ServiceInvocationResponseinvokeService(ServiceDefinitionModel serviceDefinitionModel, ServiceOperation serviceOperation, ServiceInvoker serviceInvoker, ServiceInvocationContextImpl context, org.flowable.common.engine.impl.interceptor.CommandContext commandContext)protected ServiceDefinitionEntityresolveServiceDefinitionByKey(java.lang.String tenantId, ServiceRegistryEngineConfiguration serviceEngineConfiguration)protected ServiceDefinitionEntityresolveServiceDefinitionByReferenceKey(ServiceInvocationContextImpl context, ServiceDefinitionEntityManager serviceDefinitionEntityManager, org.flowable.common.engine.impl.interceptor.CommandContext commandContext)protected voidvalidateParameters()
-
Field Details
-
Constructor Details
-
Method Details
-
execute
public ServiceInvocationResponse execute(org.flowable.common.engine.impl.interceptor.CommandContext commandContext)- Specified by:
executein 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
-