Structure of a workflow definition file

Structurally, a workflow definition file is comprised of several sections, as follows:
  • Document declaration statements that are not directly related to workflow content. These statements are required at the beginning of every workflow XML file, and are described as follows:
    XML processing instruction
    The primary XML file must start with a processing instruction (in column 1 of line 1) for the XML processor. This instruction defines the version of XML used and the encoding of the file. For example:
    <?xml version="1.0" encoding="UTF-8"?>
    Document type definition (DTD)
    You can optionally use a DTD to define entities (variables) in the workflow. Using a DTD with workflows is optional because z/OSMF uses the default XML schema to validate the contents of a workflow file, rather than the DTD.
    Workflow root element
    The workflow root element is the container for the main content of a workflow.
  • Workflow metadata, which contains information about the workflow itself. For more information, see Specifying the workflow metadata.
  • Optionally, a manifest of external files that contain translated text for the various user interface elements (widgets) that are displayed for the workflow. The Workflows task of z/OSMF can display text for widgets in the language defined for the browser locale, if you supply the translated text in a properties-based resource bundle file. By default, Workflows task displays the text in whatever language is used in the workflow file. Thus, it is recommended that you use the default language (such as English) in the XML and use bundle files to include any other supported languages. For more information, see Including a manifest of translated text
  • Optionally, one or more variable definitions, which you can use to have the Workflows task prompt the user for input values. A number of data types are supported for variables, including string, integer, decimal, boolean, time, and date. A declared variable can be referenced by one or more steps in a given workflow. For more information, see Defining variables for your workflow.
  • One or more step elements that describe the steps of the workflow. A workflow definition file must include at least one step, and should include all of the steps needed to complete an activity on z/OS (the workflow). For more information, see Defining steps for your workflow.

The reference tables in Workflow XML reference summarize the basic elements of a workflow definition file, including the attribute values, descriptions, any default values, the XML attribute data types, and whether a particular attribute is required.