Class StateTask
java.lang.Object
com.smartgwt.client.core.BaseClass
com.smartgwt.client.util.workflow.ProcessElement
com.smartgwt.client.util.workflow.Task
com.smartgwt.client.util.workflow.StateTask
- All Implemented Interfaces:
HasHandlers
StateTask can either copy fields of
Process.state
to other
fields, or apply hardcoded values to Process.state
via value
. Some examples:
- inputField: "a", outputField: "b" - copies "a" to "b"
- inputField: "a", outputField: "b", type: "integer" - copies "a" to "b" converting "a" to an integer
- inputFieldList: ["a","b"], outputField: ["c","d"] - copies "a" and "b" to "c" and "d" respectively.
-
Field Summary
Fields inherited from class com.smartgwt.client.core.BaseClass
config, configOnly, factoryCreated, factoryProperties, id, scClassName
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
ID of the next sequence or element to proceed to if a failure condition arises, such as the output data not being convertible to the targettype
.The default message to be reported withgetInvalidTaskMessage()
when theinputFieldList
andoutputFieldList
properties do not have the same length.static StateTask
getOrCreateRef
(JavaScriptObject jsObj) Does this processElement pass through output from the last executed task (i.e.setFailureElement
(String failureElement) ID of the next sequence or element to proceed to if a failure condition arises, such as the output data not being convertible to the targettype
.setFieldListsLengthMismatchMessage
(String fieldListsLengthMismatchMessage) The default message to be reported withgetInvalidTaskMessage()
when theinputFieldList
andoutputFieldList
properties do not have the same length.setPassThruOutput
(Boolean passThruOutput) Does this processElement pass through output from the last executed task (i.e.Methods inherited from class com.smartgwt.client.util.workflow.Task
getInputField, getInputFieldList, getOutputExpression, getOutputField, getOutputFieldList, setInputField, setInputFieldList, setOutputExpression, setOutputField, setOutputFieldList
Methods inherited from class com.smartgwt.client.util.workflow.ProcessElement
completeElement, convertToJavaScriptArray, executeElement, getBindOutput, getClassDescription, getComponentReferences, getDescription, getDynamicValue, getEditorType, getElementDescription, getForceSingle, getID, getInvalidTaskMessage, getJsObj, getMockMode, getNextElement, getOrCreateJsObj, getProcessElements, getSupportsMultipleInputRecords, getTextFormulaValue, getTypeTitle, getUndefinedComponentMessage, getUnresolvedComponentMessage, getWaitDuration, getWaitFor, getWaitLocator, isCreated, isValid, objectReferencesLastTaskOutput, onInit, reset, setAttribute, setBindOutput, setClassDescription, setDescription, setEditorType, setForceSingle, setID, setJavaScriptObject, setMockMode, setNextElement, 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
-
StateTask
public StateTask() -
StateTask
-
-
Method Details
-
getOrCreateRef
-
create
-
setFailureElement
ID of the next sequence or element to proceed to if a failure condition arises, such as the output data not being convertible to the targettype
.- Parameters:
failureElement
- New failureElement value. Default value is null- Returns:
StateTask
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getFailureElement
ID of the next sequence or element to proceed to if a failure condition arises, such as the output data not being convertible to the targettype
.- Returns:
- Current failureElement value. Default value is null
-
setFieldListsLengthMismatchMessage
public StateTask setFieldListsLengthMismatchMessage(String fieldListsLengthMismatchMessage) throws IllegalStateException The default message to be reported withgetInvalidTaskMessage()
when theinputFieldList
andoutputFieldList
properties do not have the same length.- Parameters:
fieldListsLengthMismatchMessage
- New fieldListsLengthMismatchMessage value. Default value is "outputFieldList should have same number of parameters as inputFieldList"- Returns:
StateTask
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getFieldListsLengthMismatchMessage
The default message to be reported withgetInvalidTaskMessage()
when theinputFieldList
andoutputFieldList
properties do not have the same length.- Returns:
- Current fieldListsLengthMismatchMessage value. Default value is "outputFieldList should have same number of parameters as inputFieldList"
-
setPassThruOutput
Does this processElement pass through output from the last executed task (i.e. transient state)?See
taskInputExpressions
for details on the transient state outputs.Note that this property does not affect the task at all but is an indicator to the user and to the workflow editor of the behavior of the task as coded (See
Process.passThruTaskOutput()
).- Overrides:
setPassThruOutput
in classProcessElement
- Parameters:
passThruOutput
- New passThruOutput value. Default value is false- Returns:
StateTask
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getPassThruOutput
Does this processElement pass through output from the last executed task (i.e. transient state)?See
taskInputExpressions
for details on the transient state outputs.Note that this property does not affect the task at all but is an indicator to the user and to the workflow editor of the behavior of the task as coded (See
Process.passThruTaskOutput()
).- Overrides:
getPassThruOutput
in classProcessElement
- Returns:
- Current passThruOutput value. Default value is false
-