com.smartgwt.client.util.workflow
Class ProcessElement

java.lang.Object
  extended by com.smartgwt.client.core.BaseClass
      extended by com.smartgwt.client.util.workflow.ProcessElement
Direct Known Subclasses:
DecisionGateway, ProcessSequence, Task, XORGateway

public class ProcessElement
extends BaseClass

A ProcessElement is an abstract superclass for elements involved in a Process, such as a Task or XORGateway.


Field Summary
 
Fields inherited from class com.smartgwt.client.core.BaseClass
config, id, scClassName
 
Constructor Summary
ProcessElement()
           
ProcessElement(JavaScriptObject jsObj)
           
ProcessElement(String ID)
           
ProcessElement(String ID, String nextElement)
           
 
Method Summary
static JavaScriptObject convertToJavaScriptArray(ProcessElement[] array)
           
 JavaScriptObject create()
           
 String getID()
          Optional ID for this process element, allowing it to be referred to from Gateways, or as the startElement.
 JavaScriptObject getJsObj()
           
 String getNextElement()
          Next sequence or element to execute after this one completes.
 JavaScriptObject getOrCreateJsObj()
           
static ProcessElement getOrCreateRef(JavaScriptObject jsObj)
           
 ProcessElement[] getProcessElements(String attribute)
           
 boolean isCreated()
           
protected  void onInit()
           
 void setAttribute(String attribute, ProcessElement[] value, boolean allowPostCreate)
           
 void setID(String ID)
          Optional ID for this process element, allowing it to be referred to from Gateways, or as the startElement.
 void setJavaScriptObject(JavaScriptObject jsObj)
           
 void setNextElement(String nextElement)
          Next sequence or element to execute after this one completes.
 
Methods inherited from class com.smartgwt.client.core.BaseClass
asSGWTComponent, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getRef, getScClassName, hasAutoAssignedID, internalSetID, internalSetID, onBind, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, 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

ProcessElement

public ProcessElement()

ProcessElement

public ProcessElement(JavaScriptObject jsObj)

ProcessElement

public ProcessElement(String ID)

ProcessElement

public ProcessElement(String ID,
                      String nextElement)
Method Detail

getOrCreateRef

public static ProcessElement getOrCreateRef(JavaScriptObject jsObj)

setJavaScriptObject

public void setJavaScriptObject(JavaScriptObject jsObj)
Overrides:
setJavaScriptObject in class BaseClass

create

public JavaScriptObject create()
Specified by:
create in class BaseClass

isCreated

public boolean isCreated()
Overrides:
isCreated in class BaseClass

getJsObj

public JavaScriptObject getJsObj()
Overrides:
getJsObj in class BaseClass

getOrCreateJsObj

public JavaScriptObject getOrCreateJsObj()
Overrides:
getOrCreateJsObj in class BaseClass

setID

public void setID(String ID)
           throws IllegalStateException
Optional ID for this process element, allowing it to be referred to from Gateways, or as the startElement. See ProcessSequence and Process to understand when this is required or can be omitted.

Unlike ID a processElement's is a not a globally unique variable, it need only by unique within it's process.

When assigned an ID, a processElement can be retrieve via Process.getElement.

Overrides:
setID in class BaseClass
Parameters:
ID - Default value is null
Throws:
IllegalStateException - this property cannot be changed after the underlying component has been created

getID

public String getID()
Optional ID for this process element, allowing it to be referred to from Gateways, or as the startElement. See ProcessSequence and Process to understand when this is required or can be omitted.

Unlike ID a processElement's is a not a globally unique variable, it need only by unique within it's process.

When assigned an ID, a processElement can be retrieve via Process.getElement.

Overrides:
getID in class BaseClass
Returns:
String

setNextElement

public void setNextElement(String nextElement)
                    throws IllegalStateException
Next sequence or element to execute after this one completes. Sequences are checked first. nextElement does not need to be specified on most elements if you use sequences.

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

getNextElement

public String getNextElement()
Next sequence or element to execute after this one completes. Sequences are checked first. nextElement does not need to be specified on most elements if you use sequences.

Returns:
String

onInit

protected void onInit()
Overrides:
onInit in class BaseClass

setAttribute

public void setAttribute(String attribute,
                         ProcessElement[] value,
                         boolean allowPostCreate)

getProcessElements

public ProcessElement[] getProcessElements(String attribute)

convertToJavaScriptArray

public static JavaScriptObject convertToJavaScriptArray(ProcessElement[] array)