public class ScriptTask extends Task
execute()
method to provide custom logic.config, configOnly, factoryCreated, factoryProperties, id, scClassName
Constructor and Description |
---|
ScriptTask() |
ScriptTask(com.google.gwt.core.client.JavaScriptObject jsObj) |
ScriptTask(java.lang.String ID) |
ScriptTask(java.lang.String ID,
ProcessElement nextElement) |
ScriptTask(java.lang.String ID,
java.lang.String nextElement) |
Modifier and Type | Method and Description |
---|---|
com.google.gwt.core.client.JavaScriptObject |
create() |
java.lang.Object |
execute(java.lang.Object input,
Record inputRecord)
Execute the task.
|
java.lang.Object |
getInputData()
Get the inputs to this task as specified by
Task.inputField . |
Record |
getInputRecord()
Get all inputs to the task as specified by the
inputFieldList , as a Record. |
java.lang.Boolean |
getIsAsync()
Whether the script task is asynchronous.
|
static ScriptTask |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
java.lang.Boolean |
getPassThruOutput()
Does this processElement pass through output from the last executed task (i.e.
|
Process |
getProcess()
Get the process executing this task instance.
|
protected void |
onInit_ScriptTask() |
protected void |
onInit() |
ScriptTask |
setIsAsync(java.lang.Boolean isAsync)
Whether the script task is asynchronous.
|
void |
setOutputData(java.lang.Object taskOutput)
Set the task output as specified by
outputField . |
void |
setOutputRecord(Record outputRecord)
Set all outputs of the task as specified by the
outputFieldList , by providing a Record. |
ScriptTask |
setPassThruOutput(java.lang.Boolean passThruOutput)
Does this processElement pass through output from the last executed task (i.e.
|
getInputField, getInputFieldList, getOutputExpression, getOutputField, getOutputFieldList, setInputField, setInputFieldList, setOutputExpression, setOutputField, setOutputFieldList
completeElement, convertToJavaScriptArray, executeElement, getBindOutput, getClassDescription, getDescription, getDynamicValue, getEditorType, getElementDescription, getForceSingle, getID, getJsObj, getMockMode, getNextElement, getOrCreateJsObj, getProcessElements, getSupportsMultipleInputRecords, getTextFormulaValue, getTypeTitle, isCreated, objectReferencesLastTaskOutput, reset, setAttribute, setBindOutput, setClassDescription, setDescription, setEditorType, setForceSingle, setID, setJavaScriptObject, setMockMode, setNextElement, setSupportsMultipleInputRecords, setTypeTitle, updateGlobalIDInCriteria, updateGlobalIDInValueProperty, updateGlobalIDInValues, updateGlobalIDReferences, updateLastElementBindingReferences, updateLastElementInCriteria, updateLastElementInValueProperty, updateLastElementInValues
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
public ScriptTask()
public ScriptTask(com.google.gwt.core.client.JavaScriptObject jsObj)
public ScriptTask(java.lang.String ID)
public ScriptTask(java.lang.String ID, java.lang.String nextElement)
public ScriptTask(java.lang.String ID, ProcessElement nextElement)
public static ScriptTask getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public ScriptTask setIsAsync(java.lang.Boolean isAsync) throws java.lang.IllegalStateException
An asnychronous task is expected to start processing in
execute(), and will not be considered complete until either setOutputData()
or setOutputRecord()
is called.
isAsync
- New isAsync value. Default value is falseScriptTask
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the underlying component has been createdpublic java.lang.Boolean getIsAsync()
An asnychronous task is expected to start processing in
execute(), and will not be considered complete until either setOutputData()
or setOutputRecord()
is called.
public ScriptTask setPassThruOutput(java.lang.Boolean passThruOutput) throws java.lang.IllegalStateException
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()
).
setPassThruOutput
in class ProcessElement
passThruOutput
- New passThruOutput value. Default value is falseScriptTask
instance, for chaining setter callsjava.lang.IllegalStateException
- this property cannot be changed after the underlying component has been createdpublic java.lang.Boolean getPassThruOutput()
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()
).
getPassThruOutput
in class ProcessElement
public java.lang.Object execute(java.lang.Object input, Record inputRecord)
input
- the task inputinputRecord
- the task input record if an inputFieldList
was specified. See TaskIO
setOutputRecord()
instead, and return nullpublic java.lang.Object getInputData()
Task.inputField
. For a task with a inputFieldList
,
use getInputRecord()
to get access to other inputs.
TaskIO overview and related methods
public Record getInputRecord()
inputFieldList
, as a Record.TaskIO overview and related methods
public Process getProcess()
public void setOutputRecord(Record outputRecord)
outputFieldList
, by providing a Record.outputRecord
- output recordTaskIO overview and related methods
public void setOutputData(java.lang.Object taskOutput)
outputField
. NOTE:
for an asychronous task, calling setOutputData()
indicates the task is complete. For a task with multiple outputs
, call ScriptTask.setOutputRecord
instead.
taskOutput
- task outputprotected void onInit_ScriptTask()
protected void onInit()
onInit
in class ProcessElement