com.smartgwt.client.util.workflow
Class UserTask

java.lang.Object
  extended by com.smartgwt.client.core.BaseClass
      extended by com.smartgwt.client.util.workflow.ProcessElement
          extended by com.smartgwt.client.util.workflow.Task
              extended by com.smartgwt.client.util.workflow.UserTask

public class UserTask
extends Task

A task that involves showing a user interface to the end user allowing the user to view and input data and press a button (or do some other UI gesture) to complete the task.

A UserTask takes the following steps:


Field Summary
 
Fields inherited from class com.smartgwt.client.core.BaseClass
config, id, scClassName
 
Constructor Summary
UserTask()
           
UserTask(JavaScriptObject jsObj)
           
UserTask(String ID)
           
 
Method Summary
 void cancelEditing()
          Revert any changes made in a form and finish this userTask execution.
 void completeEditing()
          Finish editing and store edited values in process state.
 JavaScriptObject create()
           
 String getCancelElement()
          Next element to proceed to if the task is cancelled because the targetForm or targetVM had cancelEditing() called on it.
static UserTask getOrCreateRef(JavaScriptObject jsObj)
           
 DynamicForm getTargetForm()
          DynamicForm that should be populated with data and that should provide the data for the task outputs.
 Canvas getTargetView()
          Optional widget that should be shown to allow user input.
 ValuesManager getTargetVM()
          Optional ValuesManager which will receive task inputs and provide task outputs.
 void setCancelElement(String cancelElement)
          Next element to proceed to if the task is cancelled because the targetForm or targetVM had cancelEditing() called on it.
 void setTargetForm(DynamicForm targetForm)
          DynamicForm that should be populated with data and that should provide the data for the task outputs.
 void setTargetView(Canvas targetView)
          Optional widget that should be shown to allow user input.
 void setTargetView(String targetView)
          Optional widget that should be shown to allow user input.
 void setTargetVM(String targetVM)
          Optional ValuesManager which will receive task inputs and provide task outputs.
 void setTargetVM(ValuesManager targetVM)
          Optional ValuesManager which will receive task inputs and provide task outputs.
 
Methods inherited from class com.smartgwt.client.util.workflow.Task
getInputField, getInputFields, getOutputField, getOutputFields, setInputField, setInputFields, setOutputField, setOutputFields
 
Methods inherited from class com.smartgwt.client.util.workflow.ProcessElement
convertToJavaScriptArray, getID, getJsObj, getNextElement, getOrCreateJsObj, getProcessElements, isCreated, setAttribute, setID, setNextElement
 
Methods inherited from class com.smartgwt.client.core.BaseClass
destroy, doAddHandler, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getConfig, getHandlerCount, getRef, getScClassName, onInit, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setProperty, setProperty, setProperty, setProperty, setScClassName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserTask

public UserTask()

UserTask

public UserTask(JavaScriptObject jsObj)

UserTask

public UserTask(String ID)
Method Detail

getOrCreateRef

public static UserTask getOrCreateRef(JavaScriptObject jsObj)

create

public JavaScriptObject create()
Overrides:
create in class Task

setCancelElement

public void setCancelElement(String cancelElement)
                      throws IllegalStateException
Next element to proceed to if the task is cancelled because the targetForm or targetVM had cancelEditing() called on it.

Parameters:
cancelElement - cancelElement Default value is null
Throws:
IllegalStateException - this property cannot be changed after the underlying component has been created

getCancelElement

public String getCancelElement()
Next element to proceed to if the task is cancelled because the targetForm or targetVM had cancelEditing() called on it.

Returns:
String

setTargetForm

public void setTargetForm(DynamicForm targetForm)
                   throws IllegalStateException
DynamicForm that should be populated with data and that should provide the data for the task outputs.

Use targetVM to use a ValuesManager instead.

Parameters:
targetForm - targetForm Default value is null
Throws:
IllegalStateException - this property cannot be changed after the underlying component has been created

getTargetForm

public DynamicForm getTargetForm()
DynamicForm that should be populated with data and that should provide the data for the task outputs.

Use targetVM to use a ValuesManager instead.

Returns:
DynamicForm

cancelEditing

public void cancelEditing()
Revert any changes made in a form and finish this userTask execution. cancelElement will be proceed as the next element of current process.


completeEditing

public void completeEditing()
Finish editing and store edited values in process state.


setTargetView

public void setTargetView(Canvas targetView)
Optional widget that should be shown to allow user input. If this widget is a DynamicForm, it will also be automatically used as the targetForm unless either targetForm or targetVM is set.

UserTask will automatically handle various scenarios of the targetView being not currently visible or draw()n, according to the following rules:

Parameters:
targetView - targetView Default value is null

getTargetView

public Canvas getTargetView()
Optional widget that should be shown to allow user input. If this widget is a DynamicForm, it will also be automatically used as the targetForm unless either targetForm or targetVM is set.

UserTask will automatically handle various scenarios of the targetView being not currently visible or draw()n, according to the following rules:

Returns:
Canvas

setTargetView

public void setTargetView(String targetView)
Optional widget that should be shown to allow user input. If this widget is a DynamicForm, it will also be automatically used as the targetForm unless either targetForm or targetVM is set.

UserTask will automatically handle various scenarios of the targetView being not currently visible or draw()n, according to the following rules:

Parameters:
targetView - targetView Default value is null

setTargetVM

public void setTargetVM(ValuesManager targetVM)
Optional ValuesManager which will receive task inputs and provide task outputs. Use targetForm instead of you want to use a DynamicForm.

Parameters:
targetVM - targetVM Default value is null

getTargetVM

public ValuesManager getTargetVM()
Optional ValuesManager which will receive task inputs and provide task outputs. Use targetForm instead of you want to use a DynamicForm.

Returns:
ValuesManager

setTargetVM

public void setTargetVM(String targetVM)
Optional ValuesManager which will receive task inputs and provide task outputs. Use targetForm instead of you want to use a DynamicForm.

Parameters:
targetVM - targetVM Default value is null