Workflows/Workflow Format

From EPrints Documentation
Revision as of 13:17, 6 October 2006 by WikiSysop (talk | contribs) (Stages)
Jump to: navigation, search
Workflow Format Components

Workflow Format

File Structure

The EPrints workflow file is written in XML, and follows the following structure:

<workflow xmlns="" xmlns:ep="">
    <stage ref="first_stage" />
    <stage ref="second_stage" />
  <stage name="first_stage">

The <flow> structure defines the path taken through the workflow - in this case, from first_stage to second_stage. It is straightforward to embed EPScript in the flow block (as well as throughout the workflow) to provide more complex flows. For example, to only include a certain stage for a specific EPrint type:

  <ep:if test="type = 'thesis'">
    <stage ref="thesis_stage">

The ref attribute of the <stage> element corresponds directly to the <stage>'s name attribute later in the workflow.


While the flow element contained a list of stages to handle, the stage contains a list of components to render. Again, the stage may contain EPScript to customize the components rendered. For example, the default EPrint workflow contains the following to ensure the 'presentation type' field is only visible for conference items:

<stage name="example_stage">
  <ep:if test="type = 'conference_item'">
   <component><field ref="pres_type" required="yes" /></component>

Each component within a stage may have use any or none of the following attributes:

  • type (defaults to Field): The type of component to use (see the next section for components bundled with EPrints 3).
  • collapse (defaults to no): If yes, the component is initially collapsed. This hides the fields from the user unless they expand the component.
  • surround (defaults to Default): The surround is responsible for the 'look and feel' of the component. It renders the help, title, and the container in which the component's content is placed. It may be useful to create a custom surround based on the Default surround class, or to use the None surround, which renders nothing except the component content.

The content of the <component> element is handled by the component itself, so may vary depending on its function. Again, the <component> content may contain EPScript to allow for dynamic configuration.