Cheshire3 Object Model - Workflow¶
- class cheshire3.baseObjects.Workflow(session, config, parent=None)¶
A Workflow defines a series of processing steps.
A Workflow is similar to the process chain concept of an index, but acts at a more global level. It will allow the configuration of a Workflow using Cheshire3 objects and simple code to be defined and executed for input objects.
For example, one might define a common Workflow pattern of PreParsers, a Parser and then indexing routines in the XML configuration, and then run each Document in a DocumentFactory through it. This allows users who are not familiar with Python, but who are familiar with XML and available Cheshire3 processing objects to implement tasks as required, by changing only configuration files. It thus also allows a user to configure personal workflows in a Cheshire3 system the code for which they don’t have permission to modify.
- process(session, *args, **kw)¶
Executes the code as constructed from the XML configuration.
Executes the generate code on the given input arguments. The return value is the last object to be produced by the execution. This function is automatically written and compiled when the object is instantiated.
The following implementations are included in the distribution by default:
- class cheshire3.workflow.SimpleWorkflow(session, config, parent)¶
Default workflow implementation.
Translates XML to python and compiles it on object instantiation.
- class cheshire3.workflow.CachingWorkflow(session, config, parent)¶
Slightly faster Workflow implementation that caches the objects.
Object must not be used in one database and then another database without first calling workflow.load_cache(session, newDatabaseObject).