Extend an existing workflow

About this task

To extend an existing workflow, you must create an eti (extension) file and populate it correctly. To assist you, Studio provides a dialog in which you can enter the basic workflow information. You must then enter this information in the eti file.

Procedure

  1. First, determine the workflow type that you want to extend.
  2. Select Workflows in the Project window, right-click and select Create metadata for a new workflow subtype from the menu.
  3. In the New Workflow subtype metadata dialog, enter the following:

    Field

    Description

    Entity

    The workflow object to create.

    Supertype

    The type or workflow to extend. You can always extend the Workflow type, from which all subtypes extend.

    Description

    Optional description of the workflow.

    Foreign keys

    Click the Add button to enter any foreign keys that apply to this workflow object.

  4. Click Gen to clipboard. This action generates the workflow metadata information in the correct format and stores on the clipboard.
  5. Expand the Extensions folder in the Project window.
  6. Right-click the Entity folder and select New > Entity from the menu.
  7. Enter the name of the file to create in the New File dialog. Enter the same value that you entered in the New Workflow subtype metadata dialog for Entity and add the eti extension. Studio then creates a new <entity>.eti file.

    Open this file, right-click, and choose Paste from the menu. Studio pastes in the metadata workflow that you created in a previous step.

    For example, if you extend Workflow and create a new workflow named NewWorkflow, then you must create a new NewWorkflow.eti file that contains the following:
                <?xml version="1.0"?>
                  <subtype desc="" entity="NewWorkflow" supertype="Workflow"/>
  8. (Optional) To provide the ability to localize the new workflow, add the following line of code to this file (as part of the subtype element):
    <typekey desc="Language" name="Language" typelist="LanguageType"/>
    Continuing the previous example, you now see the following:
    <?xml version="1.0"?>
      <subtype desc="" entity="NewWorkflow" supertype="Workflow">
      <typekey desc="Language" name="Language" typelist="LanguageType"/>
    <subtype>
  9. Stop and restart Guidewire Studio so that it picks up your changes.
    • You now see NewWorkflow listed in the Workflow typelist.
    • You now see an NewWorkflow node under Resources > Workflows.
  10. Select the NewWorkflow node under Workflows, right-click and select New Workflow Process from the menu. Studio opens an empty workflow process that you can modify to meet your business needs.