The following special variables have their values set each time a specification is opened:
- Current User Name
- Current User Display Name
- Current User Email Address
- Current User Password
Please refer to Info: Special Variables for more information
When any of these variables are used in a rule (to record information about the logged in user) the results will update each time the specification is opened by a different logged on user.
A specification is opened:
- On creation (using DriveWorks Administrator, User or Live).
- On editing or copying (using DriveWorks Administrator, User or Live).
- On processing either manually (using DriveWorks Administrator, User or Live) or automatically (using DriveWorks Autopilot)
Drive the Values into a Constant
When the original values (at the time of creation) of these special variables are required to be set it is necessary to follow the steps below:
- Create a Constant called CurrentUserName (or a name relevant to the special variable populating the constant).
- Browse to the Specification Flow Task in the Task Explorer.
If your specification flow has already been customized skip to step 4.
- Click the Customize Specification button from the command bar.
- Click the Edit.. link on the green Specify State. If your specification flow has been customized and this state has changed name this should be your Initial State.
The Initial State is entered when you first start a Specification. This state does not become active when DriveWorks Autopilot processes the specification.
- Select the Enter State Event from the State Items column.
- Locate the DriveConstant Value task in the Toolbox and drag to the Task Sequence column.
- Select the task from the Task Sequence column. The properties of the task will be displayed in the Properties area under the Toolbox.
- Set the Constant Name property to be DWConstantCurrentUserName (or the name of the constant created in step 1 above).
- Set the Constant Value property to be DWCurrentUserName using the Rule Builder.
- Click OK on the Edit State dialogue.
|Knowledge Base Article Ref:||KB13103015|