Базовое администрирование > Поддержка совместной работы > Администрирование рабочих процессов > Workflow Management > Using the Workflow Template Editor > Declaring Variables
  
Declaring Variables
When you define a process, variables can be used within transition condition or automatic routing expressions. Variables can be either global (applicable to the process itself) or local (applicable to an assigned activity or a subprocess).
* 
When the Windchill 8.0 out-of-the-box change management workflows are run in Windchill 10.x, the user will see the activity variables in the task details page that are defined in the 8.0 workflow templates instead of the activity variables that are defined in the 10.x workflow templates.
Variables can be declared as any Java type or as any Windchill class. The only restriction is that the variable must be serializable. If the variable is typed as a Windchill business object, attributes of that object can be referenced through standard getter APIs. Variables can be declared as follows:
Visible or invisible
Required or optional
Read only or read/write
Resettable or static
Variable values can be initialized from parent process variables when an activity or subprocess is started and can also be copied into parent process variables when the activity or subprocess is complete.
* 
Although you can declare a workflow variable to be any Java type or Windchill class (provided it is serializable), PTC encourages you to consider the following guidelines:
Workflow variables are composited within a ProcessData object, which in turn, 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 may be thrown at the time it is retrieved from the database and de-serialized; therefore, PTC recommends that workflow variable types 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 ObjectReferences (not the fully inflated object).
Persistables should not be composited within another class as this may lead to data inconsistency or corruption. Doing this will also lead to a wt.pds.NotEvolvableException during migration.
Persistables may 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, composite, or otherwise encapsulate a ObjectReference to a persistable as necessary.
For information on the Windchill evolvable classes and interfaces, see the Windchill Customization Guide (Руководство по настройке Windchill).