Platform Explorer / Nuxeo Platform 5.6

Contribution org.nuxeo.ecm.platform.routing.lifecycle.contrib--lifecycle

This contribution is part of XML component org.nuxeo.ecm.platform.routing.lifecycle.contrib inside nuxeo-platform-document-routing-core-5.6.jar

Extension point

Extension point lifecycle of component LifeCycleService.

Contributed items

  • <lifecycle defaultInitial="draft" name="documentRouteElement">
          <transitions>
            <transition destinationState="validated" name="toValidated">
              <description>the model is validated</description>
            </transition>
            <transition destinationState="ready" name="toReady">
              <description>the element is ready to be executed</description>
            </transition>
            <transition destinationState="running" name="toRunning">
              <description>the element starts</description>
            </transition>
            <transition destinationState="done" name="toDone">
              <description>the element finishes</description>
            </transition>
            <transition destinationState="waiting" name="toWaiting">
              <description>the element waits for a join</description>
            </transition>
            <transition destinationState="suspended" name="toSuspended">
              <description>the element waits for a task</description>
            </transition>
            <transition destinationState="ready" name="backToReady">
              <description>the element finishes</description>
            </transition>
            <transition destinationState="canceled" name="toCanceled">
              <description>cancel this element</description>
            </transition>
            <transition destinationState="draft" name="toDraft">
              <description>
                go to the draft state, this is done when creating a new instance
                from a model
              </description>
            </transition>
          </transitions>
          <states>
            <state description="Default state" initial="true" name="draft">
              <transitions>
                <transition>toValidated</transition>
              </transitions>
            </state>
            <state description="The element is validated" initial="true" name="validated">
              <transitions>
                <transition>toReady</transition>
                <transition>toDraft</transition>
              </transitions>
            </state>
            <state description="The element is ready" initial="true" name="ready">
              <transitions>
                <transition>toRunning</transition>
                <transition>toWaiting</transition>
                <transition>toSuspended</transition>
                <transition>toCanceled</transition>
                <transition>toDraft</transition>
              </transitions>
            </state>
            <state description="The element is running" name="running">
              <transitions>
                <transition>toDone</transition>
                <transition>backToReady</transition>
                <transition>toCanceled</transition>
                <transition>toDraft</transition>
              </transitions>
            </state>
            <state description="The element is done" name="done">
              <transitions>
                <transition>backToReady</transition>
                <transition>toCanceled</transition>
                <transition>toDraft</transition>
              </transitions>
            </state>
            <state description="The element waits for a join" name="waiting">
              <transitions>
                <transition>toReady</transition>
                <transition>toSuspended</transition>
                <transition>toCanceled</transition>
                <transition>toDraft</transition>
              </transitions>
            </state>
            <state description="The element waits for a task" name="suspended">
              <transitions>
                <transition>toReady</transition>
                <transition>toWaiting</transition>
                <transition>toCanceled</transition>
                <transition>toDraft</transition>
              </transitions>
            </state>
            <state description="The element is cancelled" name="canceled">
              <transitions>
                <transition>backToReady</transition>
                <transition>toDraft</transition>
              </transitions>
            </state>
          </states>
        </lifecycle>

    go to the draft state, this is done when creating a new instance from a model

XML source

<extension point="lifecycle" target="org.nuxeo.ecm.core.lifecycle.LifeCycleService">

    <lifecycle defaultInitial="draft" name="documentRouteElement">
      <transitions>
        <transition destinationState="validated" name="toValidated">
          <description>the model is validated</description>
        </transition>
        <transition destinationState="ready" name="toReady">
          <description>the element is ready to be executed</description>
        </transition>
        <transition destinationState="running" name="toRunning">
          <description>the element starts</description>
        </transition>
        <transition destinationState="done" name="toDone">
          <description>the element finishes</description>
        </transition>
        <transition destinationState="waiting" name="toWaiting">
          <description>the element waits for a join</description>
        </transition>
        <transition destinationState="suspended" name="toSuspended">
          <description>the element waits for a task</description>
        </transition>
        <transition destinationState="ready" name="backToReady">
          <description>the element finishes</description>
        </transition>
        <transition destinationState="canceled" name="toCanceled">
          <description>cancel this element</description>
        </transition>
        <transition destinationState="draft" name="toDraft">
          <description>
            go to the draft state, this is done when creating a new instance
            from a model
          </description>
        </transition>
      </transitions>
      <states>
        <state description="Default state" initial="true" name="draft">
          <transitions>
            <transition>toValidated</transition>
          </transitions>
        </state>
        <state description="The element is validated" initial="true" name="validated">
          <transitions>
            <transition>toReady</transition>
            <transition>toDraft</transition>
          </transitions>
        </state>
        <state description="The element is ready" initial="true" name="ready">
          <transitions>
            <transition>toRunning</transition>
            <transition>toWaiting</transition>
            <transition>toSuspended</transition>
            <transition>toCanceled</transition>
            <transition>toDraft</transition>
          </transitions>
        </state>
        <state description="The element is running" name="running">
          <transitions>
            <transition>toDone</transition>
            <transition>backToReady</transition>
            <transition>toCanceled</transition>
            <transition>toDraft</transition>
          </transitions>
        </state>
        <state description="The element is done" name="done">
          <transitions>
            <transition>backToReady</transition>
            <transition>toCanceled</transition>
            <transition>toDraft</transition>
          </transitions>
        </state>
        <state description="The element waits for a join" name="waiting">
          <transitions>
            <transition>toReady</transition>
            <transition>toSuspended</transition>
            <transition>toCanceled</transition>
            <transition>toDraft</transition>
          </transitions>
        </state>
        <state description="The element waits for a task" name="suspended">
          <transitions>
            <transition>toReady</transition>
            <transition>toWaiting</transition>
            <transition>toCanceled</transition>
            <transition>toDraft</transition>
          </transitions>
        </state>
        <state description="The element is cancelled" name="canceled">
          <transitions>
            <transition>backToReady</transition>
            <transition>toDraft</transition>
          </transitions>
        </state>
      </states>
    </lifecycle>
  </extension>