13. Process description

We now want to have a more detailed view at the description element of our process definition that we have ignored so far.

This description contains the contract that describes what parameters our process expects, which states can occur and which results it provides. We have seen the portrait of the DateFormatter in the previous section and we could use the description of our process to generate a similar table.

The current version of our process defines just one return state and a single result entry that has the key welcomePage.

<description>
   <output>
      <state>ok</state> 1
      <result name="welcomePage" description="composedPage"
              content-type="text/html" presentable="true" /> 2
   </output>
</description>
1

You have to define one or more result states. These result states can be set by routing to a return value. If you try to return a value that is not defined here, Projector will throw an exception. More result states can simply be defined by adding more state elements as child of the output element

2

The result description provides details about each single result entry that is provided by this process