Workflow

<introspection xmlns="http://www.wyona.org/neutron/2.0">
  <resource name="Homepage">
    <edit mime-type="application/xhtml+xml">
      <open url="index.xhtml" method="GET"/>
      <save url="index.xhtml?yanel.resource.usecase=save" method="POST"/>
    </edit>

    <workflow>
      <current-status date="2006.12.14">REVIEW</current-status>
      <transitions>
        <transition id="publish" from="REVIEW" to="LIVE" url="?yanel.resource.workflow.transition=publish" method="POST"/>
        <transition id="reject" from="REVIEW" to="AUTHORING"/>
      </transitions>
      <history>
        <status date="2006.12.13">AUTHORING</status>
      </history>
    </workflow>
  </resource>
</introspection>

Client Request: POST https://foo.bar/my-document.xtml?yanel.resource.workflow.transition=publish

<?xml version="1.0"?>
<workflow xmlns="http://www.wyona.org/neutron/2.0">
  <transition id="publish" revision="OPTIONAL"/>
</workflow>

Server Response: HTTP/1.1 200 OK..

<?xml version="1.0"?>
<workflow xmlns="http://www.wyona.org/neutron/2.0">
  <current-status date="2006.12.15">LIVE/AUTHORING</current-status>
  <transitions>
    <transition id="submit-to-review" from="AUTHORING" to="REVIEW" url="?yanel.resource.workflow.transition=submit-to-review" method="POST"/>
  </transitions>
  <history>
    <status date="2006.12.14">REVIEW</status>
    <status date="2006.12.13">AUTHORING</status>
  </history>
</workflow>

Server Response if transition failed: HTTP/1.1 500 Internal Server Error

<?xml version="1.0" encoding="UTF-8"?>

<exception xmlns="http://www.wyona.org/neutron/2.0" type="workflow">
  <message>Workflow transition failed to execute.</message>
</exception>