public class ScriptTask extends Task
execute
method to provide custom logic.config, 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
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) |
protected void |
onInit_ScriptTask() |
protected void |
onInit() |
void |
setIsAsync(java.lang.Boolean isAsync)
Whether the script task is asynchronous.
|
void |
setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj) |
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. |
getInputField, getInputFields, getOutputField, getOutputFields, setInputField, setInputFields, setOutputField, setOutputFields
convertToJavaScriptArray, getID, getJsObj, getNextElement, getOrCreateJsObj, getProcessElements, isCreated, setAttribute, setID, setNextElement
asSGWTComponent, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getRef, getScClassName, internalSetID, internalSetID, onBind, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setProperty, setProperty, setProperty, setProperty, 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 void setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)
setJavaScriptObject
in class Task
public void 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 ScriptTask.setOutputData
or ScriptTask.setOutputRecord
is called.
isAsync
- isAsync Default value is falsejava.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 ScriptTask.setOutputData
or ScriptTask.setOutputRecord
is called.
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
ScriptTask.setOutputRecord
instead, and return nullpublic java.lang.Object getInputData()
inputField
.
For a task with a inputFieldList
, use ScriptTask.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 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()