Working with branch IDs

Every branch also has an ID, which is its reference name. An ID is necessary because the Workflow instance sometimes needs to persist to the database which branch it is trying to execute. (This can happen, for example, if an error occurs in the branch and the workflow drops into the Error state). A branch ID must be unique within a given step.

If you do not specify an ID for a branch (which occurs frequently), the workflow uses the value of nextStep attribute as a default. This works well except in the special case in which you have more than one branch leading from the same Step A to the same Step B. (This can happen, for example, if you want to OR multiple conditions together, or if you want different Gosu in the different branches but the same nextStep.) In that case, you must add an ID to each of those branches. Studio complains with a verification error upon loading (or reloading) the workflow scripts if you do not do this.

Do the following to assign an ID to each type of branch:

Type

Action to take

GO

Optionally add an ID to a GO branch. If you do not provide one, Studio defaults the ID to the value of the nextStep attribute. However, Guidewire recommends that you create specific IDs if there are multiple GO branches that all move to the same next step.

TRIGGER

Always add an ID to a TRIGGER branch. Guidewire requires this as you must invoke a trigger explicitly. You must use a value from the WorkflowTriggerKey typelist for the branch ID.

TIMEOUT

Optionally add an ID to a TIMEOUT branch. If you do not provide one, Studio defaults the ID to the value of the nextStep attribute.