public class WorkflowClient extends ClientBase
client, conductorClientConfiguration, objectMapper, payloadStorage, root| Constructor and Description |
|---|
WorkflowClient()
Creates a default task client
|
WorkflowClient(com.sun.jersey.api.client.config.ClientConfig config) |
WorkflowClient(com.sun.jersey.api.client.config.ClientConfig config,
com.sun.jersey.api.client.ClientHandler handler) |
WorkflowClient(com.sun.jersey.api.client.config.ClientConfig config,
com.sun.jersey.api.client.ClientHandler handler,
com.sun.jersey.api.client.filter.ClientFilter... filters) |
WorkflowClient(com.sun.jersey.api.client.config.ClientConfig config,
ConductorClientConfiguration clientConfiguration,
com.sun.jersey.api.client.ClientHandler handler,
com.sun.jersey.api.client.filter.ClientFilter... filters) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteWorkflow(java.lang.String workflowId,
boolean archiveWorkflow)
Removes a workflow from the system
|
java.util.List<java.lang.String> |
getRunningWorkflow(java.lang.String workflowName,
java.lang.Integer version)
Retrieve all running workflow instances for a given name and version
|
com.netflix.conductor.common.run.Workflow |
getWorkflow(java.lang.String workflowId,
boolean includeTasks)
Retrieve a workflow by workflow id
|
java.util.List<com.netflix.conductor.common.run.Workflow> |
getWorkflows(java.lang.String name,
java.lang.String correlationId,
boolean includeClosed,
boolean includeTasks)
Retrieve all workflows for a given correlation id and name
|
java.util.List<java.lang.String> |
getWorkflowsByTimePeriod(java.lang.String workflowName,
int version,
java.lang.Long startTime,
java.lang.Long endTime)
Retrieve all workflow instances for a given workflow name between a specific time period
|
void |
pauseWorkflow(java.lang.String workflowId)
Pause a workflow by workflow id
|
java.lang.String |
rerunWorkflow(java.lang.String workflowId,
com.netflix.conductor.common.metadata.workflow.RerunWorkflowRequest rerunWorkflowRequest)
Reruns the workflow from a specific task
|
void |
resetCallbacksForInProgressTasks(java.lang.String workflowId)
Resets the callback times of all IN PROGRESS tasks to 0 for the given workflow
|
void |
restart(java.lang.String workflowId)
Restart a completed workflow
|
void |
resumeWorkflow(java.lang.String workflowId)
Resume a paused workflow by workflow id
|
void |
retryLastFailedTask(java.lang.String workflowId)
Retries the last failed task in a workflow
|
void |
runDecider(java.lang.String workflowId)
Starts the decision task for the given workflow instance
|
com.netflix.conductor.common.run.SearchResult<com.netflix.conductor.common.run.WorkflowSummary> |
search(java.lang.Integer start,
java.lang.Integer size,
java.lang.String sort,
java.lang.String freeText,
java.lang.String query)
Paginated search for workflows based on payload
|
com.netflix.conductor.common.run.SearchResult<com.netflix.conductor.common.run.WorkflowSummary> |
search(java.lang.String query)
Search for workflows based on payload
|
void |
skipTaskFromWorkflow(java.lang.String workflowId,
java.lang.String taskReferenceName)
Skips a given task from a current RUNNING workflow
|
java.lang.String |
startWorkflow(com.netflix.conductor.common.metadata.workflow.StartWorkflowRequest startWorkflowRequest)
Starts a workflow.
|
void |
terminateWorkflow(java.lang.String workflowId,
java.lang.String reason)
Terminates the execution of the given workflow instance
|
delete, delete, downloadFromExternalStorage, postForEntity, postForEntity, postForEntityWithRequestOnly, postForEntityWithUriVariablesOnly, put, setRootURI, uploadToExternalPayloadStoragepublic WorkflowClient()
public WorkflowClient(com.sun.jersey.api.client.config.ClientConfig config)
config - REST Client configurationpublic WorkflowClient(com.sun.jersey.api.client.config.ClientConfig config,
com.sun.jersey.api.client.ClientHandler handler)
config - REST Client configurationhandler - Jersey client handler. Useful when plugging in various http client interaction modules (e.g. ribbon)public WorkflowClient(com.sun.jersey.api.client.config.ClientConfig config,
com.sun.jersey.api.client.ClientHandler handler,
com.sun.jersey.api.client.filter.ClientFilter... filters)
config - REST Client configurationhandler - Jersey client handler. Useful when plugging in various http client interaction modules (e.g. ribbon)filters - Chain of client side filters to be applied per requestpublic WorkflowClient(com.sun.jersey.api.client.config.ClientConfig config,
ConductorClientConfiguration clientConfiguration,
com.sun.jersey.api.client.ClientHandler handler,
com.sun.jersey.api.client.filter.ClientFilter... filters)
config - REST Client configurationclientConfiguration - Specific properties configured for the client, see ConductorClientConfigurationhandler - Jersey client handler. Useful when plugging in various http client interaction modules (e.g. ribbon)filters - Chain of client side filters to be applied per requestpublic java.lang.String startWorkflow(com.netflix.conductor.common.metadata.workflow.StartWorkflowRequest startWorkflowRequest)
ConductorClientConfiguration.getWorkflowInputPayloadThresholdKB(),
it is uploaded to ExternalPayloadStorage, if enabled, else the workflow is rejected.startWorkflowRequest - the StartWorkflowRequest object to start the workflowConductorClientException - if ExternalPayloadStorage is disabled or if the payload size is greater than ConductorClientConfiguration.getWorkflowInputMaxPayloadThresholdKB()public com.netflix.conductor.common.run.Workflow getWorkflow(java.lang.String workflowId,
boolean includeTasks)
workflowId - the id of the workflowincludeTasks - specify if the tasks in the workflow need to be returnedpublic java.util.List<com.netflix.conductor.common.run.Workflow> getWorkflows(java.lang.String name,
java.lang.String correlationId,
boolean includeClosed,
boolean includeTasks)
name - the name of the workflowcorrelationId - the correlation idincludeClosed - specify if all workflows are to be returned or only running workflowsincludeTasks - specify if the tasks in the workflow need to be returnedpublic void deleteWorkflow(java.lang.String workflowId,
boolean archiveWorkflow)
workflowId - the id of the workflow to be deletedarchiveWorkflow - flag to indicate if the workflow should be archived before deletionpublic java.util.List<java.lang.String> getRunningWorkflow(java.lang.String workflowName,
java.lang.Integer version)
workflowName - the name of the workflowversion - the version of the wokflow definition. Defaults to 1.public java.util.List<java.lang.String> getWorkflowsByTimePeriod(java.lang.String workflowName,
int version,
java.lang.Long startTime,
java.lang.Long endTime)
workflowName - the name of the workflowversion - the version of the workflow definition. Defaults to 1.startTime - the start time of the periodendTime - the end time of the periodpublic void runDecider(java.lang.String workflowId)
workflowId - the id of the workflow instancepublic void pauseWorkflow(java.lang.String workflowId)
workflowId - the workflow id of the workflow to be pausedpublic void resumeWorkflow(java.lang.String workflowId)
workflowId - the workflow id of the paused workflowpublic void skipTaskFromWorkflow(java.lang.String workflowId,
java.lang.String taskReferenceName)
workflowId - the id of the workflow instancetaskReferenceName - the reference name of the task to be skippedpublic java.lang.String rerunWorkflow(java.lang.String workflowId,
com.netflix.conductor.common.metadata.workflow.RerunWorkflowRequest rerunWorkflowRequest)
workflowId - the id of the workflowrerunWorkflowRequest - the request containing the task to rerun frompublic void restart(java.lang.String workflowId)
workflowId - the workflow id of the workflow to be restartedpublic void retryLastFailedTask(java.lang.String workflowId)
workflowId - the workflow id of the workflow with the failed taskpublic void resetCallbacksForInProgressTasks(java.lang.String workflowId)
workflowId - the id of the workflowpublic void terminateWorkflow(java.lang.String workflowId,
java.lang.String reason)
workflowId - the id of the workflow to be terminatedreason - the reason to be logged and displayedpublic com.netflix.conductor.common.run.SearchResult<com.netflix.conductor.common.run.WorkflowSummary> search(java.lang.String query)
query - the search querySearchResult containing the WorkflowSummary that match the querypublic com.netflix.conductor.common.run.SearchResult<com.netflix.conductor.common.run.WorkflowSummary> search(java.lang.Integer start,
java.lang.Integer size,
java.lang.String sort,
java.lang.String freeText,
java.lang.String query)
start - start value of pagesize - number of workflows to be returnedsort - sort orderfreeText - additional free text queryquery - the search querySearchResult containing the WorkflowSummary that match the query