Home Search

DriveWorks Pro 22
How To: Modify Specification Flow (KB13022603)

Send Feedback

How To: Modify Specification Flow

This article gives a synopsis of the default specification flow and looks at modifying it to suit a particular requirement during the specification process.

Default Specification Flow Overview

Specification flow always starts with the Specify state. This can be renamed but the name of this state is never visible to any user.

States and Transitions

The default specification flow has three States the initial Specify state can enter. To enter these states the specification will pass through a Transition. The default States and the transitions they pass through are as follows:

Transition from Specify stateState
FinishPending
Release (ReleaseLocal when using DriveWorks Administrator or DriveWorks User/ReleaseAutopilot when DriveWorks Autopilot is installed)Completed /Released to Server
SaveSaved

The default specification flow progresses from the Specify State to:

  • The Pending State when the Finish button is selected on the user form.
  • The Completed State when the Release button is selected on the user form.
  • The Saved State when the Save button is selected on the user form.

States and Events

States have OnEnter and OnLeave events which can trigger tasks that will be run when these events take place. Additionally tasks can have conditions that must be met for the task to run.

The default Pending State triggers the following Enter State Events

  • Complete Child Specification
  • DriveWorks_OnPreFinish
  • DriveWorks_OnPostFinish
  • Release Documents. This event has the condition Setting: Document Generation Behavior where the value must be Both or Finish for this event to take place.

The Completed State triggers the following Enter State Events

  • Complete Child Specification event
  • Change Child Specification State
  • DriveWorks_OnRelease
  • Release Documents. This event has the condition Setting: Document Generation Behavior where the value must be Both or Release for this event to take place.
  • Release Email(s)
  • Release Model(s)

The Saved State triggers the following Enter State Events

  • Complete Child Specification event

States and Operations

Once at the state any number of operations could happen to the specification. These will be listed under the Actions heading, once the specification is selected from the specification explorer window.

Operations can have Teams assigned that allow access to that operation based on who has logged onto the DriveWorks session.

Operations can also have conditions set that must be met for the operation to be available.

The default Pending State has the following Operations that can be applied from the Specification Explorer window

  • Edit (cannot be modified)
  • Release (cannot be modified)
  • Copy
  • Delete

The default Completed State has the following Operations that can be applied from the Specification Explorer window

  • Copy
  • Delete
  • Archive
  • The default Saved State has the following Operations that can be applied from the Specification Explorer window

    • Edit (cannot be modified)
    • Copy
    • Delete

    No Conditions are set on any of the above Operations in the Default Specification Flow.

    Modifying the Default Specification Flow

    We can see from the Default Specification Flow Overview that it allows a specification to be saved (if the user is interrupted), have documents generated (if the user clicks Finish) or have documents, models and emails generated (if the user clicks Release).

    To start modifying the default specification flow:

    1. Open the project to be modified in DriveWorks Administrator. and select Specification Flow from the task list
    2. Click the Customize Specification from the DriveWorks toolbar.

    Rename the buttons on the User Forms

    The Next and Previous buttons that appear during specification when more than one user form appears in the navigation are mandatory and cannot be modified. The save, finish and release buttons however can be modified.

    1. Expand the Specify State by clicking the arrow icon in the top right of the Specify State box.
    2. Move the mouse over the transition that is to be renamed and click the Title link
    3. Enter the new name for the transition and then click away from the text field.

    OR

    1. Expand the Specify State by clicking the arrow icon in the top right of the Specify State box.
    2. Select the transition that is to be renamed by clicking the name
    3. Click the Rename button from the toolbar and type the new name for the transition.

    The new name for the transition will now appear on the corresponding button during Specification.

    Rename a Default State

    The name of all of the default states can be modified, all states in the specification flow must have unique names.

    1. Select the state to be renamed from the specification flow window.
    2. Click the Rename button from the toolbar and type the new name for the state.

    Once a specification has passed through a transition the name of the state it currently resides will appear in the specification explorer.

    Delete a State

    When states are deleted all transitions to and from the state are also removed. Any remaining state that has transitions without a target will be highlighted in red. All transitions must have target states for the specification flow to be complete.

    1. Select the state to be deleted from the specification flow window.
    2. Click the Delete button from the toolbar.

    Add a New State

    1. Click the New State button from the toolbar
    2. Enter a name for the state in the dialog that appears next to the New State button.

    Exercise: Include a New State to the default specification flow

    This exercise involves adding a new state that will create a document requests more information to allow the specification to proceed.

    Our user forms also require some additional information to make the exercise work so this is where we will start.

    Create a dialog user form where the person specifying can enter what information is required

    1. Open the project to be modified in DriveWorks Administrator
    2. Select Form Navigation from the task list and add a new form called Info Request (No navigation is needed as this will be a dialog form)
    3. Right click the form from the Navigation window and select Go To Form Designer
    4. Add a text box to the user form called NeedThisInformation, change the Multiline (appearance) property, for this control,  to True.
    5. Select one of the other existing forms from the Forms window in the Form Designer.
    6. Add a dialog button (select More... from the toolbar and select Dialog button>OK) called RequestInfo.
    7. In the Dialog Name property enter the name of the dialog form created in step 2 ( Info Request)
    8. Copy the dialog button (select>ctrl+c) and paste it onto all other forms in the navigation path (not the dialog form)
    If the rule builder is used to enter the name of the dialog in step 7 above, include quotes around the dialog form name "Info Request". When typing the name directly into the property quotes are not required.

    Create a document to drive the requested information into

    1. Open Microsoft Word and create a simple document like the one below.
    2. Somewhere in the document type some text that will act as a placeholder for the bookmark required to drive the text into. This is seen in the image below as the text Requested Information driven here.
    3. Highlight the placeholder text and from the Microsoft Word menu select Insert>Bookmark.
    4. Give the Bookmark a name RequestedInformation and click Add.
    5. Save the document to the content folder of the DriveWorks project you are working on, with the name Information Request.doc and close the document.
    6. In DriveWorks Administrator select Documents from the task list, click Add to add a new document.
    7. Select Word Document, and enter the name InformationRequest in the Name field. Click Next.
    8. Click Browse from the Master File Location field and locate and select the document stored in step 5 above, click Finish .
    9. Select Build from the Rule field of the Document Name panel of the documents window
    10. In the Rule Builder enter the rule "Information Request " & DWSpecificationId to give the document a unique name. Click OK to apply the rule and close the rule builder.
    11. In the Document Bookmarks section select the bookmark RequestedInformation and select Build. Click Clear from the toolbar of the rule builder to clear the existing text.
    12. From the Forms tab of the rule builder, select the form Info Request to filter out controls from other user forms, and double click the control NeedThisInformation.
    13. Click OK to apply the rule and close the rule builder.
    14. Click OK on the DriveWorks toolbar to close the document edit window.

    Add a New State to the Specification Flow

    1. Select Specification Flow from the task list of DriveWorks Administrator
    2. Click New State and enter the name Information Requested, Click OK.
    The new state can be positioned above the existing Specify state by dragging the state icon into position in the Specification Flow window. The existing specification flow can be muti selected by dragging a window around all of the icons and re-positioned by dragging into place.

    Add a New Transition to the Specify State

    1. Select the Specify State and click New Transition, enter the name Request Info and click OK.
      The name of the transition will appear on the button during specification. Consider the length of the text entered to minimize the length of the button.
    2. Expand the specify state and locate the Request Info transition.

      The small black arrows at the top and bottom of the state icon (once expanded) allow the list to be scrolled through by hovering the mouse over the arrow.

    3. Select the transition and drag it onto the Information Requested state.

    Consider the required Transitions from the Requested Info state and add them

    Once the specification has entered the Information Requested state we need to consider what we would like our users to be able to do to the specification from the specification explorer window.

    As the state created is clearly awaiting information it is logical that we want to be able to Edit the specification once the requested information is received.

    1. Select the Information Requested state and click New Transition from the toolbar.
    2. Enter the name Edit and click OK.
    3. Locate the Edit transition in the Information Requested state and drag it onto the specify state.

    Consider the required Events that need to take place on entering the new state

    The Events that need to take place on the state now need to be considered. Unlike the Saved state, where the specification is stored and no action taken to produce data, we do need data generating. Once the Request Info button (transition) has been clicked, by the person specifying, we need the information request document to be generated.

    1. Select the Information Requested state and click the Edit link in the bottom left of the state icon.
    2. Select the Enter State item from the State Items tree.
    3. Locate the Release Documents task from the toolbox and drag it into the Task Sequence for "Enter State" window.
    4. With the Release Documents task highlighted in the Task Sequence window select the Documents property.
    5. Enter the name of the document that was added to DriveWorks (see step 7 of "Create a document to drive the requested information into" above), if you have been following the steps this will be InformationRequest
    6. Click OK to close the state editor and save the project.


Knowledge Base Article Ref:KB13022603