Recommendations for declaring variables
|
Although you can declare any Java type or Windchill class (provided it is serializable), PTC recommends the following guidelines:
• A ProcessData object holds the workflow variables, and the composite object is persisted in the Oracle database in a BLOB column. If the persistent signature of a BLOB object changes after it is stored in the database, an error can be thrown at the time it is retrieved from the database and de-serialized. Therefore, workflow variable types should be restricted to the following:
◦ Java primitives
◦ Evolvables
◦ Persistables
Evolvables provide methods to handle changes in their persistent signatures. Persistables are stored in workflow variables as object references.
• Persistables should not be composed within another class, as this can lead to data inconsistency or corruption. Doing this also leads to a wt.pds.NotEvolvableException error during migration.
• Persistables can be an element in a java.util.Vector (this is because the Vector class receives special handling by the WfVariable class), but this should be avoided if possible. Use of a CachedObjectReference or ObjectReference pointing to a persistable is the preferred practice.
• A workflow variable can contain, compose, or otherwise encapsulate an ObjectReference to a persistable as necessary.
|
Name
|
The variable name.
If declaring a Java class, the name must be a proper Java variable name.
|
Display Name
|
If defined, the display name for the variable.
|
Type Name
|
The class type of the variable.
|
Visible
|
The variable is visible to users.
|
Required
|
The variable must have a value.
|
Read Only
|
The variable is read-only.
Read-only URL variables are displayed as hyperlinks.
|
Resetable
|
The variable is reset to its default value each time the workflow process or node is started.
This also applies to a node started as part of a workflow process loop.
|
Initialize From
|
The variable value is initialized from the parent template variable when the node starts.
|
Copy Into
|
The variable value is copied into the parent template variable when the node completes.
|
Default Value
|
If the variable class allows default values, you can specify one when creating the variable.
|