Daisy documentation
 PreviousHomeNext 
8.2.5 Workflow process internationalizationBook Index8.4 Workflow query system

8.3 Custom workflow task screens

Why customizing the workflow screens

There are two ways to customize the workflow screens, each with specific use cases.

Editing Daisy documents

Most workflow tasks require the user to open the document related to the workflow task in a new separate window, save the document, close the new window and continue with the workflow task.
To avoid the potentially confusing step of opening a new window, you can let the user edit document parts and fields right inside the workflow screens.
To do this, create an xml file in ${wikidata.dir}/conf/ called wfmapping.xml.  In this file you can specify which parts and fields you want to appear in various phases of the workflow task.

<mappings>
  <mapping processDefinitionName="review" documentType="SimpleDocumentType" taskName="...">
    <parts>
      <part required="false">CPT-Remarks</part>
      <part>PDFAttachment</part>
    </parts>
    <fields>
      <field required="true">CPT-InterestedUsers</field>
    </fields>
  </mapping>

  ...
</mappings>

For each workflow task, the list of mapping elements is scanned (in order).  The first mapping element whose attributes match the current workflow state is used to determine the list of parts and fields that are included. The attributes (@processDefinitionName, @documentType and @taskName) are optional, so <mapping documentType="Foo">...</mapping> would be applied to all workflow tasks with a related document of type 'Foo'.
The 'required' property for each part of field (which is specified on the document type) can be overridden.

Remarks / limitations:

Custom workflow stylesheet

Workflow task screen styling

If you don't like the workflow task screens, you can override the default stylesheet, which is located at xslt/workflow/wftask_to_formtemplate.xsl in the default skin.
The input of this stylesheet is determined by wf_task_page.xml which can be found in the wiki webap dir under daisy/resources/xml/
The output of this stylesheet contains jx instructions.  See WfAbstractTaskApple for an overview of available viewData.

 PreviousHomeNext 
8.2.5 Workflow process internationalization8.4 Workflow query system