Attribute Workflows

Code example of a Workflow:

<EnumAttribute Name="Status" >
   <Items DefaultItem="Open">
      <Item value="Open"/>
      <Item value="In Progress"/>
      <Item value="Closed"/>
   </Items>
   <Workflow>
      <Transition Value="Open" NextValue="In Progress"/>
      <Transition Value="In Progress" NextValue="Closed"/>
    </Workflow>
</EnumAttribute>

In this example it is possible to go from Open to In Progress and from In Progress to Closed. No other transitions such as from Open directly to Closed or from Closed back to any other value are possible.

As can be seen in this example, that every transition possibility must be defined explicitly. It is therefore advised to define these transitions carefully.

What about start value when the object is created?

Conditions

State transitions can also be controlled via Conditions, where the transition to the target value can only take place if the Document Object is consistent according to one or more inconsistency checks configured in a so called Condition.

Code Example of a workflow transition guarded by Conditions (the transition from "In Progress" to "Closed" can only occur (i.e. the Document Object can only saved) if the Document Object does not have a "Not Reviewed" inconsistency.

<EnumAttribute Name="Status" >
   <Items DefaultItem="Open">
      <Item value="Open"/>
      <Item value ="In Progress"/>
      <Item value ="Closed"/>
   </Items>
   <Workflow>
      <Transition Value="Open" NextValue ="In Progress"/>
      <Transition Value="In Progress" NextValue ="Closed">
         <Conditions>
            <NotReviewedRule ReviewTypeName="Review" />
         </Conditions>
       </Transition>
    </Workflow>
</EnumAttribute>

Workflow Actions

Each Workflow transition can be associated with one or more actions that are executed when the Document Object is saved.

Note that the action is executed when the Document Object is saved, not when the attribute value transition occurs in the UI.

Example of Action types are:

  • Creating an electronic signature for the Document Object.

  • Copy a File (or a PDF version of the file) to a location on the network.

  • Set an Attribute in the Document object to a predefined value.

  • Send an email about the change to a particular User Group.

  • Lock the Document Objects to prevent users from updating it.

  • Unlock the Document Objects that has been previously automatically locked.

  • Start an external process.

  • Add a PDF footer to a PDF document (exclusively valid for signature scenarios)

Each of these action types come with a range of configuration possibilities.

Post Workflow UI Tasks

Since the workflow actions are performed automatically during the commit/Save procedure, it is not always obvious to the user that these actions are taking place/have taken place.

Post Workflow UI Tasks are therefore used to communicate to the user about the performed actions or automatically perform tasks that make the user experience more agreeable.

Example of Post UI Actions are:

  • Displaying a message to the user

  • Prompt the User to sign a Signature (only applicable in Signature situations)

  • Display a Document Object to the user

Displaying a message to the user

Code

In UI

Prompt User to sign a Signature

Code

In UI

Display a Document Object

Code

In UI

Dependent Transitions

Dependent Transition definitions are used to automatically perform a Transition between two values based on changes made to other attributes or by evaluating the state of other attributes.

Examples....

Last updated

Was this helpful?