DriveWorks Pro 15: How To: Set Current User Special Variables When Using DriveWorks Autopilot (KB13103015) [send feedback...]

Introduction

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:

  1. Create a Constant called CurrentUserName (or a name relevant to the special variable populating the constant).
  2. Browse to the Specification Flow Task in the Task Explorer.
    If your specification flow has already been customized skip to step 4.
  3. Click the Customize Specification button from the command bar.
  4. 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.
  5. Select the Enter State Event from the State Items column.
  6. Locate the DriveConstant Value task in the Toolbox and drag to the Task Sequence column.
  7. Select the task from the Task Sequence column. The properties of the task will be displayed in the Properties area under the Toolbox.
  8. Set the Constant Name property to be DWConstantCurrentUserName (or the name of the constant created in step 1 above).
  9. Set the Constant Value property to be DWCurrentUserName using the Rule Builder.
    To activate the Rule Builder the property is required to be Dynamic. Please see the article How To Change a Static Property to a Dynamic Property for information on how to do this.
  10. Click OK on the Edit State dialogue.


Knowledge Base Article Ref:KB13103015

Table of Contents