Class Task
- All Implemented Interfaces:
HasHandlers
- Direct Known Subclasses:
ComponentTask
,DSRequestTask
,ScriptTask
,StateTask
,UserTask
DSRequestTask
.-
Field Summary
Fields inherited from class com.smartgwt.client.core.BaseClass
config, configOnly, factoryCreated, factoryProperties, id, scClassName
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate()
getExpressionValue
(String value) Get the value of ainputExpression
.String[]
Deprecated.Get all inputs to the task as specified by theinputs
, as a Record.Defines how fields in theprocess state
are extracted for the input record to this task.Defines how fields in theprocess state
are extracted for the input record to this task.String[]
Defines how fields in theprocess state
are extracted for the input record to this task.static Task
getOrCreateRef
(JavaScriptObject jsObj) Special expression to write task output directly into aDataBoundComponent
.Field in theprocess state
where this task writes outputs.String[]
List of multiple fields in theprocess state
where this task will write outputs.Returns a value from theprocess state
.If set to true, the task will not allow any intermediate state to be set viasetState()
that is not explicitly defined first.setInputFieldList
(String... inputFieldList) Deprecated.In favor ofinputs
as of SmartGWT release 13.1Defines how fields in theprocess state
are extracted for the input record to this task.Defines how fields in theprocess state
are extracted for the input record to this task.Defines how fields in theprocess state
are extracted for the input record to this task.void
Sets the task output available to the next task viaProcess.getLastTaskOutput()
or more commonly, with aTaskInputExpression
property.setOutputExpression
(String outputExpression) Special expression to write task output directly into aDataBoundComponent
.setOutputField
(String outputField) Field in theprocess state
where this task writes outputs.setOutputFieldList
(String... outputFieldList) List of multiple fields in theprocess state
where this task will write outputs.void
Sets aprocess state
value for later reference withProcess.getStateVariable()
or more commonly with aTaskInputExpression
property.setStrictPaths
(Boolean strictPaths) If set to true, the task will not allow any intermediate state to be set viasetState()
that is not explicitly defined first.Methods inherited from class com.smartgwt.client.util.workflow.ProcessElement
completeElement, convertToJavaScriptArray, executeElement, getBindOutput, getClassDescription, getComponentReferences, getCurrentProcess, getDescription, getDynamicValue, getEditorType, getElementDescription, getForceSingle, getID, getInvalidTaskMessage, getJsObj, getMockMode, getNextElement, getOrCreateJsObj, getPassThruOutput, getProcessElements, getSupportsMultipleInputRecords, getTextFormulaValue, getTypeTitle, getUndefinedComponentMessage, getUnresolvedComponentMessage, getWaitDuration, getWaitFor, getWaitLocator, isCreated, isValid, objectReferencesLastTaskOutput, onInit, reset, setAttribute, setBindOutput, setClassDescription, setCurrentProcess, setDescription, setEditorType, setForceSingle, setID, setJavaScriptObject, setMockMode, setNextElement, setPassThruOutput, setSupportsMultipleInputRecords, setTypeTitle, setUndefinedComponentMessage, setUnresolvedComponentMessage, setWaitDuration, setWaitFor, setWaitLocator, updateGlobalIDInCriteria, updateGlobalIDInTextFormula, updateGlobalIDInValueProperty, updateGlobalIDInValues, updateGlobalIDReferences, updateLastElementBindingReferences, updateLastElementInCriteria, updateLastElementInValueProperty, updateLastElementInValues
Methods inherited from class com.smartgwt.client.core.BaseClass
addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, asSGWTComponent, clearDynamicProperty, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getRef, getRuleScope, getScClassName, getTestInstance, hasAutoAssignedID, hasDynamicProperty, internalSetID, internalSetID, isConfigOnly, isFactoryCreated, onBind, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setFactoryCreated, setProperty, setProperty, setProperty, setProperty, setRuleScope, setScClassName
-
Constructor Details
-
Task
public Task() -
Task
-
-
Method Details
-
getOrCreateRef
-
create
- Overrides:
create
in classProcessElement
-
setInputFieldList
Deprecated.In favor ofinputs
as of SmartGWT release 13.1List of multiple fields from theprocess state
which are provided as input data to this task. SeeTaskIO
.- Parameters:
inputFieldList
- New inputFieldList value. Default value is null- Returns:
Task
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created- See Also:
-
getInputFieldList
Deprecated.In favor ofinputs
as of SmartGWT release 13.1List of multiple fields from theprocess state
which are provided as input data to this task. SeeTaskIO
.- Returns:
- Current inputFieldList value. Default value is null
- See Also:
-
setInputs
Defines how fields in theprocess state
are extracted for the input record to this task.When
inputs
is an object, the keys are thesetter paths
of the fields to be set in the input record, and the values are literals ortaskInputExpressions
. SeeTaskIO
.- Parameters:
inputs
- New inputs value. Default value is null- Returns:
Task
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created- See Also:
-
getInputs
Defines how fields in theprocess state
are extracted for the input record to this task.When
inputs
is an object, the keys are thesetter paths
of the fields to be set in the input record, and the values are literals ortaskInputExpressions
. SeeTaskIO
.- Returns:
- Current inputs value. Default value is null
- See Also:
-
setInputs
Defines how fields in theprocess state
are extracted for the input record to this task.When
inputs
is an object, the keys are thesetter paths
of the fields to be set in the input record, and the values are literals ortaskInputExpressions
. SeeTaskIO
.- Parameters:
inputs
- New inputs value. Default value is null- Returns:
Task
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created- See Also:
-
getInputsAsStringArray
Defines how fields in theprocess state
are extracted for the input record to this task.When
inputs
is an object, the keys are thesetter paths
of the fields to be set in the input record, and the values are literals ortaskInputExpressions
. SeeTaskIO
.- Returns:
- Current inputs value. Default value is null
- See Also:
-
setInputs
Defines how fields in theprocess state
are extracted for the input record to this task.When
inputs
is an object, the keys are thesetter paths
of the fields to be set in the input record, and the values are literals ortaskInputExpressions
. SeeTaskIO
.- Parameters:
inputs
- New inputs value. Default value is null- Returns:
Task
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created- See Also:
-
getInputsAsString
Defines how fields in theprocess state
are extracted for the input record to this task.When
inputs
is an object, the keys are thesetter paths
of the fields to be set in the input record, and the values are literals ortaskInputExpressions
. SeeTaskIO
.- Returns:
- Current inputs value. Default value is null
- See Also:
-
setOutputExpression
Special expression to write task output directly into aDataBoundComponent
. SeeTaskIO
.- Parameters:
outputExpression
- New outputExpression value. Default value is null- Returns:
Task
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created- See Also:
-
getOutputExpression
Special expression to write task output directly into aDataBoundComponent
. SeeTaskIO
.- Returns:
- Current outputExpression value. Default value is null
- See Also:
-
setOutputField
Field in theprocess state
where this task writes outputs. SeeTaskIO
.- Parameters:
outputField
- New outputField value. Default value is null- Returns:
Task
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created- See Also:
-
getOutputField
Field in theprocess state
where this task writes outputs. SeeTaskIO
.- Returns:
- Current outputField value. Default value is null
- See Also:
-
setOutputFieldList
List of multiple fields in theprocess state
where this task will write outputs. SeeTaskIO
.If
outputField
is also specified, it will be implicitly added to theoutputFieldList
if it is not already present.- Parameters:
outputFieldList
- New outputFieldList value. Default value is null- Returns:
Task
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created- See Also:
-
getOutputFieldList
List of multiple fields in theprocess state
where this task will write outputs. SeeTaskIO
.If
outputField
is also specified, it will be implicitly added to theoutputFieldList
if it is not already present.- Returns:
- Current outputFieldList value. Default value is null
- See Also:
-
setStrictPaths
If set to true, the task will not allow any intermediate state to be set viasetState()
that is not explicitly defined first. This requirement can be overridden by an optional value in thesetState()
call.This setting can be applied to the entire process with
Process.strictPaths
.- Parameters:
strictPaths
- New strictPaths value. Default value is null- Returns:
Task
instance, for chaining setter calls
-
getStrictPaths
If set to true, the task will not allow any intermediate state to be set viasetState()
that is not explicitly defined first. This requirement can be overridden by an optional value in thesetState()
call.This setting can be applied to the entire process with
Process.strictPaths
.- Returns:
- Current strictPaths value. Default value is null
-
getExpressionValue
Get the value of ainputExpression
.- Parameters:
value
- expression to evaluate- Returns:
- value of expression
- See Also:
-
getInputRecord
Get all inputs to the task as specified by theinputs
, as a Record.- Returns:
- input record
- See Also:
-
getState
Returns a value from theprocess state
. Values can be written into the process state bysetState()
, settingProcessElement.bindOutput
, or various task output settings (SeeTaskIO
.)- Parameters:
statePath
- path to the value in the process state to set. Segments are separated by a decimal point (.)- Returns:
- the value found at the path
-
setOutput
Sets the task output available to the next task viaProcess.getLastTaskOutput()
or more commonly, with aTaskInputExpression
property. IfoutputFieldList
is specified, the output will also be written to the specified fields in the process state (SeeTaskIO
).To have the output written as-is to the process state, see
bindOutput
.- Parameters:
output
- output record to provide to next task
-
setState
Sets aprocess state
value for later reference withProcess.getStateVariable()
or more commonly with aTaskInputExpression
property.The path, which is one or more valid identifiers separated by periods, is used to identify the variable. By appending an empty pair of brackets ([]) the value will be placed into an existing or new array at the specified path.
- Parameters:
stateVariablePath
- path to the variable in the process state to set. segments are separated by a decimal point (.)value
- the value to save. SeeTaskInputExpression
strict
- if true, the path must exist in the state to be set. If false, the path will be created if it does not exist. Defaults toprocess.strictPaths
when null.
-
inputs
as of SmartGWT release 13.1