public class WorkflowInitializer extends Object
| Constructor and Description |
|---|
WorkflowInitializer(String processingApiUrl,
BoilerplateNameResolver boilerplateNameResolver,
ActionTypeNameResolver actionTypeNameResolver,
ClassificationWorkflowNameResolver classificationWorkflowNameResolver)
Create instance of WorkflowInitializer with provided parameters.
|
| Modifier and Type | Method and Description |
|---|---|
long |
createWorkflow(WorkflowJson workflow,
WorkflowJson workflowOverlay,
String projectId)
Creates a processing workflow derived from the information in the
workflow object. |
long |
createWorkflow(WorkflowJson workflow,
WorkflowJson workflowOverlay,
String projectId,
boolean overwriteExisting)
Creates a processing workflow derived from the information in the
workflow object. |
static WorkflowInitializer |
createWorkflowInitializer(String processingApiUrl,
String boilerplateApiUrl,
String classificationApiUrl) |
static WorkflowInitializer |
createWorkflowOnlyInitializer(String processingApiUrl) |
long |
initializeWorkflowBaseData(InputStream workflowBaseDataStream,
InputStream workflowOverlayStream,
String projectId)
Creates a processing workflow derived from the information in the input file provided.
|
long |
initializeWorkflowBaseData(String inputFileName,
String projectId)
Creates a processing workflow derived from the information in the input file provided.
|
long |
initializeWorkflowBaseData(String inputFileName,
String overlayFile,
String projectId)
Creates a processing workflow derived from the information in the input file provided.
|
long |
initializeWorkflowBaseData(WorkflowInitializationParams initializationParams)
Creates a processing workflow derived from the information in the
initializationParams object. |
public WorkflowInitializer(String processingApiUrl, BoilerplateNameResolver boilerplateNameResolver, ActionTypeNameResolver actionTypeNameResolver, ClassificationWorkflowNameResolver classificationWorkflowNameResolver)
processingApiUrl - URL of processing API to contact during initialization.boilerplateNameResolver - for use in resolving expression/tag names to IDs in workflow.actionTypeNameResolver - for use in resolving action type names to IDs in workflow.classificationWorkflowNameResolver - for use in resolving classification workflow names to IDs in processing
workflow.public static WorkflowInitializer createWorkflowInitializer(String processingApiUrl, String boilerplateApiUrl, String classificationApiUrl)
public static WorkflowInitializer createWorkflowOnlyInitializer(String processingApiUrl)
public long initializeWorkflowBaseData(String inputFileName, String projectId) throws IOException, com.github.cafdataprocessing.processing.service.client.ApiException
inputFileName - File containing workflow in JSON format that should be created.projectId - ProjectId to create workflow under.IOException - If unable to read the workflow input file.com.github.cafdataprocessing.processing.service.client.ApiException - Thrown if there is an error communicating with the API or if error response received from API.public long initializeWorkflowBaseData(String inputFileName, String overlayFile, String projectId) throws IOException, com.github.cafdataprocessing.processing.service.client.ApiException
inputFileName - File containing workflow in JSON format that should be created.overlayFile - Optional file containing extensions / overrides to merge with the base workflow specified in
inputFileName. Pass null if you do not want any overrides to be applied.projectId - ProjectId to create workflow under.IOException - If unable to read the workflow input file.com.github.cafdataprocessing.processing.service.client.ApiException - Thrown if there is an error communicating with the API or if error response received from API.public long initializeWorkflowBaseData(InputStream workflowBaseDataStream, InputStream workflowOverlayStream, String projectId) throws IOException, com.github.cafdataprocessing.processing.service.client.ApiException
workflowBaseDataStream - Input stream containing workflow in JSON format that should be created.workflowOverlayStream - Optional input stream containing extensions / overrides to merge with the base
workflow specified in inputFileName. Pass null if you do not want any overrides
to be applied.projectId - ProjectId to create workflow under.IOException - If unable to read the workflow input file.com.github.cafdataprocessing.processing.service.client.ApiException - Thrown if there is an error communicating with the API or if error response received from API.public long initializeWorkflowBaseData(WorkflowInitializationParams initializationParams) throws IOException, com.github.cafdataprocessing.processing.service.client.ApiException
initializationParams object. Optional extensions or
overrides can be provided in the workflowOverlay parameter of the initializationParams parameter.
See WorkflowCombiner for more information on merging of two WorkflowJson objects.initializationParams - Defines properties to use in workflow creation.IOException - If unable to read the workflow.com.github.cafdataprocessing.processing.service.client.ApiException - in case of a failure to create a workflow.public long createWorkflow(WorkflowJson workflow, WorkflowJson workflowOverlay, String projectId) throws com.github.cafdataprocessing.processing.service.client.ApiException
workflow object. Optional extensions or
overrides can be provided in the workflowOverlay parameter.
See WorkflowCombiner for more information on merging of two WorkflowJson objects.
This will remove any existing workflows with the same workflow name as the definition from the workflow parameter for the
specified projectId.workflow - An object describing workflow to be created.workflowOverlay - An optional object describing extensions or overrides to the workflow parameter.projectId - A project id to create workflow under.com.github.cafdataprocessing.processing.service.client.ApiException - in case of a failure to create a workflow.public long createWorkflow(WorkflowJson workflow, WorkflowJson workflowOverlay, String projectId, boolean overwriteExisting) throws com.github.cafdataprocessing.processing.service.client.ApiException
workflow object. Optional extensions or
overrides can be provided in the workflowOverlay parameter.
See WorkflowCombiner for more information on merging of two WorkflowJson objects.workflow - An object describing workflow to be created.workflowOverlay - An optional object describing extensions or overrides to the workflow parameter.projectId - A project id to create workflow under.overwriteExisting - Whether existing workflows under this projectId with the same name as the provided workflow should be removed.com.github.cafdataprocessing.processing.service.client.ApiException - in case of a failure to create a workflow.Copyright © 2015–2017 Hewlett Packard Enterprise Development LP. All rights reserved.