DocEvents in details

Event-based document processing reverses the roles of object and process in a creative way.

DocEvents Platform is a key player in the UnionStation framework series, and it is used for describing and executing document process workflow. A “document” may refer to a multi-page electronic archive such as AFP or PDF, but it may also refer to a record-based collection such as CSV. As to a page, the page is typically considered a collection of  “contend items”, such as text pieces, vector graphics elements, images, and reused design pieces called forms.

DocEvents framework employs the concepts of events, conditions, actions, and parameters. All are expressed in XML. The XML is interpreted at runtime and translated into live actions that can be called when certain events are encountered and certain conditions are met. The platform itself only translates the XML and monitors the execution, but the actual implementation is done by the queried objects themselves.

test3s test3

There isn’t a single “main” workflow function that micromanages each step or deals with all possible nuances; rather, as the document iterates itself, and the event handlers, loggers, controller and so on communicate with the workflow via asynchronous messages. In this non-traditional architecture, each process is an “object”, while the document object acts as a “process” — the opposite of typical approaches.

patent-pendingAs such, the DocEvents platform is open to use a command-line, GUI, or even web-based interface to do the same coordinating and monitoring tasks, while the documents are doing the same things in all of these dissimilar situations. However an operation interface usually contains the following aspects, regardless of the actual form of information presentation.

  • Input document list
  • XML task definition editor
  • Output list
  • Progress log
  • Statistics
  • Control panel

Another important and interesting aspects is the accounting features. It is able to audit individual tasks as to consumption of quotas of pages, files, or records. It also was designed with SaaS compatibility in mind, where the XML can be graphically examined or modified through a web interface, and run against user uploaded files.

Main concepts in DocEvents

Here are the main concepts in the design.

  1. Events — Document or directory iterates itself, and may pause at every page, page group, resource, record etc. Events are handled at each of such pauses.
  2. Conditions — Conditions are tested at each event to control actions and workflow. Multiple conditions can be combined.
  3. Actions — An action is an activity to be called when an event is encountered and conditions are met. Actions can be combined, too.

Further from its advanced concepts and system designs, DocEvents Processing framework is able to provide a user with the following advantages.

  • Redundant transformation is avoided
    • Original data is kept intact as much as possible
    • No need to convert all data into common intermediate formats first
    • Not sensitive to repeated processing
  • Very controllable processing
    • Automatically builds an integrated process
    • Logging, error report, process controls are done via document itself
    • Damages are confined when exceptions occur
  • Unified user interface
    • GUI provides designer, controller, browser, reporting, preview, etc.
    • Accessing output files and folders with ease
    • Visual editor accompanying text editor


An example of how the DocEvents XML looks like.


About the Author: Cyphia