Customising the Standard Web Enactment Interface

Table of Contents

Overview

The Tallis Web Enactment application dynamically generates standard web pages that take the end-user through a process-description’s component tasks.

In most cases this is adequate, but if required, the standard web pages can be replaced by web pages customised for an individual process-description. Often the ability to use a pre-compiled, customised page would greatly enhance the enactment and user experience. Customised pages enable more control over the layout of enactment web pages and over the way information is present to the user. They provide the ability to add additional functions and tools to complement the process-description, such as images, links to further information and supporting material, widgets and even applets to aid the user during the enactment process. Using standard JSP tag libraries, it is also possible to perform additional functions at the server, such as automated database queries and mail processing.

Customising the standard web enactment interface can involve as little as modifying some task attributes in a XML mapping file. Otherwise, customised pages can be created for specific tasks, supplementing the standard html page with customised content or with an applet. Apart from modifying specific task pages, it is also possible to modify the web application itself. This document provides an introduction to the customisation of standard task pages. For a more detailed account of web-enactment customisation see Tallis Interface Primer.

The Mapping File

Certain PROforma components can be mapped to alternative content via the use of a XML mapping file. The mapping between the alternative content and the enactable process is achieved by binding a definition attribute in the XML to the name of the component in the PROforma content.

The XML mapping file conforms to the ‘http://www.cancerresearchuk.org/acl/proforma/ content#’ schema. If you have downloaded the Tallis Web Enactment suite, you can find the schema in \Apache Software Foundation\Tomcat 5.0\webapps\WEB_APP\WEB-INF\PROforma Content.xsd (or see The Mapping File XML Schema).

File Structure

Guideline Element

The content of the mapping file is contained within the guideline tag:

<?xml version="1.0" encoding="UTF-8"?>

<pf:guideline xmlns:pf="//www.cancerresearchuk.org/acl/proforma/content#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cancerresearchuk.org/acl/proforma/
content# /WEB-INF/proformaContent.xsd
">

CONTENT_OF_MAPPING_FILE

</pf:guideline>

Task Elements

Five elements can populate the guideline tag: action, decision, enquiry, plan and task (i.e., keystone).

Customisations for each task are defined within task definition tags, which identify the specific task by adding the value of its PROforma Task Name to the definition attribute, e.g.:

<pf:action definition="action_209019">

CONTENT_OF_ACTION_CUSTOMISATION

</pf:action>

A URI attribute, which specifies a specific page of content to be used rather than the automatically generated content, can be added to the task definition tag:

<pf:action definition="action_209019" uri="/customisations/pages/mappingTest/action.jsp">

CONTENT_OF_ACTION_CUSTOMISATION

</pf:action>

Customisations in a separate file override customisations in the mapping file. For more information about customised task pages see "Customised Task Pages" below.

Another useful attribute that can be added to each task is stylesheet. It specifies a specific style sheet to be used rather than the standard runtime style sheet. Tasks inherit the stylesheet attribute of their parent-plan.

<pf:action definition="action_209019" stylesheet="/customisations/stylesheets/special_action.css">

</pf:action>

Customising PROforma Entities

The caption and the description of PROforma entities can be modified by using the mapping file.

Caption & Description

The caption tag will override the caption property of a PROforma component.

The description tag will override the description property of a PROforma component.

Both tags MUST be nested within a valid action, decision, enquiry, plan, task, candidate, argument, or source tag. They can contain any valid XML content.

Example:

<pf:action definition="action_209019">

<pf:caption>TASK_CAPTION</pf:caption>

<pf:description>TASK_DESCRIPTION</pf:description>

</pf:action>

Customising Tasks

A task’s caption and description can be modified as described above.

Additionally, the task’s context can be modified by using the context tag. The context tag can contain any valid XML content.

Customising Actions

In addition to the base task properties described above, an action’s procedure can be modified by using the procedure tag. The procedure tag can contain any valid XML content.

The delegate attribute of the action tag can be used to group and display a set of actions on one page, by pointing to a specified PROforma plan. This is described in the "Customising Plans" section below.

Customising Enquiries

The mapping file enables users to control the order of the sources displayed for an enquiry and the user interface widget used for each source, and to introduce dependencies between sources.

The enquiry task definition tag can contain a sources tag – which contains at least one source tag – and one or more dependency tags.

The delegate attribute of the enquiry tag can be used to group and display a set of enquiries on one page, by pointing to a specified PROforma plan. This is described in the "Customising Plans" section below.

Source Tag

The source tag has three attributes:

Example:

<pf:sources>

<pf:source definition="data1" position="3" dropdown="true"/>

<pf:source definition="data2" position="1"/>

<pf:source definition="data3" position="2"/>

</pf:sources>


 

On the left is the default screen layout; on the right is the screen layout using the above mapping file customisation.

Dependency Tag

This tag determines dependencies between sources. The tag defines a source attribute and a keyword value for that source, for which the nested source would be disabled, e.g.:

<pf:dependency source="sex" keyword="male">pregnancy</pf:dependency>

The pregnancy source is disabled if the male value is selected for the sex source.

Customising Decisions

If a decision has sources, it can be customised just like an enquiry (see "Customising Enquiries" above). Additionally, captions and descriptions of decisions, candidates and arguments can be modified using the relevant tags (see "Customising PROforma Entities" above).

Each decision tag can have one candidates tag. This tag must contain at least one candidate tag. A candidate tag can contain one arguments tag. This tag must contain at least one argument tag.

The maxRecommendations attribute of the decision tag can be used to determine the maximum number of candidates to be presented to the end-user as recommended, irrespective of how many are actually recommended by the enactment engine.

Example:

<pf:decision definition="decision_109238" maxRecommendations="1">

<pf:caption>A Decision</pf:caption>

<pf:candidates>

<pf:candidate definition="cand1">

<pf:caption>Candidate C1</pf:caption>

<pf:description>Some description for candidate 1</pf:description>

<pf:arguments>

<pf:argument definition="arg1">

<pf:caption>Argument 1</pf:caption>

<pf:description>Some description for argument 1</pf:description>

</pf:argument>

<pf:argument definition="arg2">

<pf:caption>Argument 2</pf:caption>

<pf:description>Some description for argument 2</pf:description>

</pf:argument>

<pf:argument definition="arg3">

<pf:caption>Argument 3</pf:caption>

<pf:description>Some description for argument 3</pf:description>

</pf:argument>

</pf:arguments>

</pf:candidate>

<pf:candidate definition="cand2">

<pf:caption>Candidate C2</pf:caption>

<pf:arguments>

<pf:argument definition="arg4">

<pf:caption>Argument 4</pf:caption>

</pf:argument>

<pf:argument definition="arg5">

<pf:caption>Argument 5</pf:caption>

</pf:argument>

</pf:arguments>

</pf:candidate>

</pf:candidates>

</pf:decision>

Note: In the current version of Tallis Composer (1.4) arguments do not have a Name field. Instead, the argument’s condition is automatically entered as argument name in the PROforma definition. This makes the use of the argument tag cumbersome and error-prone.

Customising Plans

Plans extend the base task properties by allowing an optional grouping sub-element. The grouping element must contain valid action or enquiry definition names from within the mapping file. The action and enquiry elements must also use their delegate attribute to bind to the name of the plan mapping. Any actions or enquiries listed in the grouping and that are in the in_progress state are rendered within the same page rather than individually.

The plan has to point to a customised plan page that will display the multiple enquiries (if you have downloaded the Tallis Web Enactment suite, you can find a customised plan page for enquiries (enquiryGroup.jsp) and one for actions (actionGroup.jsp) in \Apache Software Foundation\Tomcat 5.0\webapps\WEB_ APP\customisations\pages\).

Example:

<pf:enquiry definition="enquiry1" delegate="plan1"/>

<pf:enquiry definition="enquiry2" delegate="plan1"/>

<pf:enquiry definition="enquiry3" delegate="plan1"/>

<pf:plan definition="plan1" uri="/customisations/pages/enquiryGroup.jsp">

<pf:grouping>enquiry1 enquiry2 enquiry3</pf:grouping>

</pf:plan>

Location

The mapping file has to be placed within the web enactment application folder, e.g.:

webapps/tallis/MappingFile.xml

or

webapps/tallis/customisations/mappings/MappingFile.xml

Pointing to the Mapping File

The customised process-description has to point to the mapping file. This is done via the Context field of the top-level plan.

In the Context field of the top-level plan type:

#metadata
tallis.content = PATH_TO_MAPPING_FILE

The path is relative to the web application, e.g:

#metadata
tallis.content = /customisations/mappings/mappingFile.xml

Customised Task Pages

Although most customisations can be done using the mapping file, there are several cases where it is advisable to use separate customised task pages:

Creating a Customised Task Page

The Tallis Web Enactment application dynamically creates standard web pages for tasks that don’t have the mappings to specify alternative content. The HTML code of these pages can be saved, edited and reused by Tallis during future enactments of the process-description.

Follow the steps below to use the dynamically generated code produced by the Tallis Web Enactment application:

When creating a separate customised task page, it’s best to use jsp files as they are less likely to cause errors.

Customisations in a separate task file override customisations in the mapping file.

Required Content for Customised Task Pages

Specific information is required by the server for a task to be processed, with different task types requiring different information for a request to be successful. If minimal editing of the automatically generated content is performed (e.g., structural changes to layout), this is generally not an issue. However, if the content is significantly altered or has been built from scratch, this additional information may need to be explicitly managed.

Actions, plans and keystone tasks

The web enactment generates a "hidden" form for these task types, which will contain all the information required by the server for the correct processing of the task in question. No HTML form or extra content management is required.

Decisions

A decision is required to submit which candidate(s) the user wishes to commit for the task to be successfully processed. Care must be taken not to change the field names that are generated (HTML input and select tags).

If the decision is also authored to request specific dataitems, these fields will also need to be managed (see "Enquiries" below for further details).

Enquiries

An enquiry is required to submit values for dataitems marked as mandatory for the task to be successfully processed. Care must be taken not to change the field names that are generated (HTML input and select tags).

The Folder Hierarchy

If you have installed the Tallis Web Enactment suite, you will find the following folders in the Apache Software Foundation directory:

Enacting a Customised Process-Description Over the Web

Standard process-descriptions can be enacted over the web using the ACL server repository. In order to run a customised process-description over the web, the mapping file must be placed within the web application folder, and the customised pages (if there are any) must be accessible via HTTP. As this type of content can contain malicious code, placing such files on the ACL server cannot be done directly. Hence, if you want to enact a customised process-description over the web, either use your own server, or contact us.

Tallis Training (http://acl.icnet.uk/TallisTraining/)

© Cancer Research UK