Workflow Format

From EPrints Documentation
Revision as of 13:45, 23 July 2007 by WikiSysop (talk | contribs) (Reverted edit of WrrC51, changed back to last version by Csirmaz)
Jump to: navigation, search

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


XML Configuration: EPScript - Control Format (EPC) - Citation - Workflow - Phrase - Template - XPAGE (static pages)


The EPrints 3 workflow configuration files are stored in the repository's workflows directory, within folders identifying the Data Objects to which they apply (e.g. eprint or user). Multiple workflows may be defined in each folder, although typically only the default.xml file will be necessary.

Structure

At the centre of a workflow is a 'flow' description. This denotes the path through the workflow process from stage to stage. This may contain EPrints Control tags, allowing for the flow to vary depending on parameters of the data object (or other objects). For example, the flow may be different for users with certain roles. The flow is structured like so:

<flow>
  <stage ref="type"/>
  <stage ref="files"/>
  <stage ref="core"/>
  <stage ref="subjects"/>
</flow>

The 'ref' attribute of the stage element refers to the individual stages. The stage elements describe the components within each screen of the process and, like flow, may contain EPrints Control tags. The 'name' attribute of the stage element is identical to that of the stage element in the 'flow' section.

<stage name="core">
  <component><field ref="title" required="yes" /></component>
  <component><field ref="abstract"/></component>
</stage>

Components

An EPrints component is responsible for the rendering of a graphical element in a workflow. This may be a text-box for title entry, a collection of fields in an appropriate grouping, or just a piece of XHTML. Six components are provided by default and, as they are plugins, it is straightforward to drop in new components when necessary. The type attribute of the component element corresponds to the plugin to be used.

If no type is given, type="Field" is assumed. For each component two further attributes are accepted: surround should be a plugin, by default it can be "None", "Normal", and "Light"; and collapse="yes". If collapse="yes" then it tries to render the component collapsed.

Field-Related Components

Field Element

The majority of field-related components in EPrints 3 make use of the field element in their configuration. This provides a reference to a metafield and any attributes which may be relevant to rendering or operation. Several attributes are available to the element:

AttributeValuesDescription
refA string(required) Refers to the name of the metafield this field represents
requiredyes/no(optional) Whether a value is required in this field before the workflow may complete
helpAn XHTML block(optional) A block of XHTML to be rendered as help for the field
input_lookup_urlA URL(optional) The location of an auto-lookup URL for the field
input_lookup_paramsA string(optional) An