Until now, the concept used for defining issue status transitions has been based on defining each transition separately. According to this solution, each status transition is defined according to an initial and final status.


This solution has not been widely used, perhaps because of the effort required to define useful transitions. ("Useful" here means transitions that are according to intentions, that do not exhibit unwanted side effects, etc.)


This solution has now been replaced* by a solution where constraints are defined within a single XML, for a specific workflow.

With the new solution, all conditions regarding a specific status are collected in an element defining the status.

Currently, constraints cannot be defined for specific transitions, although this can be expected in the near future. Instead, a more useful solution is supported: the option to define preconditions of a status. Such preconditions will apply to any transitions to the specific status.


In order to get an unambiguous initial status of a workflow, an initialStatus attribute of the entire workflow definition is used.


Note that while before any constraints were expressed as SystemWeaver filter conditions, they are now according to a SystemWeaver Path expression, in the test attribute of the <Preconditions> tag.


Example configuration 

<Workflow initialStatus="New">
  <Status name="New">
    <NextStatuses>
      <NextStatus name="Closed"/>
      <NextStatus name="In Progress"/>
    </NextStatuses>
  </Status>            
  <Status name="In Progress">
    <Preconditions>
      <Precondition test="AssignedTo.Name != ''" message="Not assigned to anyone"/>
    </Preconditions>
    <NextStatuses>
      <NextStatus name="Closed"/>
    </NextStatuses>
  </Status>
  <Status name="Closed">
    <NextStatuses>
      <NextStatus name="In Progress"/>
    </NextStatuses>
  </Status>                      
</Workflow>


Context Visualizer

There is a new graphical view available which displays a state chart according to the definition:


* Any existing transitions defined according to the old concept will be retained in R25, but will not be effective/applied. Instead, any such transitions need to be transformed into the new XML format.


Issue IDs: 11922, 11949, 11950, 11951, 11973, 11975