public class WorkflowDefinition extends DefinitionBase
{
"name": "indexUpdate",
"parameters":
{
"paramName": "paramValue"
},
"startAction":
{
"worker": "sfrIndexOptimizer",
"parameters":
{
"index": "indexName"
},
"input":
{
"partitionsToMerge": "indexPartitionsBucket"
},
"output":
{
"newPartition": "indexPartitionsBucket"
}
},
"actions": [
{
"worker": "sfrRecordDeleter",
"parameters":
{
"index": "indexName"
},
"input":
{
"partition": "indexPartitionsBucket",
"deletedRecords": "indexDeletesBucket"
}
} ]
}
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
KEY_ACTIONS
name of JSON property for actions.
|
static java.lang.String |
KEY_MODES
name of JSON property for modes.
|
static java.lang.String |
KEY_PARAMETERS
name of JSON property for parameters.
|
static java.lang.String |
KEY_START_ACTION
name of JSON property for startAction.
|
static java.lang.String |
KEY_VALUE
name of JSON property for parameter value.
|
static java.lang.String |
KEY_WORKFLOWS
name of JSON property for lists of workflows.
|
_anyMap, _name, _readOnly, _timestamp, KEY_NAME, KEY_READ_ONLY, KEY_TIMESTAMP| Constructor and Description |
|---|
WorkflowDefinition(AnyMap workflow)
parse workflow definition from Any object.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<WorkflowAction> |
getActions() |
JobRunMode |
getDefaultJobRunMode()
return the default job run mode for this workflow: either the first of the configured list of modes or null.
|
java.util.List<JobRunMode> |
getJobRunModes()
get allowed job run modes for this workflow: either the configured ones or null, if not configured.
|
AnyMap |
getParameters() |
java.util.Collection<java.lang.String> |
getReferencedBuckets()
Returns the names of all buckets this workflow references.
|
java.util.Collection<java.lang.String> |
getReferencedWorkers()
Returns the names of all workers this workflow references.
|
WorkflowAction |
getStartAction() |
static WorkflowDefinition |
parseWorkflow(AnyMap workflowAny)
Parse on single workflow from an Any object containing a workflow description:
{
// see class comment for workflow format.
}
|
AnyMap |
toAny(boolean includingAdditionalAttributes)
Returns object information as an Any representation.
|
getName, getTimestamp, isReadOnly, toAny, toString, validateNamepublic static final java.lang.String KEY_WORKFLOWS
public static final java.lang.String KEY_PARAMETERS
public static final java.lang.String KEY_VALUE
public static final java.lang.String KEY_START_ACTION
public static final java.lang.String KEY_ACTIONS
public static final java.lang.String KEY_MODES
public WorkflowDefinition(AnyMap workflow) throws java.lang.Exception
workflow - see class comment for format of Any objectjava.lang.Exception - An exception that occurred while converting the object.public static WorkflowDefinition parseWorkflow(AnyMap workflowAny) throws InvalidDefinitionException
{
// see class comment for workflow format.
}
workflowAny - workflow as Any.InvalidDefinitionException - error parsing Any.public AnyMap getParameters()
public java.util.List<JobRunMode> getJobRunModes()
public JobRunMode getDefaultJobRunMode()
public WorkflowAction getStartAction()
public java.util.Collection<WorkflowAction> getActions()
public AnyMap toAny(boolean includingAdditionalAttributes)
toAny in class DefinitionBaseincludingAdditionalAttributes - 'true' if also any additional information in the AnyMap should be returned, 'false' if only the (minimal
set of) relevant information should be returned.public java.util.Collection<java.lang.String> getReferencedBuckets()
public java.util.Collection<java.lang.String> getReferencedWorkers()