Class ExternalWorkflowProvider
java.lang.Object
com.broadleafcommerce.orchestration.service.provider.external.AbstractExternalProvider
com.broadleafcommerce.orchestration.service.provider.external.ExternalWorkflowProvider
- All Implemented Interfaces:
WorkflowProvider
-
Constructor Summary
ConstructorsConstructorDescriptionExternalWorkflowProvider
(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper mapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.fasterxml.jackson.databind.ObjectMapper
protected ExternalWorkflowProviderProperties
protected String
protected com.broadleafcommerce.common.extension.TypeFactory
protected String
getUrl()
protected org.springframework.web.reactive.function.client.WebClient
protected String
boolean
incompleteExistsByContextValue
(String contextValue, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Determine if an active workflow exists for a context valuevoid
resume
(@NonNull String workflowId, @NonNull Map<String, String> additionalWorkflowContext, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Request that the remote workflow service resume a paused or failed workflow executionvoid
setObjectMapper
(com.fasterxml.jackson.databind.ObjectMapper objectMapper) void
setProperties
(ExternalWorkflowProviderProperties properties) void
start
(WorkflowRequest request) Request that the remote workflow service start a new workflow executionMethods inherited from class com.broadleafcommerce.orchestration.service.provider.external.AbstractExternalProvider
getHeaders, getMapper
-
Constructor Details
-
ExternalWorkflowProvider
public ExternalWorkflowProvider(@Qualifier("workflowWebClient") org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper mapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
start
Description copied from interface:WorkflowProvider
Request that the remote workflow service start a new workflow execution- Specified by:
start
in interfaceWorkflowProvider
- Parameters:
request
- Request that the remote workflow service start a new workflow execution
-
resume
public void resume(@NonNull @NonNull String workflowId, @NonNull @NonNull Map<String, String> additionalWorkflowContext, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:WorkflowProvider
Request that the remote workflow service resume a paused or failed workflow execution- Specified by:
resume
in interfaceWorkflowProvider
- Parameters:
workflowId
- The id of the workflow to be resumedadditionalWorkflowContext
- Additional parameters to add to the workflow's contextcontextInfo
- Context information about the multi-tenant state.
-
incompleteExistsByContextValue
public boolean incompleteExistsByContextValue(String contextValue, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:WorkflowProvider
Determine if an active workflow exists for a context value- Specified by:
incompleteExistsByContextValue
in interfaceWorkflowProvider
- Parameters:
contextValue
- The context value to check for an active workflowcontextInfo
- The context information around multi-tenant state- Returns:
- True if the workflow exists, false otherwise
-
getUrl
-
getWorkflowUri
-
getServiceClient
-
getWebClient
protected org.springframework.web.reactive.function.client.WebClient getWebClient() -
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
getProperties
-
setProperties
-
getObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
setObjectMapper
@Autowired public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-