Workday errors in plain English.

Submit an Error

Studio Step Fails: Trying to Write END_DOCUMENT When Document Has No Root

✓ Verified Workday Studio 2 lookups
The error Data is described as XML, but may not be: Trying to write END_DOCUMENT when document has no root (ie. trying to output empty document).

What does "Data is described as XML, but may not be: Trying to write" mean in Workday Studio?

A step was handed something the assembly has declared to be XML, but there is no root element in it. Usually the message arriving at that step is empty, or it is a bare fragment or plain text rather than a complete document. Workday reports it when it tries to close a document it never managed to open.

Quick fix

Guard the failing step with a conditional route that skips it when the message is empty, so the run completes while you fix the upstream cause.

Permanent fix

Make the emptiness explicit rather than incidental. Assert after each transform that the message has a root element, and give any branch that can legitimately produce nothing an route of its own instead of letting an empty message fall through into a step that expects a document. Where a step needs a fragment wrapped, wrap it deliberately in a known enclosing element rather than relying on the previous step to have produced one.

Troubleshooting

  1. Identify the step that raised the error, then look at what feeds it rather than at the step itself. The failure is almost always in the message, not in the component reporting it.
  2. Add a write-to-file or log step immediately before the failing step and re-run. An empty file confirms the message is arriving with nothing in it.
  3. Check whether an upstream step produced no output at all: a splitter with nothing to split, an XSLT that matched no nodes, or a web service call that returned an empty body.
  4. Check whether the message is a fragment rather than a document. Content extracted from part of a payload often has no single enclosing element, which satisfies neither an XSLT step nor a Put Integration Message call.
  5. Look for steps being called that do not need to be called. A logging or reporting branch that runs on every message, including empty ones, is a common source.
Was this helpful?

Related errors