---
title: "Element <workflow>"
source: https://dev.pageseeder.com/api/elements/element_workflow.html
description: "API Element reference for <workflow>"
last_updated: 2026-08-07T17:09:54+10:00
tokens: ~640
---

# \<workflow\>

## Summary

A workflow is a list of [workflow](../../reference/glossary/workflow.md) steps on a document represented by `<comment>` elements.

## Usage context

| Permitted content | `<assignedto> <uri>` `<comment>` |
| --- | --- |
| Permitted parent |  |

## Attributes

This element defines the following attributes.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| due | `xs:dateTime` | no | When the workflow is due |
| id | `xs:long` | no | Unique and permanent workflow identifier. *Requires PageSeeder v6 or higher.* |
| priority | `xs:string` | no | The priority of the workflow |
| status | `xs:string` | no | The status of the workflow |
| statuschanged | `xs:dateTime` | no | The last time the status changed |

## Examples

```lang-xml

<workflow status="Initiated"
          due="2012-03-10T18:00:00+10:00"
          priority="High"
          statuschanged="2012-03-08T12:34:00+10:00">
  <assignedto id="123" date="2012-03-09T..."> ... </assignedto> 
  <uri id="789"> ... </uri>

  <comment id="123"
           contentrole="Workflow"
           created="2012-03-08T12:34:00+10:00"
           status="Initiated"
           due="2012-03-10T18:00:00+10:00"
           priority="High">
    <title>Cavern stolen!</title>
    <author email="alibaba@fortythieves.com.au"> ... </author>
    <assignedto  id="123" date="2012-03-09T..."> ... </assignedto>
    <content id="789" type="text/plain">
      Please review the treasure.
    </content>
  </comment>
  ...
</workflow>
```

## Schema

### XML Schema

```lang-relax
<xs:element name="workflow" type="workflow"/>

<xs:complexType name="workflow">
  <xs:sequence>
    <xs:element name="assignedto" type="assignedto" minOccurs="0"/>
    <xs:element name="uri"        type="uri"        minOccurs="0" />
    <xs:element name="comment"    type="comment"    minOccurs="0"
                maxOccurs="unbounded"/>
  </xs:sequence>
  <xs:attribute name="due"             type="xs:dateTime" />
  <xs:attribute name="id"              type="xs:long" />
  <xs:attribute name="priority"        type="xs:string" />
  <xs:attribute name="status"          type="xs:string" />
  <xs:attribute name="statuschanged"   type="xs:dateTime" />
</xs:complexType>
```

### Relax Schema

```lang-relax
element workflow {
   attribute due             { xs:dateTime }?,
   attribute due             { xs:long }?,
   attribute priority        { text }?,
   attribute status          { text }?,
   assignedto?
   uri?
   comment*
}
```

## Compatibility

No change since initial API release.

