Workflow versioning

After you create a workflow script and make it active, it can create hundreds or even thousands of working instances in the PolicyCenter application. As such, you do not want to modify the script as actual existing workflow instances can possibly be running against it. (This is similar to modifying a program while executing it. It can lead to very unpredictable results.)

However, you might choose to modify a script. Then, you would want all newly created instances of the workflow to use your new version of the script.

Guidewire stores each workflow script in a separate XML file. By convention, Guidewire names each file a variant of xxxWF.#.xml:

  • xxx the workflow name (which is mixed cased LikeThis)
  • # is the version number of the workflow process (starting from 1)

Every newly created (copied) workflow script has a different version number from its predecessor. (The higher the version number, the more recent the script.) Thus, a script file name of ManualExecutionWF.2.xml means workflow type ManualExecution, version 2. As PolicyCenter creates new instances of the workflow script, it uses the most recent script—the highest-numbered one—to run the workflow instance against.

It is possible to start a specific workflow with a specific version number. For details, see Instantiating a workflow.

The Workflow engine enforces the following rules in regards to version numbers:

  • If you create a new workflow instance for a given workflow subtype, thereafter, the Workflow engine uses the script with the highest version number. PolicyCenter saves this number on the workflow instance as the ProcessVersion field.
  • From then on, any time that the Workflow instance wakes up to execute, the Workflow engine uses the script with the same typecode and version number of the instance only.
  • It is forbidden to have two workflow scripts with the same subtype and version number. The server refuses to start if you try.
  • If a workflow instance cannot find a script with the right subtype and version number, it fails with an error and drops immediately into the Error state. (This might happen, perhaps, if someone inadvertently deleted the file or the file did not load for some reason.)