|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.common.definitions.DefinitionBase
org.eclipse.smila.jobmanager.definitions.WorkflowDefinition
public class WorkflowDefinition
Definition of a workflow. JSON format:
{
"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"
}
} ]
}
| Field Summary | |
|---|---|
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. |
| Fields inherited from class org.eclipse.smila.common.definitions.DefinitionBase |
|---|
_anyMap, _name, _readOnly, _timestamp, KEY_NAME, KEY_READ_ONLY, KEY_TIMESTAMP |
| Constructor Summary | |
|---|---|
WorkflowDefinition(AnyMap workflow)
parse workflow definition from Any object. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.eclipse.smila.common.definitions.DefinitionBase |
|---|
getName, getTimestamp, isReadOnly, toAny, toString, validateName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public 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
| Constructor Detail |
|---|
public WorkflowDefinition(AnyMap workflow)
throws java.lang.Exception
workflow - see class comment for format of Any object
java.lang.Exception - An exception that occurred while converting the object.| Method Detail |
|---|
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()
|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||