Chapter 5. Workflow

Table of Contents

1. Native Format
1.1. File Format
2. TPD Format
2.1. Actions
2.2. Conditional Attributes

Workflow is concerned with providing the information required to support each step of the business cycle. Tahiti can be used as client for such workflow system and do one step. For the current step, there may be multiple actions associated with document processing. Such document can be send to the Tahiti together with task definition and list of possible next steps.

Document can be sent to the Tahit in the read-only mode or with allowed modifications. Task can also define additional attributes which will be associated with document when it is finished and send back to the server in given state.

1. Native Format

Tasks description can be passed as standalone packet over communication channel or is usually packed in one of the document attributes - Document.task.XML.Next paragraph describes XML format of task and required attributes.

Example 5.1. Native Task Description (example)

<?xml version="1.0"?>
<DocumentTask id="task_15478" name="TaskName">
 <Attributes>
  <Attribute name="Description" 
             value="Here is longer task explanation"/>
  <Attribute name="Priority" value="2007012816"/>
  <Attribute name="Creation" value="12-28-2006 14:30"/>
  <Attribute name="Expiration" value="01-28-2007"/>
 </Attributes>
 <Actions>
  <Action id="aid_1" name="Task Name" 
     description="Choosing this state something might happen">
   <Attributes>
    <Attribute name="ActionResponse" value="Some value"/>
   </Attributes>
  </Action>
 <Actions>
</DocumentTask>

1.1. File Format

Root tag has name DocumentTask. There are two mandatory attributes id, name.

Table 5.1. <DocumentTask>

AttributeRequiredDescription

id

yes

Task id, have to be unique identification of the task.

name

yes

Name of the Task. This value is directly displayed to the user and should be localized. Value is also used for task classification, it means that task of the same class should have same name.


Tag Attributes contains Attribute definitions. There is fixed list of possible attributes. Only these can be correctly interpreted by the Tahiti. Attribute is simple combination of name and value.

Tag Actions contains list of possible next states for the task. Each states have to be defined in the tag Action.

Table 5.2. <Action>

AttributeRequiredDescription

id

yes

Action identificator. Used to distinguish between different actions.

name

yes

Name of the next state (action). This name is displayed to the user in the context menu. Value should be localized.

descriptionnoAction description, can be used to explain action and consequences of this state.

Each Action can contain list of attributes which are set when user select this action. When user select next state document is immediately send and user cannot change any attributes.

2. TPD Format

TPD is Tahiti Packed Document format. It is used as a container for one document or task from workflow system. There is one xml file, attributes and binary files. All data are packed inside one file - it is common zip file. There have to be at least one file called Pruvodka.xml which contain document, task and data description. All other files have to be listed inside main xml file.

Note

This file format is currently obsolete and should not be used for new systems.

Example 5.2. Pruvodka.xml (document without task)

<?xml version="1.0"?>
<PaperBack Area="POJ_UDAL" SentByUser="mposmurn" 
       DateSent="20031104" Deletable="Y" 
       Status="1" Draft="cmserver.xml">
  <Ids>
    <ID Name="CPS_CPU" Value="2030000010"/>
  </Ids>
  <Docs>
    <Document Name="009-Dopis" Deletable="Y" Archivable="Y">
      <Ids />
      <Pages>
        <Page Name="dopis.tpkg"/>
      </Pages>
    </Document>
  </Docs>
</PaperBack>

Root tag is named PaperBack and have to have these attributes:

  • Area - Area for compatibility with Golem system, should be empty for other systems

  • SentByUser - user name for document processing, can be empty

  • DataSent - date when document was generated, only informative value

  • Deletable - one of value Y|N, Y - document can be delete, N - document cannot be delete

  • Draft - reference to the document system, currently unused

First format definition allowed to define more documents inside one file. It is no more possible and only one document can be stored inside TPD. Identificators can be set in two places. Upper level can contain three tags:

Table 5.3. TPD tags

NameDescription
IdsCommon identificators
ActionsList of available document actions. Used for task definition.
DocsDocuments definition. Currently can contain only one tag Document.

Document attributes:

  • Name - document type name, this type have to be defined in the cmserver2.xml

  • Deletable - currently unused tag, same meaning as Deletable on the main tag.

  • Archivable - set if document can be stored in the archive, currently unused

Attributes are stored inside tag Ids, each combination of name, value in the tag ID. Attribute names are defined in the connected information system.

2.1. Actions

Section Actions contain list of target document states. After processing document and associated files user have to select one of the target states.

Example 5.3. Pruvodka.xml (Actions)

  <Actions>
    <Action id="S1" name="Send Invoice"/>
    <Action id="S2" name="Cancel Invoice"/>
  </Actions>

There are two defined actions in the example:

  • Send Invoice

  • Cancel Invoice

Each action have to have unique identifier and name. Name is displayed to the user. Identifier is used for processing conditional attributes.

2.2. Conditional Attributes

Task is defined as list of actions, target document states. Given state is signaled to the server by setting attribute value. Such attributes are called conditional attributes. Values of these attributes are set when user select new state. Consequently is documented submitted to the server.

Example 5.4. Pruvodka.xml (Conditional Attributes)

  <Ids>
    <ID Name="NewDocState" Value="2030000010" OnAction="S1"/>
    <ID Name="NewDocState" Value="2030000021" OnAction="S2"/>
  </Ids>

Conditional attribute is almost similar as regular attribute. Only one difference is attribute called OnAction. This attribute signals on which selected state should be value applied. Value is not used if another state is selected.