Package com.appiancorp.suiteapi.process
Class ProcessVariable
java.lang.Object
com.appiancorp.suiteapi.type.TypedValue
com.appiancorp.suiteapi.type.NamedTypedValue
com.appiancorp.suiteapi.process.TypedVariable
com.appiancorp.suiteapi.process.ProcessVariable
- All Implemented Interfaces:
com.appiancorp.core.expr.portable.PortableNamedTypedValue
,com.appiancorp.core.expr.portable.PortableNamedTypedValueWithChildren
,com.appiancorp.core.expr.portable.PortableTypedValue
,com.appiancorp.process.runtime.forms.FormParameter
,DeepCloneable
,JSONable
,JSONCacheable
,XMLable
,AppianTypeHolder
,TypedVariableTypes
,Validatable
,AppianType
,com.appiancorp.type.ExpressionableNamedTypedValue
,com.appiancorp.type.HasTypeRef
,com.appiancorp.type.NamedType
,Serializable
,Cloneable
,Comparable
- Direct Known Subclasses:
ProcessVariableInstance
public class ProcessVariable
extends TypedVariable
implements com.appiancorp.process.runtime.forms.FormParameter, Comparable, Validatable, JSONCacheable, DeepCloneable, com.appiancorp.type.ExpressionableNamedTypedValue
A variable that is global to a process. The set of process variables
for a process is a superset of the process parameters. A process
parameter is merely a process variable with the parameter attribute
set to
true
. Process variables can be used as default
values of ActivityClassParameters, and the value of an ActivityClassParameter
can be stored in a process variable after the execution of an activity.
Note: When setting the value of ProcessVariable of type User, do not set the
value to a User object, but rather the username (User.getUsername()).- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
Fields inherited from class com.appiancorp.suiteapi.process.TypedVariable
classType$TRANSIENT, dataType$TRANSIENT, detailedTypes$TRANSIENT, displayName$TRANSIENT, LOCAL_COMMUNITY, LOCAL_DOCUMENT, LOCAL_EMAIL_ADDRESS, LOCAL_FOLDER, LOCAL_FORUM, LOCAL_GROUP, LOCAL_KC, LOCAL_MESSAGE, LOCAL_NODE, LOCAL_PAGE, LOCAL_PM, LOCAL_PORTLET, LOCAL_PROCESS, LOCAL_TASK, LOCAL_TOPIC, LOCAL_USER, MAX_TYPE, multipleSupportingType$TRANSIENT
Fields inherited from class com.appiancorp.suiteapi.type.NamedTypedValue
QNAME
Fields inherited from class com.appiancorp.suiteapi.type.TypedValue
ALWAYS, AT_DESIGNER_DISCRETION, clearPasswordOnTransport, NEVER, TO_STRING_STYLE
Fields inherited from interface com.appiancorp.suiteapi.type.AppianType
ADMINISTERED_PROPERTY, ALIAS, APPLICATION, ARRAY, ATTACHMENT, BEAN, BIG_RATIONAL, BINARY, BOOLEAN, CHART_COLOR, COMMUNITY, CONNECTED_SYSTEM, CONTENT_COMMUNITY, CONTENT_CONSTANT, CONTENT_CUSTOM, CONTENT_DOCUMENT, CONTENT_FOLDER, CONTENT_FREEFORM_RULE, CONTENT_ITEM, CONTENT_KNOWLEDGE_CENTER, CONTENT_RULE, CURRENCY, DATA_SOURCE, DATA_STORE, DATA_STORE_ENTITY, DATATYPE, DATE, DECISION, DECISION_TABLE, DECRYPTED_TEXT, DEFERRED, DICTIONARY, DISCUSSION_THREAD, DOCUMENT, DOCUMENT_OR_FOLDER, DOUBLE, EMAIL_ADDRESS, EMAIL_RECIPIENT, EMBEDDED_SAIL_THEME_ID, ENCRYPTED_TEXT, EVENT, EXPRESSION, EXTERNAL_REFERENCE, EXTERNAL_REFERENCE_WITH_INDICES, EXTERNAL_SYSTEM_ID, FIXED, FOLDER, FORUM, GROUP, GROUP_TYPE, ID_REFERENCE, INITIAL_CUSTOM_TYPE, INTEGER, INTEGER_KEY, INTERFACE, INTERVAL_D_S, KNOWLEDGE_CENTER, LINKS_CHANNEL_FOLDER, LIST, LIST_OF_ADMINISTERED_PROPERTY, LIST_OF_APPLICATION, LIST_OF_ATTACHMENT, LIST_OF_BEAN, LIST_OF_BIG_RATIONAL, LIST_OF_BINARY, LIST_OF_BOOLEAN, LIST_OF_CHART_COLOR, LIST_OF_COMMUNITY, LIST_OF_CONNECTED_SYSTEM, LIST_OF_CONTENT_COMMUNITY, LIST_OF_CONTENT_CONSTANT, LIST_OF_CONTENT_CUSTOM, LIST_OF_CONTENT_DOCUMENT, LIST_OF_CONTENT_FOLDER, LIST_OF_CONTENT_FREEFORM_RULE, LIST_OF_CONTENT_ITEM, LIST_OF_CONTENT_KNOWLEDGE_CENTER, LIST_OF_CONTENT_RULE, LIST_OF_CURRENCY, LIST_OF_DATA_SOURCE, LIST_OF_DATA_STORE, LIST_OF_DATA_STORE_ENTITY, LIST_OF_DATATYPE, LIST_OF_DATE, LIST_OF_DECISION, LIST_OF_DECISION_TABLE, LIST_OF_DECRYPTED_TEXT, LIST_OF_DEFERRED, LIST_OF_DICTIONARY, LIST_OF_DISCUSSION_THREAD, LIST_OF_DOCUMENT, LIST_OF_DOCUMENT_OR_FOLDER, LIST_OF_DOUBLE, LIST_OF_EMAIL_ADDRESS, LIST_OF_EMAIL_RECIPIENT, LIST_OF_EMBEDDED_SAIL_THEME_ID, LIST_OF_ENCRYPTED_TEXT, LIST_OF_EVENT, LIST_OF_EXPRESSION, LIST_OF_EXTERNAL_REFERENCE, LIST_OF_EXTERNAL_REFERENCE_WITH_INDICES, LIST_OF_EXTERNAL_SYSTEM_ID, LIST_OF_FIXED, LIST_OF_FOLDER, LIST_OF_FORUM, LIST_OF_GROUP, LIST_OF_GROUP_TYPE, LIST_OF_ID_REFERENCE, LIST_OF_INTEGER, LIST_OF_INTEGER_KEY, LIST_OF_INTERFACE, LIST_OF_INTERVAL_D_S, LIST_OF_KNOWLEDGE_CENTER, LIST_OF_LINKS_CHANNEL_FOLDER, LIST_OF_MAP, LIST_OF_MESSAGE, LIST_OF_NOTE, LIST_OF_NULL, LIST_OF_OUTBOUND_INTEGRATION, LIST_OF_PAGE, LIST_OF_PASSWORD, LIST_OF_PORTLET, LIST_OF_PROCESS, LIST_OF_PROCESS_ERROR, LIST_OF_PROCESS_MODEL, LIST_OF_PROCESS_MODEL_FOLDER, LIST_OF_QUERY_RULE, LIST_OF_QUICK_APP, LIST_OF_RANGE, LIST_OF_RECORD, LIST_OF_RECORD_REFERENCE, LIST_OF_RECORD_TYPE_ID, LIST_OF_RICH_TEXT, LIST_OF_RULE_FOLDER, LIST_OF_SAFE_URI, LIST_OF_SITE, LIST_OF_STRING, LIST_OF_STRING_KEY, LIST_OF_TASK, LIST_OF_TASK_REPORT, LIST_OF_TEMPO_FEED, LIST_OF_TEMPO_REPORT, LIST_OF_TIME, LIST_OF_TIMESTAMP, LIST_OF_TYPE, LIST_OF_UNIFORM_FOLDER, LIST_OF_UNION, LIST_OF_USER_OR_GROUP, LIST_OF_USERNAME, LIST_OF_VARIANT, LIST_OF_WEB_API, MAP, MESSAGE, NOTE, NULL, OUTBOUND_INTEGRATION, PAGE, PASSWORD, PORTLET, PROCESS, PROCESS_ERROR, PROCESS_MODEL, PROCESS_MODEL_FOLDER, QUERY_RULE, QUICK_APP, RANGE, RECORD, RECORD_REFERENCE, RECORD_TYPE_ID, RICH_TEXT, RULE_FOLDER, SAFE_URI, SITE, STRING, STRING_KEY, TASK, TASK_REPORT, TEMPO_FEED, TEMPO_REPORT, TIME, TIMESTAMP, TYPE, UI_CONTAINER, UNIFORM_FOLDER, UNION, USER_OR_GROUP, USERNAME, VARIANT, WEB_API
Fields inherited from interface com.appiancorp.type.HasTypeRef
selectTypeId
Fields inherited from interface com.appiancorp.suiteapi.common.JSONable
hiddenAttributes$TRANSIENT
Fields inherited from interface com.appiancorp.type.NamedType
selectName
Fields inherited from interface com.appiancorp.suiteapi.process.TypedVariableTypes
CONSTANT, CONTENT, CUSTOM_CONTENT_ITEM, DATETIME, DURATION, FREEFORM_RULE, LONG, PEOPLE, PROCESSMODEL_FOLDER, RULE, TEMPLATE, USER
Fields inherited from interface com.appiancorp.suiteapi.process.Validatable
MUTABLE_AT_DESIGNER_DISCRETION, MUTABLE_BY_END_USER, MUTABLE_NOT_BY_END_USER, NULLABLE_ADMIN_AND_DESIGN, NULLABLE_BY_ALL, NULLABLE_NOT_AT_ALL
Fields inherited from interface com.appiancorp.suiteapi.common.XMLable
DEFAULT_BUFFER_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllMessages
(List newMessages) Adds new validation messages to this process variable.void
addValidationMessage
(String message_) Adds the given String validation message to the collection of validation messages for the process variablevoid
Clears all validation messages from this process variableclone()
Clone this object.int
The expression that represents the default value of this process variable.Gets the name of this variable, which is the same as getKey.Returns the set of attributes (properties) that should not be included in the JSON representation of the object.The default implementation always returnsValidatable.MUTABLE_BY_END_USER
.If this variable is not a parameter, or is a parameter but is not required, then it is NULLABLE_BY_ALL.Retrieves a list of String objects that contain validation messages for the process variableprotected String
Returns the xmlWrapperName for a ProcessVariable.boolean
isHidden()
True if the process variable is hidden from the parent processboolean
Retrieves whether or not this ProcessVariable is a parameter of the processboolean
This property is used only if the process variable is a parameter.void
setExpression
(String expression_) This expression represents the default value of a process variable.void
setHidden
(boolean hidden_) Sets whether or not the variable is hidden from its parent processvoid
setParameter
(boolean parameter_) Sets whether or not this process variabe is a parametervoid
setRequired
(boolean required_) Sets if the process variable is required.Methods inherited from class com.appiancorp.suiteapi.process.TypedVariable
appendFullName, appendLocalObject, appendLocalObject, appendLocalObjects, appendLocalObjects, children, computeDisplayString, computeDisplayString, computeValueString, computeValueStringForUiOutput, convertFromLocalObjectType, externalize, externalize, fillInAppianTypes, findAllWithKeyPrefix, findByName, getClassType, getDataType, getDefaultPvValue, getDefaultValue, getDetailedTypes, getInstanceClass, getKey, getMultiple, getNumericTypedObjectFromUiInput, getObjectTypeMappingFromType, getScalarTypedObject, getScalarTypedObject, getType, getTypedObjectFromUiInput, getTypedObjects, getTypedObjectsFromUiInput, getTypedVariables, getTypeForClass, getTypeFromObjectTypeMappingType, getUnderlyingClass, getXMLWrapperEnd, getXMLWrapperStart, handleTimestampValue, handleTimestampValueForUiOutput, integerToLong, internalize, isAppianType, isMultipleSupportingType, isNotDeferred, isValidType, putOrAppendTimestamp, putOrAppendValue, renderArrayAsCsv, renderArrayAsCsv, renderArrayAsCsv, renderArrayAsCsv, renderArrayAsCsvForUiOutput, renderArrayAsString, setDetailedTypes, setInstanceType, setKey, setMultiple, setType, setTypeMultiple, setValue, toString, toXML, toXML
Methods inherited from class com.appiancorp.suiteapi.type.NamedTypedValue
equals, findNtvByName, findNtvIndexByName, getName, getNtvNames, hashCode, setName, toString
Methods inherited from class com.appiancorp.suiteapi.type.TypedValue
clearPasswordOnTransport, getInstanceType, getInstanceTypeIds, getTypeRef, getValue, setTypeRef
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.appiancorp.type.ExpressionableNamedTypedValue
getInstanceType, getValue, setInstanceType, setValue
Methods inherited from interface com.appiancorp.process.runtime.forms.FormParameter
getInstanceType, getKey, getMultiple, getValue, setDetailedTypes, setValue
Methods inherited from interface com.appiancorp.type.HasTypeRef
getTypeRef, setTypeRef
Methods inherited from interface com.appiancorp.type.NamedType
getName, setName
Methods inherited from interface com.appiancorp.core.expr.portable.PortableNamedTypedValue
getName
Methods inherited from interface com.appiancorp.core.expr.portable.PortableNamedTypedValueWithChildren
setName
Methods inherited from interface com.appiancorp.core.expr.portable.PortableTypedValue
getInstanceType, getValue
Methods inherited from interface com.appiancorp.suiteapi.process.Validatable
getDetailedTypes, getInstanceType, getKey, getMultiple, getType, getValue, setDetailedTypes, setInstanceType, setMultiple, setValue
-
Field Details
-
SORT_BY_KEY
-
SORT_BY_TYPE
-
SORT_BY_PARAMETER
-
SORT_BY_REQUIRED
-
SORT_BY_HIDDEN
-
SORT_BY_ID
-
SORT_BY_VALUE
-
SORT_BY_MULTIPLE
-
-
Constructor Details
-
ProcessVariable
public ProcessVariable() -
ProcessVariable
-
-
Method Details
-
getHiddenAttributes
Description copied from interface:JSONable
Returns the set of attributes (properties) that should not be included in the JSON representation of the object.- Specified by:
getHiddenAttributes
in interfaceJSONable
- Overrides:
getHiddenAttributes
in classTypedVariable
- Returns:
- the set of hidden attributes
-
clone
Clone this object.- Specified by:
clone
in interfaceDeepCloneable
- Overrides:
clone
in classTypedValue
- Returns:
-
isHidden
public boolean isHidden()True if the process variable is hidden from the parent process- Returns:
- if this process variable is hidden from its parent process
-
setHidden
public void setHidden(boolean hidden_) Sets whether or not the variable is hidden from its parent process- Parameters:
hidden_
- true if this process variable will be hidden from its parent process
-
getMutable
The default implementation always returnsValidatable.MUTABLE_BY_END_USER
. This means that unless this method is overriden all process variables can be changed by the end user.- Specified by:
getMutable
in interfaceValidatable
- Returns:
Validatable.MUTABLE_BY_END_USER
.- See Also:
-
getXMLWrapperName
Returns the xmlWrapperName for a ProcessVariable. Only used internally.- Overrides:
getXMLWrapperName
in classTypedVariable
-
isParameter
public boolean isParameter()Retrieves whether or not this ProcessVariable is a parameter of the process- Returns:
- true if the process variable is a parameter else false
-
setParameter
public void setParameter(boolean parameter_) Sets whether or not this process variabe is a parameter- Parameters:
parameter_
- whether this process variable is a parameter
-
getNullable
If this variable is not a parameter, or is a parameter but is not required, then it is NULLABLE_BY_ALL. Otherwise, it is NULLABLE_NOT_AT_ALL.- Specified by:
getNullable
in interfaceValidatable
- Returns:
- whether or not the parameter needs a default value.
-
getValidationMessages
Retrieves a list of String objects that contain validation messages for the process variable- Specified by:
getValidationMessages
in interfacecom.appiancorp.process.runtime.forms.FormParameter
- Specified by:
getValidationMessages
in interfaceValidatable
- Returns:
- list of validation messages for this process variable
-
addValidationMessage
Adds the given String validation message to the collection of validation messages for the process variable- Specified by:
addValidationMessage
in interfacecom.appiancorp.process.runtime.forms.FormParameter
- Specified by:
addValidationMessage
in interfaceValidatable
- Parameters:
message_
- validation message that is added to the list of messages
-
clearValidationMessages
public void clearValidationMessages()Clears all validation messages from this process variable- Specified by:
clearValidationMessages
in interfaceValidatable
-
addAllMessages
Adds new validation messages to this process variable.- Specified by:
addAllMessages
in interfaceValidatable
- Parameters:
newMessages
- validation messages
-
isRequired
public boolean isRequired()This property is used only if the process variable is a parameter.- Specified by:
isRequired
in interfacecom.appiancorp.process.runtime.forms.FormParameter
- Returns:
- true if this a parameter and is required, false if it is a parameter and not required, and an undefined value if it is not a parameter.
-
setRequired
public void setRequired(boolean required_) Sets if the process variable is required. The process variable should be set to required only when its a parameter and is required at the start of the process.- Specified by:
setRequired
in interfacecom.appiancorp.process.runtime.forms.FormParameter
- Parameters:
required_
- sets if the process variable is required
-
getFriendlyName
Gets the name of this variable, which is the same as getKey.- Specified by:
getFriendlyName
in interfaceValidatable
- Returns:
- String name of this process variable
-
compareTo
- Specified by:
compareTo
in interfaceComparable
-
getExpression
The expression that represents the default value of this process variable.- Specified by:
getExpression
in interfacecom.appiancorp.type.ExpressionableNamedTypedValue
- Returns:
-
setExpression
This expression represents the default value of a process variable. It should only be set at design time and is only evaluated when retrieving the process model parameters, NOT when starting the process.- Specified by:
setExpression
in interfacecom.appiancorp.type.ExpressionableNamedTypedValue
- Parameters:
expression_
- default expression value for the process variable
-