Monday, September 19, 2011

How do I examine the workflow task instance. I would like to see the all the top-level workflow variables

Pages based on GenericEditForm all ultimately do their thing in a *Viewer class in the session package.

Something that can come in handy trying to debug workflow problems like this is to dump the workflow task to a file. Insert an Action like this:

<Action>
  <expression>
    <invoke name='dumpFile'>
      <invoke name='getTask'>
        <ref>WF_CONTEXT</ref>
      </invoke>
      <s>c:/temp/workflow.xml</s>
    </invoke>
  </expression>
</Action>

What this does is generate a file containing the XML for the TaskInstance that holds the state of the workflow process. In here you can see all the top-level workflow variables near the top under a <Variables> element.

No comments:

Post a Comment