Feedback

  • Contents
 

Creating Variables for Work Items

IPA Designer lets you create variables at two levels:

  • Process level: These variables are available anywhere in the process. You can use these in work items and elsewhere. Another term for this kind of variable is global variable.

  • Work item level: These variables are only available inside the work item where you create them: they are local variables. You can use them in the work item dynamic details, but not in the process dynamic details. For example, a process might have several work items that require similar information. Local variables let you re-use the same names for the same information inside different work items. Because each local variable is available only inside the work item where you created it, there is no chance that the process will get confused about which variable to use.

 Note: When you use process variables in a work item, IPA makes copies of the variable values to use while the work item is running. If the work item updates the values, then IPA does not copy the updated values back to the process variables until the work item ends.

There are two slightly different dialog boxes for adding process and work item variables (see figure).

IPA Designer displays one or the other version of the dialog depending on the situation. If the scope of the new variable is clear, then it displays the dialog on the left side of the figure. If the scope is not clear, then IPA Designer displays the dialog on the right side, with an extra list box to choose the scope. In particular:

  • If you add a variable while displaying the list of process variables, IPA Designer infers that the new variable is a process level (global) variable. It displays the dialog on the left side of the figure.

  • If you add a variable while displaying the Work Item Overview view, IPA Designer infers that the new variable will be local to the work item. It displays the dialog on the left side of the figure.

  • If you insert a variable while choosing dynamic details for a work item, the new variable could be either a process level variable or a work item level variable. IPA Designer displays the dialog on the right side of the figure so that you can select the scope.

  • Work item variables persist across all pages of the work item in which they are defined.

  • If a work item changes the value of a process variable, the change in the process variable's value is not available outside the work item until the work item ends.

  • If a user picks up a work item, puts it on hold, and then cancels it, any variable values changed in that work item revert back to the values they had before the user picked up the work item.

Process dynamic details can include only process level variables. Work item level dynamic details may include process level variables, work item level variables, or both.

To create a variable for a work item:

  1. Display the Work Item Overview view for the desired work item.

  2. In the Variables pane, click the Add  button to display the list of variable types (see figure).

  3. In the Variable Types list, click the desired variable type.

    IPA Designer displays the Add Variable dialog box.

  4. In the Name text box, type the name of the variable. Follow the IPA Designer naming rules. In the Description text box, type a brief description of the variable and its purpose.

  5. If you want to create the variable as a collection (see the topic on Collections of Variables), select the check box labeled Contains a collection of variables.

  6. In the Security list, click the desired security specification.

  7. In the Accessibility list, choose the accessibility setting.

  8. Add data constraints as desired. These vary depending on the data type.

    For more information about data constraints, see the data constraints help topic.

  9.  If you want to set an initial value for the variable, type it into the Initial value text box.

  10. 10.  Click Add.

    IPA Designer adds your new variable to the local variables list.