Class ProcessElement
- All Implemented Interfaces:
HasHandlers
- Direct Known Subclasses:
ComponentTask
,DecisionTask
,EndProcessTask
,LogOutTask
,MultiDecisionTask
,ProcessSequence
,ResetPasswordTask
,SendTransactionTask
,ShowMessageTask
,ShowNotificationTask
,StartTransactionTask
,Task
,UserConfirmationGateway
,UserConfirmationTask
Process
,
such as a Task
or DecisionTask
.-
Field Summary
Fields inherited from class com.smartgwt.client.core.BaseClass
config, configOnly, factoryCreated, factoryProperties, id, scClassName
-
Constructor Summary
ConstructorDescriptionProcessElement
(JavaScriptObject jsObj) ProcessElement
(String ID) ProcessElement
(String ID, String nextElement) -
Method Summary
Modifier and TypeMethodDescriptionvoid
completeElement
(Process process) StringMethod called when a processElement completes.static JavaScriptObject
convertToJavaScriptArray
(ProcessElement[] array) create()
executeElement
(Process process) Method called byProcess
to have the processElement perform its work.When set, the output of the task will be automatically bound to the specified value in theprocess state
.Optional description of the general nature of the kinds of tasks this this process element performs.String[]
Returns a list of unique global IDs that are referenced by this task.Optional description for this specific instance of process element.getDynamicValue
(String value, Process process) Resolves a dynamic value astaskInputExpressions
or returns the value as-is.Editor type used to edit instances of this type of process element.Returns a text description of the element derived from the configuration.Shouldmultiple record processing
be suppressed for this task instance? This property can be set at any time is checked before executing the task and after each execution during processing of multiple last task output records.getID()
Optional ID for this process element, allowing it to be referred to fromDecisions
, or as theProcess.startElement
.getInvalidTaskMessage
(Process process) If this processElement is notvalid
, returns the message detailing the problem.getJsObj()
Enable mock mode on the task? IfProcess.mockMode
is enabled, setting this property tofalse
disables mockMode on this task only.static ProcessElement
getOrCreateRef
(JavaScriptObject jsObj) Does this processElement pass through output from the last executed task (i.e.getProcessElements
(String attribute) Does this processElement support being called multiple times for multiple records in thelast task output
?getTextFormulaValue
(UserSummary textFormula, Process process) Resolves aUserSummary
value against the currentrule context
.Optional short, descriptive title for this process element.The default message to be reported withgetInvalidTaskMessage()
when a target component property is not defined.The default message to be reported withgetInvalidTaskMessage()
when a target component cannot be resolved.WhenwaitFor
orProcess.defaultWaitFor
are set to "duration", how long should the wait be before starting the task? If not specified,Process.defaultWaitDuration
is used.Condition to wait for before this task is executed.Component specified as anAutoTestLocator
that should be waited on ifwaitFor
is "locator" or "locatorAndSystemDone".boolean
Is this processElement valid for execution? Called byProcess
to check the validity of the task before executing it (executeElement()
).objectReferencesLastTaskOutput
(Map object, Process process) Does the object have fields that reference the last task output (i.e.protected void
onInit()
void
reset()
StringMethod called duringProcess.reset()
giving the task a chance to reset any internal state so it can be executed later.setAttribute
(String attribute, ProcessElement[] value, boolean allowPostCreate) setBindOutput
(String bindOutput) When set, the output of the task will be automatically bound to the specified value in theprocess state
.setClassDescription
(String classDescription) Optional description of the general nature of the kinds of tasks this this process element performs.setDescription
(String description) Optional description for this specific instance of process element.setEditorType
(String editorType) Editor type used to edit instances of this type of process element.setForceSingle
(Boolean forceSingle) Shouldmultiple record processing
be suppressed for this task instance? This property can be set at any time is checked before executing the task and after each execution during processing of multiple last task output records.Optional ID for this process element, allowing it to be referred to fromDecisions
, or as theProcess.startElement
.void
setMockMode
(Boolean mockMode) Enable mock mode on the task? IfProcess.mockMode
is enabled, setting this property tofalse
disables mockMode on this task only.setNextElement
(String nextElement) setPassThruOutput
(Boolean passThruOutput) Does this processElement pass through output from the last executed task (i.e.setSupportsMultipleInputRecords
(Boolean supportsMultipleInputRecords) Does this processElement support being called multiple times for multiple records in thelast task output
?setTypeTitle
(String typeTitle) Optional short, descriptive title for this process element.setUndefinedComponentMessage
(String undefinedComponentMessage) The default message to be reported withgetInvalidTaskMessage()
when a target component property is not defined.setUnresolvedComponentMessage
(String unresolvedComponentMessage) The default message to be reported withgetInvalidTaskMessage()
when a target component cannot be resolved.setWaitDuration
(Integer waitDuration) WhenwaitFor
orProcess.defaultWaitFor
are set to "duration", how long should the wait be before starting the task? If not specified,Process.defaultWaitDuration
is used.setWaitFor
(WaitForType waitFor) Condition to wait for before this task is executed.setWaitLocator
(String waitLocator) Component specified as anAutoTestLocator
that should be waited on ifwaitFor
is "locator" or "locatorAndSystemDone".updateGlobalIDInCriteria
(AdvancedCriteria criteria, String oldId, String newId) updateGlobalIDInTextFormula
(UserSummary textFormula, String oldId, String newId) Updatestext formula
containing ruleScope references.updateGlobalIDInValueProperty
(String propertyName, String oldId, String newId) Updates aTaskInputExpression
property value containing ruleScope references.updateGlobalIDInValues
(Map values, String oldId, String newId) Updates a set ofTaskInputExpression
values containing ruleScope references.updateGlobalIDReferences
(String oldId, String newId) Updates references to a global ID within the properties of this process element (i.e.updateLastElementBindingReferences
(String oldId, String newId) Update references to a binding $last within properties of this processElement.updateLastElementInCriteria
(AdvancedCriteria criteria, String taskType) updateLastElementInValueProperty
(String propertyName, String taskType) Updates aTaskInputExpression
property value containing $last references.updateLastElementInValues
(Map values, String taskType) Updates a set ofTaskInputExpression
values containing $last references.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
-
ProcessElement
public ProcessElement() -
ProcessElement
-
ProcessElement
-
ProcessElement
-
-
Method Details
-
getOrCreateRef
-
setJavaScriptObject
- Overrides:
setJavaScriptObject
in classBaseClass
-
create
-
isCreated
public boolean isCreated() -
getJsObj
-
getOrCreateJsObj
- Overrides:
getOrCreateJsObj
in classBaseClass
-
setBindOutput
When set, the output of the task will be automatically bound to the specified value in theprocess state
.See
taskInputExpressions
for details on the transient state outputs.- Parameters:
bindOutput
- New bindOutput value. Default value is null- Returns:
ProcessElement
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getBindOutput
When set, the output of the task will be automatically bound to the specified value in theprocess state
.See
taskInputExpressions
for details on the transient state outputs.- Returns:
- Current bindOutput value. Default value is null
-
setClassDescription
Optional description of the general nature of the kinds of tasks this this process element performs. Not to be confused withdescription
which describes what the specific instance of the process element has been configured to do.For example, the
classDescription
for a task to disable a field might be "disables a field" whereas thedescription
for a concrete instance might be "disables the 'shipTo' field in the 'ordering' form".Used by editor to display additional details along with
typeTitle
.- Parameters:
classDescription
- New classDescription value. Default value is null- Returns:
ProcessElement
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getClassDescription
Optional description of the general nature of the kinds of tasks this this process element performs. Not to be confused withdescription
which describes what the specific instance of the process element has been configured to do.For example, the
classDescription
for a task to disable a field might be "disables a field" whereas thedescription
for a concrete instance might be "disables the 'shipTo' field in the 'ordering' form".Used by editor to display additional details along with
typeTitle
.- Returns:
- Current classDescription value. Default value is null
-
setDescription
Optional description for this specific instance of process element.- Parameters:
description
- New description value. Default value is null- Returns:
ProcessElement
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getDescription
Optional description for this specific instance of process element.- Returns:
- Current description value. Default value is null
-
setEditorType
Editor type used to edit instances of this type of process element.- Parameters:
editorType
- New editorType value. Default value is null- Returns:
ProcessElement
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getEditorType
Editor type used to edit instances of this type of process element.- Returns:
- Returns the workflow task editor type to be used edit instances of this type of process element. The default
implementation returns
this.editorType
but a custom override could determine an editor type based on the property values. Default value is null
-
setForceSingle
Shouldmultiple record processing
be suppressed for this task instance? This property can be set at any time is checked before executing the task and after each execution during processing of multiple last task output records.Note that since this property applies to an instance of a task that could be used multiple times in a process (by branching) care should be taken to restore the property value after execution completes. See
completeElement()
orreset()
.- Parameters:
forceSingle
- New forceSingle value. Default value is null- Returns:
ProcessElement
instance, for chaining setter calls
-
getForceSingle
Shouldmultiple record processing
be suppressed for this task instance? This property can be set at any time is checked before executing the task and after each execution during processing of multiple last task output records.Note that since this property applies to an instance of a task that could be used multiple times in a process (by branching) care should be taken to restore the property value after execution completes. See
completeElement()
orreset()
.- Returns:
- Current forceSingle value. Default value is null
-
setID
Optional ID for this process element, allowing it to be referred to fromDecisions
, or as theProcess.startElement
. SeeProcessSequence
andProcess
to understand when this is required or can be omitted.Unlike
Canvas.ID
aprocessElement
's is a not a globally unique variable, it need only by unique within its process.When assigned an ID, a
processElement
can be retrieve viaProcess.getElement()
.- Overrides:
setID
in classBaseClass
- Parameters:
ID
- New ID value. Default value is null- Returns:
ProcessElement
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getID
Optional ID for this process element, allowing it to be referred to fromDecisions
, or as theProcess.startElement
. SeeProcessSequence
andProcess
to understand when this is required or can be omitted.Unlike
Canvas.ID
aprocessElement
's is a not a globally unique variable, it need only by unique within its process.When assigned an ID, a
processElement
can be retrieve viaProcess.getElement()
. -
setMockMode
Enable mock mode on the task? IfProcess.mockMode
is enabled, setting this property tofalse
disables mockMode on this task only. Otherwise, mock mode can be enabled on this task by setting it totrue
.Note that it is up to each task determine what effect mock mode has.
- Parameters:
mockMode
- New mockMode value. Default value is null- Returns:
ProcessElement
instance, for chaining setter calls
-
getMockMode
Enable mock mode on the task? IfProcess.mockMode
is enabled, setting this property tofalse
disables mockMode on this task only. Otherwise, mock mode can be enabled on this task by setting it totrue
.Note that it is up to each task determine what effect mock mode has.
- Returns:
- Current mockMode value. Default value is null
-
setNextElement
Nextsequence
orelement
to execute after this one completes.nextElement
does not need to be specified on most elements if you usesequences
.Note that if there is both a
sequence
and a normalelement
with the same name in the currentProcess
, thesequence
will be used.- Parameters:
nextElement
- New nextElement value. Default value is null- Returns:
ProcessElement
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getNextElement
Nextsequence
orelement
to execute after this one completes.nextElement
does not need to be specified on most elements if you usesequences
.Note that if there is both a
sequence
and a normalelement
with the same name in the currentProcess
, thesequence
will be used.- Returns:
- Current nextElement value. Default value is null
-
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()
).- Parameters:
passThruOutput
- New passThruOutput value. Default value is true- Returns:
ProcessElement
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()
).- Returns:
- Current passThruOutput value. Default value is true
-
setSupportsMultipleInputRecords
public ProcessElement setSupportsMultipleInputRecords(Boolean supportsMultipleInputRecords) throws IllegalStateException Does this processElement support being called multiple times for multiple records in thelast task output
?By default a processElement is
executed
exactly once, however, for a task that can process records from the last task output it can be useful to handle each incoming record individually. Setting this property indicates to theprocess
that if the last task output is an array, it should be executed once per value in the array. Normal processing oftaskInputExpressions
or use ofProcess.getLastTaskOutput()
will have exactly one record except uses of the output for criteria values where the full output is used at once.Processing of the task can determine that multiple incoming records should not result in multiple calls and set
forceSingle
. For example, a task that uses last task output for a criteria or for values should setforceSingle=true
when a criteria is used because multiple calls do not make sense.- Parameters:
supportsMultipleInputRecords
- New supportsMultipleInputRecords value. Default value is null- Returns:
ProcessElement
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getSupportsMultipleInputRecords
Does this processElement support being called multiple times for multiple records in thelast task output
?By default a processElement is
executed
exactly once, however, for a task that can process records from the last task output it can be useful to handle each incoming record individually. Setting this property indicates to theprocess
that if the last task output is an array, it should be executed once per value in the array. Normal processing oftaskInputExpressions
or use ofProcess.getLastTaskOutput()
will have exactly one record except uses of the output for criteria values where the full output is used at once.Processing of the task can determine that multiple incoming records should not result in multiple calls and set
forceSingle
. For example, a task that uses last task output for a criteria or for values should setforceSingle=true
when a criteria is used because multiple calls do not make sense.- Returns:
- Current supportsMultipleInputRecords value. Default value is null
-
setTypeTitle
Optional short, descriptive title for this process element. Used by an editor as a title for process elements of this type.- Parameters:
typeTitle
- New typeTitle value. Default value is null- Returns:
ProcessElement
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getTypeTitle
Optional short, descriptive title for this process element. Used by an editor as a title for process elements of this type.- Returns:
- Current typeTitle value. Default value is null
-
setUndefinedComponentMessage
public ProcessElement setUndefinedComponentMessage(String undefinedComponentMessage) throws IllegalStateException The default message to be reported withgetInvalidTaskMessage()
when a target component property is not defined.- Parameters:
undefinedComponentMessage
- New undefinedComponentMessage value. Default value is "${propertyName} is not defined"- Returns:
ProcessElement
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getUndefinedComponentMessage
The default message to be reported withgetInvalidTaskMessage()
when a target component property is not defined.- Returns:
- Current undefinedComponentMessage value. Default value is "${propertyName} is not defined"
-
setUnresolvedComponentMessage
public ProcessElement setUnresolvedComponentMessage(String unresolvedComponentMessage) throws IllegalStateException The default message to be reported withgetInvalidTaskMessage()
when a target component cannot be resolved.- Parameters:
unresolvedComponentMessage
- New unresolvedComponentMessage value. Default value is "${propertyName} '${id}' could not be resolved"- Returns:
ProcessElement
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getUnresolvedComponentMessage
The default message to be reported withgetInvalidTaskMessage()
when a target component cannot be resolved.- Returns:
- Current unresolvedComponentMessage value. Default value is "${propertyName} '${id}' could not be resolved"
-
setWaitDuration
WhenwaitFor
orProcess.defaultWaitFor
are set to "duration", how long should the wait be before starting the task? If not specified,Process.defaultWaitDuration
is used.- Parameters:
waitDuration
- New waitDuration value. Default value is null- Returns:
ProcessElement
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getWaitDuration
WhenwaitFor
orProcess.defaultWaitFor
are set to "duration", how long should the wait be before starting the task? If not specified,Process.defaultWaitDuration
is used.- Returns:
- Current waitDuration value. Default value is null
-
setWaitFor
Condition to wait for before this task is executed. If not specified, the containingProcess
defaultWaitFor
is used.When set to "duration" the delay time is set by
waitDuration
orProcess.defaultWaitDuration
. For a value of "locator" the locator for which to wait is set bywaitLocator
.Since this waitFor overrides the
Process.defaultWaitFor
if the latter is set to "systemDone" and a task overrides it withwaitFor
"locator", be aware that the default "systemDone" is not performed. To apply both, as might be desired, usewaitFor
"locatorAndSystemDone".- Parameters:
waitFor
- New waitFor value. Default value is null- Returns:
ProcessElement
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getWaitFor
Condition to wait for before this task is executed. If not specified, the containingProcess
defaultWaitFor
is used.When set to "duration" the delay time is set by
waitDuration
orProcess.defaultWaitDuration
. For a value of "locator" the locator for which to wait is set bywaitLocator
.Since this waitFor overrides the
Process.defaultWaitFor
if the latter is set to "systemDone" and a task overrides it withwaitFor
"locator", be aware that the default "systemDone" is not performed. To apply both, as might be desired, usewaitFor
"locatorAndSystemDone".- Returns:
- Current waitFor value. Default value is null
-
setWaitLocator
Component specified as anAutoTestLocator
that should be waited on ifwaitFor
is "locator" or "locatorAndSystemDone".- Parameters:
waitLocator
- New waitLocator value. Default value is null- Returns:
ProcessElement
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created- See Also:
-
getWaitLocator
Component specified as anAutoTestLocator
that should be waited on ifwaitFor
is "locator" or "locatorAndSystemDone".- Returns:
- Current waitLocator value. Default value is null
- See Also:
-
completeElement
StringMethod called when a processElement completes. Typically used to clear transient state applied to the task while running likeforceSingle
so it can be executed again later. See alsoreset()
.- Parameters:
process
- the containing process
-
executeElement
Method called byProcess
to have the processElement perform its work. There is no default implementation by ProcessElement, however, all of the system-provided subclasses do implement this method. An implementation or override of this method is one possible customization point. Some classes likeScriptTask
perform other means to add customization. For ScriptTask, custom code is expected to handle theScriptTask.execute()
method instead.Any implementation of this method must return
true
if all the work this element needed to perform was completed. Returnfalse
if additional work is being performed asynchronously and the process should be paused until element restarts it. Once asynchronous work is complete the task must callProcess.start()
to restart the workflow with the next task.- Parameters:
process
- the process that is handling the workflow- Returns:
- return true if all the work this element needed to perform was completed. Return false if additional work is being performed asynchronously and the process should be paused until element restarts it.
-
getComponentReferences
Returns a list of unique global IDs that are referenced by this task.The default implementation returns nothing. Subclasses that add new potential component references should override this method calling
this.Super("getComponentReferences", arguments);
to allow superclasses to include references first. New references can then be added after checking that the referenced component ID is not already in the list.- Returns:
- array of component IDs that are referenced by this task
-
getDynamicValue
Resolves a dynamic value astaskInputExpressions
or returns the value as-is.- Parameters:
value
- the value to resolveprocess
- the current process- Returns:
- the resolved value
-
getElementDescription
Returns a text description of the element derived from the configuration.If no override is provided by the concrete ProcessElement implementation the
description
is returned.- Returns:
- the derived element description
-
getInvalidTaskMessage
If this processElement is notvalid
, returns the message detailing the problem. If there are multiple validation issues, the message may contain a message for each separated by anewline
.- Parameters:
process
- the process that is handling the workflow- Returns:
- the reason for task being invalid or null if valid
-
getTextFormulaValue
Resolves aUserSummary
value against the currentrule context
.- Parameters:
textFormula
- the UserSummary value to resolveprocess
- the current process- Returns:
- the resolved value
-
isValid
Is this processElement valid for execution? Called byProcess
to check the validity of the task before executing it (executeElement()
).Each task type is responsible for overriding this method to check the various properties that are required for execution.
When invalid, call
getInvalidTaskMessage()
to get a message detailing the problem.Default implementation calls
getInvalidTaskMessage()
and returntrue
if the message isnull
.- Parameters:
process
- the process that is handling the workflow- Returns:
- true if task is valid
-
objectReferencesLastTaskOutput
Does the object have fields that reference the last task output (i.e. $last)?- Parameters:
object
- object to be checkedprocess
- the enclosing process- Returns:
- true if any field in the object references $last
-
reset
public void reset()StringMethod called duringProcess.reset()
giving the task a chance to reset any internal state so it can be executed later. See alsocompleteElement()
. -
updateGlobalIDInCriteria
UpdatesAdvancedCriteria
Criterion
TaskInputExpression
values containing ruleScope references.This method is a helper to implement task-specific
updateGlobalIDReferences()
.- Parameters:
criteria
- the criteria to be updated in placeoldId
- the ID being renamed. SeeIdentifier
newId
- the new ID to be assigned. SeeIdentifier
- Returns:
- true if any references were updated; false otherwise
-
updateGlobalIDInTextFormula
Updatestext formula
containing ruleScope references.This method is a helper to implement task-specific
updateGlobalIDReferences()
.- Parameters:
textFormula
- the UserSummary to be updated in placeoldId
- the ID being renamed. SeeIdentifier
newId
- the new ID to be assigned. SeeIdentifier
- Returns:
- true if any references were updated; false otherwise
-
updateGlobalIDInValueProperty
Updates aTaskInputExpression
property value containing ruleScope references.This method is a helper to implement task-specific
updateGlobalIDReferences()
.- Parameters:
propertyName
- the property name to be updated in this taskoldId
- the ID being renamed. SeeIdentifier
newId
- the new ID to be assigned. SeeIdentifier
- Returns:
- true if any references were updated; false otherwise
-
updateGlobalIDInValues
Updates a set ofTaskInputExpression
values containing ruleScope references.This method is a helper to implement task-specific
updateGlobalIDReferences()
.- Parameters:
values
- the object to be updatedoldId
- the ID being renamed. SeeIdentifier
newId
- the new ID to be assigned. SeeIdentifier
- Returns:
- true if any references were updated; false otherwise
-
updateGlobalIDReferences
Updates references to a global ID within the properties of this process element (i.e. rename). This method is not called as part of workflow execution but is used byReify
to keep workflow event handlers in sync with ID changes within the screen.Each processElement or Task that has properties that save global IDs (like a component ID or criteria referencing
ruleContext
) must be able to update its references on demand by overriding this method or defer to its superclass.There are a number of helper methods to make this easier listed below.
- Parameters:
oldId
- the ID being renamed. SeeIdentifier
newId
- the new ID to be assigned. SeeIdentifier
- Returns:
- true if any references were updated; false otherwise
- See Also:
-
updateLastElementBindingReferences
Update references to a binding $last within properties of this processElement. This method is not called as part of workflow execution but is used by thecom.smartgwt.client.tools.WorkflowEditor
to adjust last task references as new tasks are inserted.Each processElement or Task that has properties supporting
taskInputExpressions
using the $last syntax must be able to update its references on demand by overriding this method or defer to its superclass.There are a number of helper methods to make this easier listed below.
- Parameters:
oldId
- the ID being renamed. SeeIdentifier
newId
- the new ID to be assigned. SeeIdentifier
- Returns:
- true if any references were updated; false otherwise
- See Also:
-
updateLastElementInCriteria
UpdatesAdvancedCriteria
Criterion
TaskInputExpression
values containing $last references. Any implicit reference to the last task is updated to reference a last task of a specifiedtaskType
.For example, a value of "$last.sequenceNo" would be replaced with "$last[fetch].sequenceNo" if the taskType is "fetch". Existing "$last[...]" references are left as-is.
This method is a helper to implement task-specific
updateLastElementBindingReferences()
.- Parameters:
criteria
- the criteria to be updated in placetaskType
- the taskType to be used in new reference- Returns:
- true if any references were update; false otherwise
-
updateLastElementInValueProperty
Updates aTaskInputExpression
property value containing $last references. Any implicit reference to the last task is updated to reference a last task of a specifiedtaskType
.For example, a value of "$last.sequenceNo" would be replaced with "$last[fetch].sequenceNo" if the taskType is "fetch". Existing "$last[...]" references are left as-is.
This method is a helper to implement task-specific
updateLastElementBindingReferences()
.- Parameters:
propertyName
- the property name to be updated in this tasktaskType
- the taskType to be used in new reference- Returns:
- true if any references were update; false otherwise
-
updateLastElementInValues
Updates a set ofTaskInputExpression
values containing $last references. Any implicit reference to the last task is updated to reference a last task of a specifiedtaskType
.For example, a value of "$last.sequenceNo" would be replaced with "$last[fetch].sequenceNo" if the taskType is "fetch". Existing "$last[...]" references are left as-is.
This method is a helper to implement task-specific
updateLastElementBindingReferences()
.- Parameters:
values
- the object to be updatedtaskType
- the taskType to be used in new reference- Returns:
- true if any references were update; false otherwise
-
onInit
protected void onInit() -
setAttribute
public ProcessElement setAttribute(String attribute, ProcessElement[] value, boolean allowPostCreate) -
getProcessElements
-
convertToJavaScriptArray
-