Web Services – Human Task (WS-HumanTask) Specification Version 1.1
Committee Draft 07 / Public Review Draft 02
03 March 2010
Specification URIs:
This Version:
http://docs.oasis-open.org/bpel4people/ws-humantask-1.1-spec-cd-07.html
http://docs.oasis-open.org/bpel4people/ws-humantask-1.1-spec-cd-07.doc (Authoritative format)
http://docs.oasis-open.org/bpel4people/ws-humantask-1.1-spec-cd-07.pdf
Previous Version:
http://docs.oasis-open.org/bpel4people/ws-humantask-1.1-spec-cd-06.html
http://docs.oasis-open.org/bpel4people/ws-humantask-1.1-spec-cd-06.doc
http://docs.oasis-open.org/bpel4people/ws-humantask-1.1-spec-cd-06.pdf
Latest Version:
http://docs.oasis-open.org/bpel4people/ws-humantask-1.1.html
http://docs.oasis-open.org/bpel4people/ws-humantask-1.1.doc
http://docs.oasis-open.org/bpel4people/ws-humantask-1.1.pdf
Technical Committee:
Chair:
Dave Ings, IBM
Editors:
Luc Clément, Active Endpoints, Inc.
Dieter König, IBM
Vinkesh Mehta, Deloitte Consulting LLP
Ralf Mueller, Oracle Corporation
Ravi Rangaswamy, Oracle Corporation
Michael Rowley, Active Endpoints, Inc.
Ivana Trickovic, SAP
Related work:
This specification is related to:
· WS-BPEL Extension for People (BPEL4People) Specification – Version 1.1 - http://docs.oasis-open.org/bpel4people/bpel4people-1.1.html
Declared XML Namespaces:
htd – http://docs.oasis-open.org/ns/bpel4people/ws-humantask/200803
hta – http://docs.oasis-open.org/ns/bpel4people/ws-humantask/api/200803
htlt - http://docs.oasis-open.org/ns/bpel4people/ws-humantask/leantask/api/200803
htt – http://docs.oasis-open.org/ns/bpel4people/ws-humantask/types/200803
htc - http://docs.oasis-open.org/ns/bpel4people/ws-humantask/context/200803
htcp- http://docs.oasis-open.org/ns/bpel4people/ws-humantask/protocol/200803
htp - http://docs.oasis-open.org/ns/bpel4people/ws-humantask/policy/200803
Abstract:
The concept of human tasks is used to specify work which has to be accomplished by people. Typically, human tasks are considered to be part of business processes. However, they can also be used to design human interactions which are invoked as services, whether as part of a process or otherwise.
This specification introduces the definition of human tasks, including their properties, behavior and a set of operations used to manipulate human tasks. A coordination protocol is introduced in order to control autonomy and life cycle of service-enabled human tasks in an interoperable manner.
Status:
This document was last revised or approved by the OASIS WS-BPEL Extension for People Technical Committee on the above date. The level of approval is also listed above. Check the “Latest Version” or “Latest Approved Version” location noted above for possible later revisions of this document.
Technical Committee members should send comments on this specification to the Technical Committee’s email list. Others should send comments to the Technical Committee by using the “Send A Comment” button on the Technical Committee’s web page at http://www.oasis-open.org/committees/bpel4people/.
For information on whether any patents have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the Technical Committee web page (http://www.oasis-open.org/committees/bpel4people/ipr.php).
The non-normative errata page for this specification is located at http://www.oasis-open.org/committees/bpel4people/.
Notices
Copyright © OASIS® 2009.2010.
All Rights Reserved.
All capitalized terms in the following text have the meanings assigned to them in the OASIS Intellectual Property Rights Policy (the "OASIS IPR Policy"). The full Policy may be found at the OASIS website.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright notice or references to OASIS, except as needed for the purpose of developing any document or deliverable produced by an OASIS Technical Committee (in which case the rules applicable to copyrights, as set forth in the OASIS IPR Policy, must be followed) or as required to translate it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
OASIS requests that any OASIS Party or any other party that believes it has patent claims that would necessarily be infringed by implementations of this OASIS Committee Specification or OASIS Standard, to notify OASIS TC Administrator and provide an indication of its willingness to grant patent licenses to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this specification.
OASIS invites any party to contact the OASIS TC Administrator if it is aware of a claim of ownership of any patent claims that would necessarily be infringed by implementations of this specification by a patent holder that is not willing to provide a license to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this specification. OASIS may include such claims on its website, but disclaims any obligation to do so.
OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS' procedures with respect to rights in any document or deliverable produced by an OASIS Technical Committee can be found on the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this OASIS Committee Specification or OASIS Standard, can be obtained from the OASIS TC Administrator. OASIS makes no representation that any information or list of intellectual property rights will at any time be complete, or that any claims in such list are, in fact, Essential Claims.
The names "OASIS", are trademarks of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs. OASIS welcomes reference to, and implementation and use of, specifications, while reserving the right to enforce its marks against misleading uses. Please see http://www.oasis-open.org/who/trademark.php for above guidance.
Table of Contents
1 Introduction................................................................................................................................. 7
1.1 Terminology.............................................................................................................................. 7
1.2 Normative References................................................................................................................ 8
1.3 Non-Normative References......................................................................................................... 9
1.4 Conformance Targets................................................................................................................ 9
1.5 Overall Architecture.................................................................................................................. 10
2 Language Design....................................................................................................................... 15
2.1 Dependencies on Other Specifications..................................................................................... 15
2.1.1 Namespaces Referenced................................................................................................... 15
2.2 Language Extensibility............................................................................................................. 15
2.3 Overall Language Structure....................................................................................................... 16
2.3.1 Syntax.............................................................................................................................. 16
2.3.2 Properties......................................................................................................................... 16
2.4 Default use of XPath 1.0 as an Expression Language................................................................ 18
3 Concepts.................................................................................................................................. 19
3.1 Generic Human Roles............................................................................................................... 19
3.2 Composite Tasks and Sub Tasks............................................................................................. 20
3.2.1 Composite Tasks by Definition.......................................................................................... 20
3.2.2 Composite Tasks Created Adhoc at Runtime...................................................................... 20
3.3 Routing Patterns...................................................................................................................... 20
3.4 Relationship of Composite Tasks and Routing Patterns............................................................. 21
3.5 Assigning People.................................................................................................................... 21
3.5.1 Using Logical People Groups............................................................................................. 22
3.5.2 Using Literals.................................................................................................................... 23
3.5.3 Using Expressions............................................................................................................ 24
3.5.4 Data Type for Organizational Entities.................................................................................. 25
3.5.5 Subtasks.......................................................................................................................... 25
3.6 Task Rendering........................................................................................................................ 26
3.7 Lean Tasks.............................................................................................................................. 26
3.8 Task Instance Data.................................................................................................................. 27
3.8.1 Presentation Data.............................................................................................................. 27
3.8.2 Context Data..................................................................................................................... 27
3.8.3 Operational Data............................................................................................................... 27
3.8.4 Data Types for Task Instance Data..................................................................................... 29
3.8.5 Sub Tasks......................................................................................................................... 32
4 Human Tasks............................................................................................................................. 34
4.1 Overall Syntax......................................................................................................................... 34
4.2 Properties............................................................................................................................... 35
4.3 Presentation Elements............................................................................................................. 36
4.4 Task Possible Outcomes......................................................................................................... 39
4.5 Elements for Rendering Tasks.................................................................................................. 39
4.6 Elements for Composite Tasks................................................................................................. 40
4.7 Elements for People Assignment.............................................................................................. 41
4.7.1 Routing Patterns................................................................................................................ 42
4.8 Completion Behavior................................................................................................................ 44
4.8.1 Completion Conditions...................................................................................................... 45
4.8.2 Result Construction from Parallel Subtasks......................................................................... 46
4.9 Elements for Handling Timeouts and Escalations...................................................................... 50
4.10 Human Task Behavior and State Transitions............................................................................ 57
4.10.1 Normal processing of a Human Task................................................................................ 57
4.10.2 Releasing a Human Task.................................................................................................. 58
4.10.3 Delegating or Forwarding a Human Task........................................................................... 58
4.10.4 Sub Task Event Propagation............................................................................................ 58
4.11 History of a Human Task........................................................................................................ 59
4.11.1 Task Event Types and Data.............................................................................................. 60
4.11.2 Retrieving the History....................................................................................................... 62
5 Lean Tasks................................................................................................................................ 65
5.1 Overall Syntax......................................................................................................................... 65
5.2 Properties............................................................................................................................... 65
5.3 Message Schema.................................................................................................................... 65
5.4 Example: ToDoTask................................................................................................................ 67
6 Notifications.............................................................................................................................. 68
6.1 Overall Syntax......................................................................................................................... 68
6.2 Properties............................................................................................................................... 69
6.3 Notification Behavior and State Transitions............................................................................... 69
7 Programming Interfaces............................................................................................................. 70
7.1 Operations for Client Applications............................................................................................ 70
7.1.1 Participant Operations....................................................................................................... 70
7.1.2 Simple Query Operations................................................................................................... 86
7.1.3 Advanced Query Operation................................................................................................ 90
7.1.4 Administrative Operations.................................................................................................. 94
7.1.5 Operation Authorizations.................................................................................................... 95
7.2 XPath Extension Functions...................................................................................................... 98
8 Interoperable Protocol for Advanced Interaction with Human Tasks............................................. 108
8.1 Human Task Coordination Protocol Messages......................................................................... 110
8.2 Protocol Messages................................................................................................................ 111
8.2.1 Protocol Messages Received by a Task Parent................................................................. 111
8.2.2 Protocol Messages Received by a Task........................................................................... 111
8.3 WSDL of the Protocol Endpoints............................................................................................ 111
8.3.1 Protocol Endpoint of the Task Parent............................................................................... 111
8.3.2 Protocol Endpoint of the Task.......................................................................................... 112
8.4 Providing Human Task Context............................................................................................... 112
8.4.1 SOAP Binding of Human Task Context............................................................................. 112
8.4.2 Overriding Task Definition People Assignments................................................................ 113
8.5 Human Task Policy Assertion................................................................................................. 114
9 Task Parent Interactions with Lean Tasks................................................................................... 115
9.1 Operations for Task Parent Applications................................................................................. 115
9.2 Lean Task Interactions............................................................................................................ 115
9.2.1 Register a Lean Task Definition........................................................................................ 115
9.2.2 Unregister a Lean Task Definition...................................................................................... 116
9.2.3 List Lean Task Definitions................................................................................................ 116
9.2.4 Create a Lean Task.......................................................................................................... 117
9.2.5 Endpoints for Lean Task Operations................................................................................. 118
10 Providing Callback Information for Human Tasks.................................................................. 120
10.1 EPR Information Model Extension......................................................................................... 120
10.2 XML Infoset Representation.................................................................................................. 120
10.3 Message Addressing Properties........................................................................................... 122
10.4 SOAP Binding...................................................................................................................... 123
11 Security Considerations...................................................................................................... 126
12 Conformance...................................................................................................................... 127
A. Portability and Interoperability Considerations...................................................................... 128
B. WS-HumanTask Language Schema...................................................................................... 129
C. WS-HumanTask Data Types Schema................................................................................... 144
D. WS-HumanTask Client API Port Type................................................................................... 154
E. WS-HumanTask Parent API Port Type.................................................................................. 224
F. WS-HumanTask Protocol Handler Port Types............................................................................ 230
G. WS-HumanTask Context Schema......................................................................................... 232
H. WS-HumanTask Policy Assertion Schema............................................................................ 235
I. Sample.................................................................................................................................... 236
J. Acknowledgements.................................................................................................................. 246
K. Non-Normative Text............................................................................................................ 248
L. Revision History....................................................................................................................... 249
Human tasks are services “implemented” by people. They allow the integration of humans in service-oriented applications. A human task has two interfaces. One interface exposes the service offered by the task, like a translation service or an approval service. The second interface allows people to deal with tasks, for example to query for human tasks waiting for them, and to work on these tasks.
A human task has people assigned to it. These assignments define who should be allowed to play a certain role on that task. Human tasks might be assigned to people in a well-defined order. This includes assignments in a specific sequence and or parallel assignment to a set of people or any combination of both. Human tasks may also specify how task metadata should be rendered on different devices or applications making them portable and interoperable with different types of software. Human tasks can be defined to react to timeouts, triggering an appropriate escalation action.
This also holds true for notifications. A notification is a special type of human task that allows the sending of information about noteworthy business events to people. Notifications are always one-way, i.e., they are delivered in a fire-and-forget manner: The sender pushes out notifications to people without waiting for these people to acknowledge their receipt.
Let us take a look at an example, an approval task. Such a human task could be involved in a mortgage business process. After the data of the mortgage has been collected, and, if the value exceeds some amount, a manual approval step is required. This can be implemented by invoking an approval service implemented by the approval task. The invocation of the service by the business process creates an instance of the approval task. As a consequence this task pops up on the task list of the approvers. One of the approvers will claim the task, evaluate the mortgage data, and eventually complete the task by either approving or rejecting it. The output message of the task indicates whether the mortgage has been approved or not. All of the above is transparent to the caller of the task (a business process in this example).
The goal of this specification is to enable portability and interoperability:
Out of scope of this specification is how human tasks and notifications are deployed or monitored. Usually people assignment is accomplished by performing queries on a people directory which has a certain organizational model. The mechanism determining how an implementation evaluates people assignments, as well as the structure of the data in the people directory is out of scope.
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC 2119].
[RFC 1766]
Tags for the Identification of Languages, RFC 1766, available via http://www.ietf.org/rfc/rfc1766.txt
[RFC 2046]
Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types, RFC 2046, available via http://www.isi.edu/in-notes/rfc2046.txt (or http://www.iana.org/assignments/media-types/)
[RFC 2119]
Key words for use in RFCs to Indicate Requirement Levels, RFC 2119, available via http://www.ietf.org/rfc/rfc2119.txt
[RFC 2396]
Uniform Resource Identifiers (URI): Generic Syntax, RFC 2396, available via http://www.faqs.org/rfcs/rfc2396.html
[RFC 3066]
Tags for the Identification of Languages, H. Alvestrand, IETF, January 2001, available via http://www.isi.edu/in-notes/rfc3066.txt
[WSDL 1.1]
Web Services Description Language (WSDL) Version 1.1, W3C Note, available via http://www.w3.org/TR/2001/NOTE-wsdl-20010315
[WS-Addr-Core]
Web Services Addressing 1.0 - Core, W3C Recommendation, May 2006, available via http://www.w3.org/TR/ws-addr-core
[WS-Addr-SOAP]
Web Services Addressing 1.0 – SOAP Binding, W3C Recommendation, May 2006, available via http://www.w3.org/TR/ws-addr-soap
[WS-Addr-WSDL]
Web Services Addressing 1.0 – WSDL Binding, W3C Working Draft, February 2006, available via http://www.w3.org/TR/ws-addr-wsdl
[WS-C]
OASIS Standard, “Web Services Coordination (WS-Coordination) Version 1.1”, 16 April 2007, http://docs.oasis-open.org/ws-tx/wstx-wscoor-1.1-spec/wstx-wscoor-1.1-spec.html
[WS-Policy]
Web Services Policy 1.5 - Framework, W3C Candidate Recommendation 30 March 2007, available via http://www.w3.org/TR/ws-policy/
[WS-PolAtt]
Web Services Policy 1.5 - Attachment, W3C Candidate Recommendation 30 March 2007, available via http://www.w3.org/TR/2007/CR-ws-policy-attach-20070330/
[XML Infoset]
XML Information Set, W3C Recommendation, available via http://www.w3.org/TR/2001/REC-xml-infoset-20011024/
[XML Namespaces]
Namespaces in XML 1.0 (Second Edition), W3C Recommendation, available via http://www.w3.org/TR/REC-xml-names/
[XML Schema Part 1]
XML Schema Part 1: Structures, W3C Recommendation, October 2004, available via http://www.w3.org/TR/xmlschema-1/
[XML Schema Part 2]
XML Schema Part 2: Datatypes, W3C Recommendation, October 2004, available via http://www.w3.org/TR/xmlschema-2/
[XMLSpec]
XML Specification, W3C Recommendation, February 1998, available via http://www.w3.org/TR/1998/REC-xml-19980210
[XPATH 1.0]
XML Path Language (XPath) Version 1.0, W3C Recommendation, November 1999, available via http://www.w3.org/TR/1999/REC-xpath-19991116
There are no non-normative references made by this specification.
The following conformance targets are defined as part of this specification
·
WS-HumanTask Definition
A WS-HumanTask Definition is any artifact that complies with the human
interaction schema and additional constraints defined in this document.
·
WS-HumanTask Processor
A WS-HumanTask Processor is any implementation that accepts a WS-HumanTask
definition and executes the semantics as defined in this document.
·
WS-HumanTask Parent
A WS-HumanTask Parent is any implementation that supports the Interoperable
Protocol for Advanced Interactions with Human Tasks as defined in this
document.
·
WS-HumanTask Client
A WS-HumanTask Client is any implementation that uses the Programming
Interfaces of the WS-HumanTask Processor.
One of the motivations of WS-HumanTask was an increasingly important need to support the ability to allow any application to create human tasks in a service-oriented manner. Human tasks had traditionally been created by tightly-coupled workflow management systems (WFMS). In such environments the workflow management system managed the entirety of a task’s lifecycle, an approach that did not allow the means to directly affect a task’s lifecycle outside of the workflow management environment (other than for a human to actually carry out the task). Particularly significant was an inability to allow applications to create a human task in such tightly coupled environments.
Figure 1- Architectural Impact of WS-HumanTask on Workflow Management Systems
The component within a WFMS typically responsible for managing a task’s lifecycle (aka workitem) is called a Workitem Manager. An example of such an environment is depicted on the left portion of Figure 1. The right portion of the figure depicts how significant a change of architecture WS-HumanTask represents. Using this approach, the WFMS no longer incorporates a workitem manager but rather interacts with a Task Processor. In this architecture the Task Processor is a separate, standalone component exposed as a service, allowing any requestor to create tasks and interact with tasks. It is the Task Processor’s role to manage its tasks’ lifecycle and to provide the means to “work” on tasks.
Conversely, by separating the Task Processor from the WFMS tasks can be used in the context of a WFMS or any other WS-HumanTask application (also referred to as the Task Parent). A (special) case of a business process acting as a Task Parent of a human task is described by the BPEL4People specification.
WS-HumanTask tasks are assumed to have an interface. The interface of a task is represented as an application-dependent port type referred to as its Task Definition specific interface (or interface for short – see section 4.2). In order to create task instances (or tasks for short) managed by a particular Task Processor, a port implementing the port type corresponding to a task needs to be deployed into the Task Processor before it can be invoked. See Figure 2 depicting a Task Definition associated with a port type pT).
Figure 2 - Task Definitions Deployed in Task Processor
Once a task is available on the task processor any requestor can create task instances and interact with them. The requestor that creates a task is referred to as the Task Parent. A task instance is created by invoking an operation of the port type representing the interface of the task to be created. Typically port types expose a single operation. Where more than one operation is defined, which operation of the port type to be used to create a task is outside the scope of WS-HumanTask.
Figure 3 - Instantiating Tasks
In workflow environments the lifecycle of a task is typically dependent on the workflow system - i.e. tasks have to give up some of their autonomy. For example when a workflow is terminated prematurely, task initiated by that workflow should not be allowed to continue - the corresponding efforts to continue the work of the task would otherwise be wasted. To automate the corresponding behavior ensuring that the lifecycle of a Task Parent and the lifecycles of its initiated tasks are tightly coupled, WS-HumanTask uses the WS-Coordination specification as its coordination framework. This requires the definition of a coordination protocol following a particular behavior (see section 8). This is depicted by Figure 4.
When the Task Parent creates a task using the specific operation op() of a port of port type pT, coordination context information is passed by the Task Parent to the environment hosting that port. Like any other WS-Coordination compliant coordination context, it contains the endpoint reference of (i.e. a “pointer” to) the coordinator to be used by the recipient of the context to register the corresponding coordination type. Note that for simplicity we assume in Figure 4 that the Task Processor itself is this recipient of the context information. Upon reception of the coordination context the Task Processor will register with the coordinator, implying that it passes the endpoint reference of its protocol handler to the coordinator (see section 8). In turn it will receive the endpoint reference of the protocol handler of the Task Parent. Similarly, for simplicity we assume in Figure 4 that the task parent provides its protocol handler. From that point on a coordination channel is established between the Task Parent and the Task Processor to exchange protocol messages allowing the coupling of the lifecycles of a task with its Task Parent. Section 4.10 describes the lifecycle of a task in more detail.
Figure 4 - Establishing a Protocol Channel
Most often tasks are long running in nature and will be invoked in an asynchronous manner. Thus, the Task Parent will kick-off the task and expects the result of the task to be returned at a later point in time. In order to allow the ability to pass the results back, the Task Processor needs to know where to send these results. For this purpose the context is extended with additional metadata that specifies the endpoint reference to be used to pass the result to, as well as the operation of the endpoint to be used by the Task Processor. Figure 5 depicts this by showing that the context contains information pointing to a port of port type pt’ and specifying the name of the operation op’ to be used on that port for returning results. Note that this behavior is compliant to WS-Addressing.
Figure 5 - Passing Callback Information for Long Running Tasks
Finally, a Task Parent application invoking an operation implemented by a task is allowed to pass additional data along with the request message. This data is called the human task context and allows the ability to override some of the Task Definition’s elements. Conversely, a human task context is also passed back with the response message, propagating information from the completed task to the Task Parent application, such as the task outcome or the task’s actual people assignments.
Once a task is created it can be presented to its (potential) owners to be claimed and worked on. For that purpose another type of application called a Task Client is typically used. A Task Client presents to each of its users the tasks available to them. Users can then decide to claim the task to carry out the work associated with it. Other functions typically offered by a Task Client include the ability to skip a task, to add comments or attachments to a task, to nominate other users to perform the task and that like. In order to enable a Task Client to perform such functions on tasks, WS-HumanTask specifies the task client interface required to be implemented by Task Processor to support Task Clients (see section 7.1). Figure 6 depicts the resultant architecture stemming from the introduction of Task Clients.
Figure 6 - Task List Client and Corresponding Interface
Once a user selects a task using his or her Task Client the user interface associated with the task is rendered allowing the user to view application-specific information pertaining to the task. WS-HumanTask does not specify such rendering but provides the means using a container to provide rendering hints to Task Clients. A Task Client in turn uses this information to construct or initiate the construction of the user interface of the task - the details how this is achieved are out of scope of WS-HumanTask. In the case of Lean Tasks, that rendering may be generated by the Task Processor. From the perspective of the Task Client, the fact the task is a Lean Task need not be apparent. Furthermore, the task may require the use of business applications to complete the task. Again the use of such business applications is out of scope of WS-HumanTask but such applications and their use are nonetheless important to the overall architecture depicted in Figure 7.
Figure 7 - Overall Architecture of a Human Task Infrastructure
The container referred to above for rendering a task’s information is a task’s <rendering> element (see section 4.4). A rendering element specifies its type, expressed as a QName that denotes the kind of rendering mechanism to use to generate the user interface for the task. All information actually needed to create the user interface of the task is provided by the elements nested within the task’s rendering element (see Figure 8). The nested elements may also provide information about a business application required to complete the task and other corresponding parameters.
Figure 8 - Potential Renderings of a Task
For example Figure 9 depicts a rendering of type my:HTMLform. Its QName denotes that HTML forms processing capabilities is needed to render the corresponding user interface of the task enclosing this rendering. The nested element of the my:HTMLform rendering contains the actual HTML form to be rendered. The example further assumes that the forms processor understands the {$...} notation (see section 4.3) to provide values from the task input as data presented in the form.
Figure 9 - Sample Rendering of a Task
A task may have different renderings associated with it. This allows the ability for a task to be rendered by different access mechanisms or adapt to user preferences for example. How information is rendered is out of scope of the WS-HumanTask specification.
The language introduces a grammar for describing human tasks and notifications. Both design time aspects, such as task properties and notification properties, and runtime aspects, such as task states and events triggering transitions between states are covered by the language. Finally, it introduces a programming interface which can be used by applications involved in the life cycle of a task to query task properties, execute the task, or complete the task. This interface helps to achieve interoperability between these applications and the task infrastructure when they come from different vendors.
The language provides an extension mechanism that can be used to extend the definitions with additional vendor-specific or domain-specific information.
Throughout this specification, WSDL and schema elements may be used for illustrative or convenience purposes. However, in a situation where those elements or other text within this document contradict the separate WS-HumanTask, WSDL or schema files, it is those files that have precedence and not this document.
WS-HumanTask utilizes the following specifications:
· WSDL 1.1
· XML Schema 1.0
· XPath 1.0
· WS-Addressing 1.0
· WS-Coordination 1.1
· WS-Policy 1.5
WS-HumanTask references these namespaces:
· wsa – http://www.w3.org/2005/08/addressing
· wsdl – http://schemas.xmlsoap.org/wsdl/
· wsp – http://www.w3.org/ns/ws-policy
· xsd – http://www.w3.org/2001/XMLSchema
The WS-HumanTask extensibility mechanism allows:
· Attributes from other namespaces to appear on any WS-HumanTask element
· Elements from other namespaces to appear within WS-HumanTask elements
Extension attributes and extension elements MUST NOT contradict the semantics of any attribute or element from the WS-HumanTask namespace. For example, an extension element could be used to introduce a new task type.
The specification differentiates between mandatory and optional extensions (the section below explains the syntax used to declare extensions). If a mandatory extension is used, a compliant implementation has to understand the extension. If an optional extension is used, a compliant implementation can ignore the extension.
Human interactions subsume both human tasks and notifications. While human tasks and notifications are described in subsequent sections, this section explains the overall structure of human interactions definition.
<htd:humanInteractions
xmlns:htd="http://docs.oasis-open.org/ns/bpel4people/ws-humantask/200803"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="anyURI"
targetNamespace="anyURI"
expressionLanguage="anyURI"?
queryLanguage="anyURI"?>
<htd:extensions>?
<htd:extension namespace="anyURI" mustUnderstand="yes|no"/>+
</htd:extensions>
<htd:import namespace="anyURI"?
location="anyURI"?
importType="anyURI" />*
<htd:logicalPeopleGroups>?
<htd:logicalPeopleGroup name="NCName" reference="QName"?>+
<htd:parameter name="NCName" type="QName" />*
</htd:logicalPeopleGroup>
</htd:logicalPeopleGroups>
<htd:tasks>?
<htd:task name="NCName">+
...
</htd:task>
</htd:tasks>
<htd:notifications>?
<htd:notification name="NCName">+
...
</htd:notification>
</htd:notifications>
</htd:humanInteractions>
The <humanInteractions> element has the following properties:
· expressionLanguage: This attribute specifies the expression language used in the enclosing elements. The default value for this attribute is urn:ws-ht:sublang:xpath1.0 which represents the usage of XPath 1.0 within human interactions definition. A WS-HumanTask Definition that uses expressions MAY override the default expression language for individual expressions. A WS-HumanTask Processor MUST support the use of XPath 1.0 as the expression language.
· queryLanguage: This attribute specifies the query language used in the enclosing elements. The default value for this attribute is urn:ws-ht:sublang:xpath1.0 which represents the usage of XPath 1.0 within human interactions definition. A WS-HumanTask Definition that use query expressions MAY override the default query language for individual query expressions. A WS-HumanTask Processor MUST support the use of XPath 1.0 as the query language.
· extensions: This element is used to specify namespaces of WS-HumanTask extension attributes and extension elements. The element is optional. If present, it MUST include at least one extension element. The <extension> element is used to specify a namespace of WS-HumanTask extension attributes and extension elements, and indicate whether they are mandatory or optional. Attribute mustUnderstand is used to specify whether the extension must be understood by a compliant implementation. If the attribute has value “yes” the extension is mandatory. Otherwise, the extension is optional. If a WS-HumanTask Processor does not support one or more of the extensions with mustUnderstand="yes", then the human interactions definition MUST be rejected. A WS-HumanTask Processor MAY ignore optional extensions. A WS-HumanTask Definition MAY declare optional extensions. The same extension URI MAY be declared multiple times in the <extensions> element. If an extension URI is identified as mandatory in one <extension> element and optional in another, then the mandatory semantics have precedence and MUST be enforced by a WS-HumanTask Processor. The extension declarations in an <extensions> element MUST be treated as an unordered set.
· import: This element is used to declare a dependency on external WS-HumanTask and WSDL definitions. Zero or more <import> elements MAY appear as children of the <humanInteractions> element.
The namespace attribute specifies an absolute URI that identifies the imported definitions. This attribute is optional. An <import> element without a namespace attribute indicates that external definitions are in use which are not namespace-qualified. If a namespace is specified then the imported definitions MUST be in that namespace. If no namespace is specified then the imported definitions MUST NOT contain a targetNamespace specification. The namespace http://www.w3.org/2001/XMLSchema is imported implicitly. Note, however, that there is no implicit XML Namespace prefix defined for http://www.w3.org/2001/XMLSchema.
The location attribute contains a URI indicating the location of a document that contains relevant definitions. The location URI MAY be a relative URI, following the usual rules for resolution of the URI base [XML Base, RFC 2396]. The location attribute is optional. An <import> element without a location attribute indicates that external definitions are used by the human interactions definition but makes no statement about where those definitions can be found. The location attribute is a hint and a WS-HumanTask Processor is not required to retrieve the document being imported from the specified location.
The mandatory importType attribute identifies the type of document being imported by providing an absolute URI that identifies the encoding language used in the document. The value of the importType attribute MUST be set to http://docs.oasis-open.org/ns/bpel4people/ws-humantask/200803 when importing human interactions definitions, to http://schemas.xmlsoap.org/wsdl/ when importing WSDL 1.1 documents or to http://www.w3.org/2001/XMLSchema when importing XML Schema documents.
According to these rules, it is permissible to have an <import> element without namespace and location attributes, and only containing an importType attribute. Such an <import> element indicates that external definitions of the indicated type are in use that are not namespace-qualified, and makes no statement about where those definitions can be found.
A WS-HumanTask Definition MUST import all other WS-HumanTask definitions, WSDL definitions, and XML Schema definitions it uses. In order to support the use of definitions from namespaces spanning multiple documents, a WS-HumanTask Definition MAY include more than one import declaration for the same namespace and importType, provided that those declarations include different location values. <import> elements are conceptually unordered. A WS-HumanTask Processor MUST reject the imported documents if they contain conflicting definitions of a component used by the imported WS-HumanTask Definition.
Documents (or namespaces) imported by an imported document (or namespace) MUST NOT be transitively imported by a WS-HumanTask Processor. In particular, this means that if an external item is used by a task enclosed in the WS-HumanTask Definition, then a document (or namespace) that defines that item MUST be directly imported by the WS-HumanTask Definition. This requirement does not limit the ability of the imported document itself to import other documents or namespaces.
· logicalPeopleGroups: This element specifies a set of logical people groups. The element is optional. If present, it MUST include at least one logicalPeopleGroup element. The set of logical people groups MUST contain only those logical people groups that are used in the humanInteractions element, and enclosed human tasks and notifications. The logicalPeopleGroup element has the following attributes. The name attribute specifies the name of the logical people group. The name MUST be unique among the names of all logicalPeopleGroups defined within the humanInteractions element. The reference attribute is optional. In case a logical people group used in the humanInteractions element is defined in an imported WS-HumanTask definition, the reference attribute MUST be used to specify the logical people group. The parameter element is used to pass data needed for people query evaluation.
· tasks: This element specifies a set of human tasks. The element is optional. If present, it MUST include at least one <task> element. The syntax and semantics of the <task> element are introduced in section 4 “Human Tasks”.
· notifications: This element specifies a set of notifications. The element is optional. If present, it MUST include at least one <notification> element. The syntax and semantics of the <notification> element are introduced in section 6 “Notifications”.
· Element humanInteractions MUST NOT be empty, that is it MUST include at least one element.
All elements in WS-HumanTask Definition MAY use the element <documentation> to provide annotation for users. The content could be a plain text, HTML, and so on. The <documentation> element is optional and has the following syntax:
<htd:documentation xml:lang="xsd:language">
...
</htd:documentation>
The XPath 1.0 specification [XPATH 1.0] defines the context in which an XPath expression is evaluated. When XPath 1.0 is used as an Expression Language in WS-HumanTask language elements then the XPath context is initialized as follows:
Note that XPath 1.0 explicitly requires that any element or attribute used in an XPath expression that does not have a namespace prefix must be treated as being namespace unqualified. As a result, even if there is a default namespace defined on the enclosing element, the default namespace will not be applied.
Generic human roles define what a person or a group of people resulting from a people query can do with tasks and notifications. The following generic human roles are taken into account in this specification:
· Task initiator
· Task stakeholders
· Potential owners
· Actual owner
· Excluded owners
· Business administrators
· Notification recipients
A task initiator is the person who creates the task instance. A WS-HumanTask Definition MAY define assignment for this generic human role. Depending on how the task has been instantiated the task initiator can be defined.
The task stakeholders are the people ultimately responsible for the oversight and outcome of the task instance. A task stakeholder can influence the progress of a task, for example, by adding ad-hoc attachments, forwarding the task, or simply observing the state changes of the task. It is also allowed to perform administrative actions on the task instance and associated notification(s), such as resolving missed deadlines. A WS-HumanTask Definition MAY define assignment for this generic human role. WS-HumanTask Processors MUST ensure that at least one person is associated with this role at runtime.
Potential owners of a task are persons who receive the task so that they can claim and complete it. A potential owner becomes the actual owner of a task by explicitly claiming it. Before the task has been claimed, potential owners can influence the progress of the task, for example by changing the priority of the task, adding ad-hoc attachments or comments. All excluded owners are implicitly removed from the set of potential owners. A WS-HumanTask Definition MAY define assignment for this generic human role.
Excluded owners are are people who cannot become an actual or potential owner and thus they cannot reserve or start the task. A WS-HumanTask Definition MAY define assignment for this generic human role.
An actual owner of a task is the person actually performing the task. When task is performed, the actual owner can execute actions, such as revoking the claim, forwarding the task, suspending and resuming the task execution or changing the priority of the task. A WS-HumanTask Definition MUST NOT define assignment for this generic human role.
Business administrators play the same role as task stakeholders but at task definition level. Therefore, business administrators can perform the exact same operations as task stakeholders. Business administrators can also observe the progress of notifications. A WS-HumanTask Definition MAY define assignment for this generic human role. WS-HumanTask Processors MUST ensure that at runtime at least one person is associated with this role.
Notification recipients are persons who receive the notification, such as happens when a deadline is missed or when a milestone is reached. This role is similar to the roles potential owners and actual owner but has different repercussions because a notification recipient does not have to perform any action and hence it is more of informational nature than participation. A notification has one or more recipients. A WS-HumanTask Definition MAY define assignment for this generic human role.
A human task may describe complex work that can be divided into a substructure of related, but independent operations with potential work being carried out by different parties.
Complex tasks with substructures are called composite tasks; they can be considered as a composition of multiple (sub) tasks.
A sub task describes an act that may or must be completed as part of completing a larger and more complex task. The enclosing composite task may share data with embedded sub tasks, e.g. map data into the input structure of sub tasks or share attachments between composite and sub task.
Composite tasks follow the design principle that they are managed by a single task processor.
In general sub tasks are human tasks, inheriting all attributes that a human task has, and each behaving the way that a human task does. Some specialties in the area of people assignment and state transitions apply in case a task is a sub task, to align with the behavior of the superior composite task.
Tasks can be composite tasks by definition (sub tasks are already defined in the task model) or turn into composite tasks at runtime when a task processor creates in an ad-hoc manner one or more sub tasks to structure work.
In case a composite task is pre-defined as such, the task model contains the definition of one or more sub tasks. Composite tasks come with the following additional attributes:
· Composition Type (parallel | sequential)
Composite tasks with composition type “parallel” allow multiple active sub tasks at the same time; sub tasks are not in any order; composite tasks with composition type “sequential” only allow sequential creation of sub tasks in the pre-defined order (a second listed sub task must not be created before a first listed sub task has been terminated).
· Creation Pattern (manual | automatic)
Composite tasks with activation pattern “manual” expect the ”actual owner” to trigger creation of pre-defined sub tasks; composite tasks with activation pattern “automatic” are automatically created at the time the composite task’s status becomes “in progress” (where composition type is “parallel” all pre-defined sub tasks are created at the time the composite task’s status becomes “in progress”; where composition type is “sequential” at the time the composite task’s status becomes “in progress” the first defined sub task will be created; the next sub task in a sequence is automatically created when its predecessor is terminated).
An ordinary task may turn into a composite task when the actual owner of a task decides to substructure his work and create sub tasks ad-hoc at runtime.
These sub tasks created at runtime behave and are treated as though they are of type “parallel” (a user may create multiple sub tasks at a time) and have an activation pattern of “manual” (creation of ad-hoc sub tasks is always triggered by a user).
A Routing Pattern is a special form of potential owner assignment in which a Task is assigned to people in a well-defined order. Routing patterns allow the assignment of a Task in sequence or parallel. The htd:parallel element defines a parallel routing pattern and the htd:sequence element defines a sequential routing pattern. Those patterns MAY be used in any combination to create complex task routing to people. Routing patterns can be used in both tasks and sub tasks.
The complex people assignment used to describe Routing Patterns is a specific syntatic version of Composite Tasks. It is a convenient syntax to decribe the "who" in a composite task scenario. The composite task syntax is more expressive to describe the "what" in the sense of which different subtasks are executed.
A composite task, including subtasks of different task types, can be described only using the composite task syntax. A routing task containing a dynamic number of subtasks derived from the cardinality of the set of assigned people can be described only using the routing task syntax.
Both syntatic flavors may be used in combination which means that a composite task type may include a complex people assignment and that any task defining a complex people assignment may become a composite task at runtime when creating adhoc subtasks.
The runtime instantiation model and observable behavior for task instances is identical when using one or the other syntatic flavor.
To determine who is responsible for acting on a human task in a certain generic human role or who will receive a notification, people need to be assigned. People assignment can be achieved in different ways:
· Via logical people groups (see 3.5.1 “Using Logical People Groups”)
· Via literals (see 3.5.2 “Using Literals”)
· Via expressions e.g., by retrieving data from the input message of the human task (see 3.5.3 “Using Expressions”).
· In a well-defined order using Routing Patterns (see Routing Patterns)
When specifying people assignments then the data type htt:tOrganizationalEntity is used. The htt:tOrganizationalEntity element specifies the people assignments associated with generic human roles used.
Human tasks might be assigned to people in a well-defined order. This includes assignments in a specific sequence and or parallel assignment to a set of people or any combination of both.
Syntax:
<htd:peopleAssignments>
<htd:genericHumanRole>+
<htd:from>...</htd:from>
</htd:genericHumanRole>
<htd:potentialOwners>+
fromPattern+
</htd: potentialOwners>
</htd:peopleAssignments>
The following syntactical elements for generic human roles are introduced. They can be used wherever the abstract element genericHumanRole is allowed by the WS-HumanTask XML Schema.
<htd:excludedOwners>
<htd:from>...</htd:from>
</htd:excludedOwners>
<htd:taskInitiator>
<htd:from>...</htd:from>
</htd:taskInitiator>
<htd:taskStakeholders>
<htd:from>...</htd:from>
</htd:taskStakeholders>
<htd:businessAdministrators>
<htd:from>...</htd:from>
</htd:businessAdministrators>
<htd:recipients>
<htd:from>...</htd:from>
</htd:recipients>
For the potentialOwner generic human role the syntax is as following
<htd:potentialOwner>
fromPattern+
</htd:potentialOwner>
where fromPattern is one of:
<htd:from> ... </htd:from>
<htd:sequence type="all|single"?>
fromPattern*
</htd:sequence>
<htd:parallel type="all|single"?>
fromPattern*
</htd:parallel>
Element <htd:from> is used to specify the value to be assigned to a role. The element has different forms as described below.
A logical people group represents one person, a set of people, or one or many unresolved groups of people (i.e., group names). A logical people group is bound to a people query against a people directory at deployment time. Though the term query is used, the exact discovery and invocation mechanism of this query is not defined by this specification. There are no limitations as to how the logical people group is evaluated. At runtime, this people query is evaluated to retrieve the actual people assigned to the task or notification. Logical people groups MUST support query parameters which are passed to the people query at runtime. Parameters MAY refer to task instance data (see section 3.8 for more details). During people query execution a WS-HumanTask Processor can decide which of the parameters defined by the logical people group are used. A WS-HumanTask Processor MAY use zero or more of the parameters specified. It MAY also override certain parameters with values defined during logical people group deployment. The deployment mechanism for tasks and logical people groups is out of scope for this specification.
A logical people group has one instance per set of unique arguments. Whenever a logical people group is referenced for the first time with a given set of unique arguments, a new instance MUST be created by the WS-HumanTask Processor. To achieve that, the logical people group MUST be evaluated / resolved for this set of arguments. Whenever a logical people group is referenced for which an instance already exists (i.e., it has already been referenced with the same set of arguments), the logical people group MAY be re-evaluated/re-resolved.
In particular, for a logical people group with no parameters, there is a single instance, which MUST be evaluated / resolved when the logical people group is first referenced, and which MAY be re-evaluated / re-resolved when referenced again.
People queries are evaluated during the creation of a human task or a notification. If a people query fails a WS-HumanTask Processor MUST create the human task or notification anyway. Failed people queries MUST be treated like people queries that return an empty result set. If the potential owner people query returns an empty set of people a WS-HumanTask Processor MUST perform nomination (see section 4.10.1 “Normal processing of a Human Task”). In case of notifications a WS-HumanTask Processor MUST apply the same to notification recipients.
People queries return one person, a set of people, or the name of one or many groups of people. The use of a group enables the ability to create a human "work queue" where members are provided access to work items assigned to them as a result of their membership of a group. The ability to defer group membership is beneficial when group membership changes frequently.
Logical people groups are global elements enclosed in a human interactions definition document. Multiple human tasks in the same document can utilize the same logical people group definition. During deployment each logical people group is bound to a people query. If two human tasks reference the same logical people group, they are bound to the same people query. However, this does not guarantee that the tasks are actually assigned to the same set of people. The people query is performed for each logical people group reference of a task and can return different results, for example if the content of the people directory has been changed between two queries. Binding of logical people groups to actual people query implementations is out of scope for this specification.
Syntax:
<htd:from logicalPeopleGroup="NCName">
<htd:argument name="NCName" expressionLanguage="anyURI"? >*
expression
</htd:argument>
</htd:from>
The logicalPeopleGroup attribute refers to a logicalPeopleGroup definition. The element <argument> is used to pass values used in the people query. The expressionLanguage attribute specifies the language used in the expression. The attribute is optional. If not specified, the default language as inherited from the closest enclosing element that specifies the attribute MUST be used by WS-HumanTask Processor.
Example:
<htd:potentialOwners>
<htd:from logicalPeopleGroup="regionalClerks">
<htd:argument name="region">
htd:getInput("part1")/region
</htd:argument>
</htd:from>
</htd:potentialOwners>
People assignments can be defined literally by directly specifying the user identifier(s) or the name(s) of groups using either the htt:tOrganizationalEntity or htt:tUser data type introduced below (see 3.5.4 “Data Type for Organizational Entities”).
Syntax:
<htd:from>
<htd:literal>
... literal value ...
</htd:literal>
</htd:from>
Example specifying user identifiers:
<htd:potentialOwners>
<htd:from>
<htd:literal>
<htt:organizationalEntity>
<htt:user>Alan</htt:user>
<htt:user>Dieter</htt:user>
<htt:user>Frank</htt:user>
<htt:user>Gerhard</htt:user>
<htt:user>Ivana</htt:user>
<htt:user>Karsten</htt:user>
<htt:user>Matthias</htt:user>
<htt:user>Patrick</htt:user>
</htt:organizationalEntity>
</htd:literal>
</htd:from>
</htd:potentialOwners>
Example specifying group names:
<htd:potentialOwners>
<htd:from>
<htd:literal>
<htt:organizationalEntity>
<htt:group>bpel4people_authors</htt:group>
</htt:organizationalEntity>
</htd:literal>
</htd:from>
</htd:potentialOwners>
Alternatively people can be assigned using expressions returning either an instance of the htt:tOrganizationalEntity data type or the htt:tUser data type introduced below (see 3.5.4 “Data Type for Organizational Entities”).
Syntax:
<htd:from expressionLanguage="anyURI"?>
expression
</htd:from>
The expressionLanguage attribute specifies the language used in the expression. The attribute is optional. If not specified, the default language as inherited from the closest enclosing element that specifies the attribute MUST be used by WS-HumanTask Processor.
Example:
<htd:potentialOwners>
<htd:from>htd:getInput("part1")/approvers</htd:from>
</htd:potentialOwners>
<htd:businessAdministrators>
<htd:from>
htd:except( htd:getInput("part1")/admins,
htd:getInput("part1")/globaladmins[0] )
</htd:from>
</htd:businessAdministrators>
The following XML schema definition describes the format of the data that is returned at runtime when evaluating a logical people group. The result can contain either a list of users or a list of groups. The latter is used to defer the resolution of one or more groups of people to a later point, such as when the user accesses a task list.
<xsd:element name="organizationalEntity" type="tOrganizationalEntity" />
<xsd:complexType name="tOrganizationalEntity">
<xsd:choice maxOccurs="unbounded">
<xsd:element name="user" type="tUser" />
<xsd:element name="group" type="tGroup" />
</xsd:choice>
</xsd:complexType>
<xsd:element name="user" type="tUser" />
<xsd:simpleType name="tUser">
<xsd:restriction base="xsd:string" />
</xsd:simpleType>
<xsd:element name="group" type="tGroup" />
<xsd:simpleType name="tGroup">
<xsd:restriction base="xsd:string" />
</xsd:simpleType>
Like a task, a sub task has a set of generic human roles. In case people assignment to a sub task’s roles is not defined (neither in the sub task’s task definition nor on composite task level (using overwrite mechanisms)) the following default assignments apply (especially valid for ad-hoc scenarios):
· Task initiator
a) Activation pattern “manual” à WS-HumanTask Processor MAY assign the actual owner of the composite task
b) Activation pattern “automatic” à WS-HumanTask Processor MAY assign the initiator of the composite task
· Task stakeholders
o A WS-HumanTask Processor MAY assign the actual owner of the composite task
· Potential owners
o No default assignment (usually potential owners will explicitly be defined)
· Excluded owners
o A WS-HumanTask Processor MUST assign the excluded owners of the composite task
(This rule applies always, even though the excluded owners of a sub task may be enhanced by additional people)
· Business administrators
o A WS-HumanTask Processor MAY assign the business administrators of the composite task
Humans require a presentation interface to interact with a machine. This specification covers the service interfaces that enable this to be accomplished, and enables this in different constellations of software from different parties. The key elements are the task list client, the task processor and the applications invoked when a task is executed.
It is assumed that a single task instance can be rendered by different task list clients so the task engine does not depend on a single dedicated task list client. Similarly it is assumed that one task list client can present tasks from several task engines in one homogenous list and can handle the tasks in a consistent manner. The same is assumed for notifications.
A distinction is made between the rendering of the meta-information associated with the task or notification (task-description UI and task list UI) (see section 4.3 for more details on presentation elements) and the rendering of the task or notification itself (task-UI) used for task execution (see section 4.4 for more details on task rendering). For example, the task-description UI includes the rendering of a summary list of pending or completed tasks and detailed meta-information such as a deadlines, priority and description about how to perform the task. It is the task list client that deals with this.
The task-UI can be rendered by the task list client or delegated to a rendering application invoked by the task list client. The task definition and notification definition can define different rendering information for the task-UI using different rendering methodologies.
Versatility of deployment determines which software within a particular constellation performs the presentation rendering.
The task-UI can be specified by a rendering method within the task definition or notification definition. The rendering method is identified by a unique name attribute and specifies the type of rendering technology being used. A task or a notification can have more than one such rendering method, e.g. one method for each environment the task or notification is accessed from (e.g. workstation, mobile device).
The task-list UI encompasses all information crucial for understanding the importance of and details about a given task or notification (e.g. task priority, subject and description) - typically in a table-like layout. Upon selecting a task, i.e. an entry in case of a table-like layout, the user is given the opportunity to launch the corresponding task-UI. The task-UI has access to the task instance data, and can comprise and manipulate documents other than the task instance. It can be specified by a rendering method within the task description.
WS-HumanTask enables the creation of task applications with rich renderings, separate input and output messages, and custom business logic in the portType implementation. However, in the spectrum of possible tasks, from enterprise-wide formal processes to department-wide processes to team specific processes to individual, ad-hoc assignments of work, there are scenarios where the task can be defined simply with metadata and the rendering can be left to the WS-HumanTask Processor. An example of this is a simple to-do task, where no form is required beyond the acknowledgement by the actual owner that the work stated in the name, subject, and description of the task is done. A notification doesn’t work in this case since it lacks the ability to track whether the work is done or not, and defining a task with a WSDL and portType is beyond the capabilities of those requiring the work done, such as in a team or individual scenario. Therefore, having a way to define the work required of the task in a simpler way enables a greater breadth of scenarios for these smaller scoped types.
A Lean Task is a task that has a reduced set of vendor-specific capabilities which results in increased portability and simplicity. The two pieces of the task XML definition that Lean Tasks lack are the ability to define renderings and custom port types. Throughout the specification uses of the word task refers to both types of tasks unless otherwise noted.
When used in constellation 4 of WS-BPEL4People, a Lean Task MUST be started through pre-existing interfaces that do not vary in portType or operation per task. The port and operation MUST instead be shipped as part of the installation of the WS-HumanTask Processor (see section 1.4). Therefore, they also lack the ability to define which portType and operation are used to start the task as part of its XML definition. Instead, a Lean Task uses a sub-element that describes the input message (and a symmetrical output message).
While a lean task can have one or more renderings explicitly defined, if it defines zero renderings, the schema of the input message and its contained hints for rendering MUST instead be used.
All other WS-HumanTask Client to WS-HumanTask Processor interactions behave exactly as before, implying that the processing of a task on a WS-HumanTask Processor for a Lean Task and for a non-Lean Task MUST be indistinguishable from the perspective of a WS-HumanTask Client.
Task instance data falls into three categories:
· Presentation data – The data is derived from the task definition or the notification definition such as the name, subject or description.
· Context data - A set of dynamic properties, such as priority, task state, time stamps and values for all generic human roles.
· Operational data – The data includes the input message, output message, attachments and comments.
The presentation data is used, for example, when displaying a task or a notification in the task list client. The presentation data has been prepared for display such as by substituting variables. See section 4.3 “Presentation Elements” for more details.
The task context includes the following:
· Task state
· Priority
· Values for all generic human roles, i.e. potential owners, actual owner and business administrators
· Time stamps such as start time, completion time, defer expiration time, and expiration time
· Skipable indicator
A WS-HumanTask Processor MAY extend this set of properties available in the task context. For example, the actual owner might start the execution of a task but does not complete it immediately, in which case ann intermediate state could be saved in the task context.
The operational data of a task consists of its input data and output data or fault data, as well as any ad-hoc attachments and comments. The operational data of a notification is restricted to its input data. Operational data is accessed using the XPath extension functions and programming interface.
A WS-HumanTask Processor MAY allow arbitrary additional data to be attached to a task. This additional data is referred to as task ad-hoc attachments. An ad-hoc attachment is specified by its name, its type and its content and a system-generated attachment identifier.
The contentType of an attachment can be any valid XML schema type, including xsd:any, or any MIME type. The attachment data is assumed to be of that specified content type.
The contentCategory of an attachment is a URI used to qualify the contentType. While contentType contains the type of the attachment, the contentCategory specifies the type system used when defining the contentType. Predefined values for contentCategory are
The set of values is extensible. A WS-HumanTask Processor MUST support the use of XML Schema types and MIME types as content categories, indicated by the predefined URI values shown above.
The accessType element indicates if the attachment is specified inline or by reference. In the inline case it MUST contain the string constant “inline”. In this case the value of the attachment data type contains the base64 encoded attachment. In case the attachment is referenced it MUST contain the string “URL”, indicating that the value of the attachment data type contains a URL from where the attachment can be retrieved. Other values of the accessType element are allowed for extensibility reasons, for example to enable inclusion of attachment content from content management systems.
The attachedTime element indicates when the attachment is added.
The attachedBy element indicates who added the attachment. It could be a user, not a group or a list of users or groups.
When an ad-hoc attachment is added to a task, the system returns an identifier that is unique among any attachment for the task. It is then possible to retrieve or delete the attachment by the attachment identifier.
Attachment Info Data Type
The following data type is used to return attachment information on ad-hoc attachments.
<xsd:element name="attachmentInfo" type="tAttachmentInfo" />
<xsd:complexType name="tAttachmentInfo">
<xsd:sequence>
<xsd:element name="identifier" type="xsd:anyURI" />
<xsd:element name="name" type="xsd:string" />
<xsd:element name="accessType" type="xsd:string" />
<xsd:element name="contentType" type="xsd:string" />
<xsd:element name="contentCategory" type="xsd:anyURI" />
<xsd:element name="attachedTime" type="xsd:dateTime" />
<xsd:element name="attachedBy" type="htt:tUser" />
<xsd:any namespace="##other" processContents="lax"
minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
Attachment Data Type
The following data type is used to return ad-hoc attachments.
<xsd:element name="attachment" type="tAttachment" />
<xsd:complexType name="tAttachment">
<xsd:sequence>
<xsd:element ref="attachmentInfo" />
<xsd:element name="value" type="xsd:anyType" />
</xsd:sequence>
</xsd:complexType>
A WS-HumanTask Processor MAY allow tasks to have associated textual notes added by participants of the task. These notes are collectively referred to as task comments. Comments are essentially a chronologically ordered list of notes added by various users who worked on the task. A comment has an ID, comment text, the user and timestamp for creation and the user and timestamp of the last modification. Comments are added, modified or deleted individually, but are retrieved as one group. Comments usage is optional in a task.
The addedTime element indicates when the comment is added.
The addedBy element indicates who added the comment. It could be a user, not a group or a list of users or groups.
The lastModifiedTime element indicates when the comment was last modified.
The lastModifiedBy element indicates who last modified the comment.
Comment Data Type
The following data type is used to return comments.
<xsd:element name="comment" type="tComment" />
<xsd:complexType name="tComment">
<xsd:sequence>
<xsd:element name="id" type="xsd:stringanyURI"
/>
<xsd:element name="addedTime" type="xsd:dateTime" />
<xsd:element name="addedBy" type="htt:tUser" />
<xsd:element name="lastModifiedTime" type="xsd:dateTime" />
<xsd:element name="lastModifiedBy" type="htdhtt:tUser"
/>
<xsd:element name="text" type="xsd:string" />
<xsd:any namespace="##other" processContents="lax"
minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
Comments can be added to a task and retrieved from a task.
The following data types are used to represent instance data of a task or a notification. The data type htt:tTaskAbstract is used to provide the summary data of a task or a notification that is displayed on a task list. The data type htt:tTaskDetails contains the data of a task or a notification, except ad-hoc attachments, comments and presentation description. The data that is not contained in htt:tTaskDetails can be retrieved separately using the task API.
Contained presentation elements are in a single language (the context determines that language, e.g., when a task abstract is returned in response to a simple query, the language from the locale of the requestor is used).
The elements startByExists and completeByExists have a value of “true” if the task has at least one start deadline or at least one completion deadline respectively. The actual times (startByTime and completeByTime) of the individual deadlines can be retrieved using the query operation (see section 7.1.3 “Advanced Query Operation”).
Note that elements that do not apply to notifications are defined as optional.
TaskAbstract Data Type
<xsd:element name="taskAbstract" type="tTaskAbstract" />
<xsd:complexType name="tTaskAbstract">
<xsd:sequence>
<xsd:element name="id"
type="xsd:stringanyURI"
/>
<xsd:element name="taskType"
type="xsd:string" />
<xsd:element name="name"
type="xsd:QName" />
<xsd:element name="status"
type="tStatus" />
<xsd:element name="priority"
type="tPriority" minOccurs="0" />
<xsd:element name="createdTime"
type="xsd:dateTime" />
<xsd:element name="activationTime"
type="xsd:dateTime" minOccurs="0" />
<xsd:element name="expirationTime"
type="xsd:dateTime" minOccurs="0" />
<xsd:element name="isSkipable"
type="xsd:boolean" minOccurs="0" />
<xsd:element name="hasPotentialOwners"
type="xsd:boolean" minOccurs="0" />
<xsd:element name="startByTimeExists"
type="xsd:boolean" minOccurs="0" />
<xsd:element name="completeByTimeExists"
type="xsd:boolean" minOccurs="0" />
<xsd:element name="presentationName"
type="tPresentationName" minOccurs="0" />
<xsd:element name="presentationSubject"
type="tPresentationSubject" minOccurs="0" />
<xsd:element name="renderingMethodExists"
type="xsd:boolean" />
<xsd:element name="hasOutput"
type="xsd:boolean" minOccurs="0" />
<xsd:element name="hasFault"
type="xsd:boolean" minOccurs="0" />
<xsd:element name="hasAttachments"
type="xsd:boolean" minOccurs="0" />
<xsd:element name="hasComments"
type="xsd:boolean" minOccurs="0" />
<xsd:element name="escalated"
type="xsd:boolean" minOccurs="0" />
<xsd:element name="outcome"
type="xsd:string" minOccurs="0"/>
<xsd:element name="parentTaskId"
type="xsd:stringanyURI"
minOccurs="0"/>
<xsd:element name="hasSubTasks"
type="xsd:boolean" minOccurs="0"/>
<xsd:any namespace="##other" processContents="lax"
minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
TaskDetails Data Type
<xsd:element name="taskDetails" type="tTaskDetails"/>
<xsd:complexType name="tTaskDetails">
<xsd:sequence>
<xsd:element name="id"
type="xsd:stringanyURI"/>
<xsd:element name="taskType"
type="xsd:string"/>
<xsd:element name="name"
type="xsd:QName"/>
<xsd:element name="status"
type="tStatus"/>
<xsd:element name="priority"
type="htt:tPriority" minOccurs="0"/>
<xsd:element name="taskInitiator"
type="htt:tUser" minOccurs="0"/>
<xsd:element name="taskStakeholders"
type="htt:tOrganizationalEntity" minOccurs="0"/>
<xsd:element name="potentialOwners"
type="htt:tOrganizationalEntity" minOccurs="0"/>
<xsd:element name="businessAdministrators"
type="htt:tOrganizationalEntity" minOccurs="0"/>
<xsd:element name="actualOwner"
type="htt:tUser" minOccurs="0"/>
<xsd:element name="notificationRecipients"
type="htt:tOrganizationalEntity" minOccurs="0"/>
<xsd:element name="createdTime"
type="xsd:dateTime"/>
<xsd:element name="createdBy"
type="xsd:string" minOccurs="0"/>
<xsd:element name="lastModifiedTime"
type="xsd:dateTime"/>
<xsd:element name="lastModifiedBy"
type="xsd:string" minOccurs="0"/>
<xsd:element name="activationTime"
type="xsd:dateTime" minOccurs="0"/>
<xsd:element name="expirationTime"
type="xsd:dateTime" minOccurs="0"/>
<xsd:element name="isSkipable"
type="xsd:boolean" minOccurs="0"/>
<xsd:element name="hasPotentialOwners"
type="xsd:boolean" minOccurs="0"/>
<xsd:element name="startByTimeExists"
type="xsd:boolean" minOccurs="0"/>
<xsd:element name="completeByTimeExists"
type="xsd:boolean" minOccurs="0"/>
<xsd:element name="presentationName"
type="tPresentationName" minOccurs="0"/>
<xsd:element name="presentationSubject"
type="tPresentationSubject" minOccurs="0"/>
<xsd:element name="renderingMethodExists"
type="xsd:boolean"/>
<xsd:element name="hasOutput"
type="xsd:boolean" minOccurs="0"/>
<xsd:element name="hasFault"
type="xsd:boolean" minOccurs="0"/>
<xsd:element name="hasAttachments"
type="xsd:boolean" minOccurs="0"/>
<xsd:element name="hasComments"
type="xsd:boolean" minOccurs="0"/>
<xsd:element name="escalated"
type="xsd:boolean" minOccurs="0"/>
<xsd:element name="searchBy"
type="xsd:string" minOccurs="0"/>
<xsd:element name="outcome"
type="xsd:string" minOccurs="0"/>
<xsd:element name="parentTaskId"
type="xsd:stringanyURI"
minOccurs="0"/>
<xsd:element name="hasSubTasks"
type="xsd:boolean" minOccurs="0”/>
<xsd:any namespace="##other" processContents="lax"
minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
Common Data Types
<xsd:simpleType name="tPresentationName">
<xsd:annotation>
<xsd:documentation>length-restricted string</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="64" />
<xsd:whiteSpace value="preserve" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="tPresentationSubject">
<xsd:annotation>
<xsd:documentation>length-restricted string</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="254" />
<xsd:whiteSpace value="preserve" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="tStatus">
<xsd:restriction base="xsd:string" />
</xsd:simpleType>
<xsd:simpleType name="tPredefinedStatus">
<xsd:annotation>
<xsd:documentation>for documentation only</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="CREATED" />
<xsd:enumeration value="READY" />
<xsd:enumeration value="RESERVED" />
<xsd:enumeration value="IN_PROGRESS" />
<xsd:enumeration value="SUSPENDED" />
<xsd:enumeration value="COMPLETED" />
<xsd:enumeration value="FAILED" />
<xsd:enumeration value="ERROR" />
<xsd:enumeration value="EXITED" />
<xsd:enumeration value="OBSOLETE" />
</xsd:restriction>
</xsd:simpleType>
To support sub tasks the task instance data gets enhanced by the following (optional) parameters:
· sub tasks à A list of task identifiers for each already-created subtask of the task, including both non-terminated and terminated instances
à A list of the names of the sub tasks available for creation in the definition of the task, based on the composition type, instantiation pattern, and already created tasks
· parent task à The identifier of the superior composite task of this task if it is a sub task
The <task> element is used to specify human tasks. This section introduces the syntax for the element, and individual properties are explained in subsequent sections.
Definition of human tasks:
<htd:task name="NCName" actualOwnerRequired="yes|no"?>
<htd:interface portType="QName" operation="NCName"
responsePortType="QName"? responseOperation="NCName"? />
<htd:priority expressionLanguage="anyURI"? >?
integer-expression
</htd:priority>
<htd:peopleAssignments>?
...
</htd:peopleAssignments>
<htd:completionBehavior>?
...
</htd:completionBehavior>
<htd:delegation
potentialDelegatees="anybody|nobody|potentialOwners|other" />?
<htd:from>?
...
</htd:from>
</htd:delegation>
<htd:presentationElements>?
...
</htd:presentationElements>
<htd:possibleOutcomes>?
...
</htd:possibleOutcomes>
<htd:outcome part="NCName" queryLanguage="anyURI">?
queryContent
</htd:outcome>
<htd:searchBy expressionLanguage="anyURI"? >?
expression
</htd:searchBy>
<htd:renderings>?
<htd:rendering type="QName">+
...
</htd:rendering>
</htd:renderings>
<htd:deadlines>?
<htd:startDeadline name="NCName">*
...
</htd:startDeadline>
<htd:completionDeadline name="NCName">*
...
</htd:completionDeadline>
</htd:deadlines>
<htd:composition>?
...
</htd:composition>
</htd:task>
The following attributes and elements are defined for tasks:
· name: This attribute is used to specify the name of the task. The name combined with the target namespace MUST uniquely identify a task element enclosed in the task definition. This attribute is mandatory. It is not used for task rendering.
· actualOwnerRequired: This optional attribute specifies if an actual owner is required for the task. Setting the value to "no" is used for composite tasks where subtasks should be activated automatically without user interaction. For routing tasks his attribute MUST be set to "no". Tasks that have been defined to not have subtasks MUST have exactly one actual owner after they have been claimed. For these tasks the value of the attribute value MUST be "yes". The default value for the attribute is "yes".
· interface: This element is used to specify the operation used to invoke the task. The operation is specified using WSDL, that is, a WSDL port type and WSDL operation are defined. The element and its portType and operation attributes MUST be present for normal tasks. The schema only marks it optional so that Lean Tasks can make it prohibited. The interface is specified in one of the following forms:
§ The WSDL operation is a one-way operation and the task asynchronously returns output data. In this case, a WS-HumanTask Definition MUST specify a callback one-way operation, using the responsePortType and responseOperation attributes. This callback operation is invoked when the task has finished. The Web service endpoint address of the callback operation is provided at runtime when the task’s one-way operation is invoked (for details, see section 10 ”Providing Callback Information for Human Tasks”).
§ The WSDL operation is a request-response operation. In this case, the responsePortType and responseOperation attributes MUST NOT be specified.
· priority: This element is used to specify the priority of the task. It is an optional element which value is an integer expression. If present, the WS-HumanTask Definition MUST specify a value between 0 and 10, where 0 is the highest priority and 10 is the lowest. If not present, the priority of the task is considered as 5. The result of the expression evaluation is of type htt:tPriority. The expressionLanguage attribute specifies the language used in the expression. The attribute is optional. If not specified, the default language as inherited from the closest enclosing element that specifies the attribute is used.
· peopleAssignments: This element is used to specify people assigned to different generic human roles, i.e. potential owners, and business administrator. The element is optional. See section 3.5 for more details on people assignments.
· completionBehavior: This element is used to specify completion conditions of the task. It is optional. See section 4.8 for more details on completion behavior.
· delegation: This element is used to specify constraints concerning delegation of the task. Attribute potentialDelegatees defines to whom the task can be delegated. One of the following values MUST be specified:
§ anybody: It is allowed to delegate the task to anybody
§ potentialOwners: It is allowed to delegate the task to potential owners previously selected
§ other: It is allowed to delegate the task to other people, e.g. authorized owners. The element <from> is used to determine the people to whom the task can be delegated.
§ nobody: It is not allowed to delegate the task.
The delegation element is optional. If this element is not present the task is allowed to be delegated to anybody.
· presentationElements: This element is used to specify different information used to display the task in a task list, such as name, subject and description. See section 4.3 for more details on presentation elements. The element is optional.
· outcome: This optional element identifies the field (of an xsd simple type) in the output message which reflects the business result of the task. A conversion takes place to yield an outcome of type xsd:string. The optional attribute queryLanguage specifies the language used for selection. If not specified, the default language as inherited from the closest enclosing element that specifies the attribute is used.
· searchBy: This optional element is used to search for task instances based on a custom search criterion. The result of the expression evaluation is of type xsd:string. The expressionLanguage attribute specifies the language used in the expression. The attribute is optional. If not specified, the default language as inherited from the closest enclosing element that specifies the attribute is used.
· rendering: This element is used to specify the rendering method. It is optional. If not present, task rendering is implementation dependent. See section 4.4 for more details on rendering tasks.
· deadlines: This element specifies different deadlines. It is optional. See section 4.9 for more details on timeouts and escalations.
· composition: This element is used to specify subtasks of a composite task. It is optional. See section 4.6 for more details on composite tasks.
Information about human tasks or notifications needs to be made available in a human-readable way to allow users dealing with their tasks and notifications via a user interface, which could be based on various technologies, such as Web browsers, Java clients, Flex-based clients or .NET clients. For example, a user queries for her tasks, getting a list of tasks she could work on, displaying a short description of each task. Upon selection of one of the tasks, more complete information about the task is displayed by the user interface.
Alternatively, a task or notification could be sent directly to a user’s inbox, in which case the same information would be used to provide a human readable rendering there.
The same human readable information could also be used in reports on all the human tasks executed by a particular human task management system.
Human readable information can be specified in multiple languages.
Syntax:
<htd:presentationElements>
<htd:name xml:lang="xsd:language"? >*
Text
</htd:name>
<!-- For the subject and description only,
replacement variables can be used. -->
<htd:presentationParameters expressionLanguage="anyURI"? >?
<htd:presentationParameter name="NCName" type="QName">+
expression
</htd:presentationParameter>
</htd:presentationParameters>
<htd:subject xml:lang="xsd:language"? >*
Text
</htd:subject>
<htd:description xml:lang="xsd:language"?
contentType="mimeTypeString"? >*
<xsd:any minOccurs="0" maxOccurs="unbounded" />
</htd:description>
</htd:presentationElements>
Properties
The following attributes and elements are defined for the htd:presentationElements element.
Example:
<htd:presentationElements>
<htd:name xml:lang="en-US">Approve Claim</htd:name>
<htd:name xml:lang="de-DE">
Genehmigung der Schadensforderung
</htd:name>
<htd:presentationParameters>
<htd:presentationParameter name="firstname" type="xsd:string">
htd:getInput("ClaimApprovalRequest")/cust/firstname
</htd:presentationParameter>
<htd:presentationParameter name="lastname" type="xsd:string">
htd:getInput("ClaimApprovalRequest")/cust/lastname
</htd:presentationParameter>
<htd:presentationParameter name="euroAmount" type="xsd:double">
htd:getInput("ClaimApprovalRequest")/amount
</htd:presentationParameter>
</htd:presentationParameters>
<htd:subject xml:lang="en-US">
Approve the insurance claim for €{$euroAmount} on behalf of
{$firstname} {$lastname}
</htd:subject>
<htd:subject xml:lang="de-DE">
Genehmigung der Schadensforderung über €{$euroAmount} für
{$firstname} {$lastname}
</htd:subject>
<htd:description xml:lang="en-US" contentType="text/plain">
Approve this claim following corporate guideline #4711.0815/7 ...
</htd:description>
<htd:description xml:lang="en-US" contentType="text/html">
<p>
Approve this claim following corporate guideline
<b>#4711.0815/7</b>
...
</p>
</htd:description>
<htd:description xml:lang="de-DE" contentType="text/plain">
Genehmigen Sie diese Schadensforderung entsprechend Richtlinie Nr.
4711.0815/7 ...
</htd:description>
<htd:description xml:lang="de-DE" contentType="text/html">
<p>
Genehmigen Sie diese Schadensforderung entsprechend Richtlinie
<b>Nr. 4711.0815/7</b>
...
</p>
</htd:description>
</htd:presentationElements>
The <possibleOutcomes> element provides a way for a task to define which values are usable for the outcome value of a task. Having a separate definition allows a tool for building tasks to provide support that understands exactly which outcomes are possible for a particular task.
<htd:possibleOutcomes>
<htd:possibleOutcome name="NCName">+
<htd:outcomeName xml:lang="xsd:language"?>+
Language specific display
</htd:outcomeName>
</htd:possibleOutcome>
</htd:possibleOutcomes>
Each <possibleOutcome> element represents one possible outcome. For the typical example of an expense report approval, the two outcomes might be ‘Approve’ and ‘Reject’. In addition to the other data being collected by the rendering in the WS-HumanTask Client, this represents the most important information about how to proceed in a process that contains multiple tasks. Therefore, a rendering and client using HTML might choose to show this as a dropdown list, list box with single selection, a set of submit buttons, or a radio button group.
For each <possibleOutcome>, it is possible to have an <outcomeName> element to specify a per-language display name. It uses xml:lang, a standard XML attribute, to define the language of the enclosed information. This attribute uses tags according to RFC 1766 (see [RFC1766]). There could be zero or more <outcomeName> elements. A <possibleOutcome> MUST NOT specify multiple <outcomeName> elements having the same value for attribute xml:lang.
Human tasks and notifications need to be rendered on user interfaces like forms clients, portlets, e-mail clients, etc. The rendering element provides an extensible mechanism for specifying UI renderings for human tasks and notifications (task-UI). The element is optional. One or more rendering methods can be provided in a task definition or a notification definition. A task or notification can be deployed on any WS-HumanTask Processor, irrespective of the fact whether the implementation supports specified rendering methods or not. The rendering method is identified using a QName.
Unlike for presentation elements, language considerations are opaque for the rendering element because the rendering applications typically provide multi-language support. Where this is not the case, providers of certain rendering types can decide to extend the rendering method in order to provide language information for a given rendering.
The content of the rendering element is not defined by this specification. For example, when used in the rendering element, XPath extension functions as defined in section 7.2 MAY be evaluated by a WS-HumanTask Processor.
Syntax:
<htd:renderings>
<htd:rendering type="QName">+
<xsd:any minOccurs="1" maxOccurs="1" />
</htd:rendering>
</htd:renderings>
A composite task is defined as a <htd:task> element with the <htd:composition> element enclosed in it. The following are attributes and elements defined for the composition element.
· type: This optional attribute specifies the order in which enclosed sub-tasks are executed. If the value is set to “sequential” the sub-tasks MUST be executed in lexical order. Otherwise they MUST be executed in parallel. The default value for this attribute is “sequential”.
· instantiationPattern: This optional attribute specifies the way how sub-tasks are instantiated. If the value is set to “manual” the task client triggers instantiation of enclosed sub-tasks. Otherwise, they are automatically instantiated at the time the composite task itself turns into status “inProgress”. The default value for this attribute is “manual”.
· subtask: This element specifies a task that will be executed as part of the composite task execution. The composition element MUST enclose at least one subtask element. The subtask element has the following attributes and elements. The name attribute specifies the name of the sub-task. The name MUST be unique among the names of all sub-tasks within the composition element. The htd:task element is used to define the task inline. The htd:localTask element is used to reference a task that will be executed as a sub-task. The htd:localTask element MAY define values for standard overriding attributes: priority and people assignments. The toParts element is used to assign values to input message of the sub-task. The enclosed XPath expression MAY refer to the input message of the composite task or the output message of other sub-task enclosed in the same composition element. The part attribute refers to a part of the WSDL message type of the message used in the XPath. The expressionLanguage attribute specifies the expression language used in the enclosing elements. The default value for this attribute is urn:ws-ht:sublang:xpath1.0 which represents the usage of XPath 1.0 within human interactions definition. A WS-HumanTask Definition that uses expressions MAY override the default expression language for individual expressions.
When composition is defined on a task, the composition MUST be applied for each of the potential owners defined in the task's people assignment.
Syntax:
<htd:task>
...
<htd:composition type="sequential|parallel"
instantiationPattern="manual|automatic">
<htd:subtask name="NCName">+
( <htd:task>
...
</htd:task>
| <htd:localTask reference="QName">
standard-overriding-elements
...
</htd:localTask>
)
<htd:toParts>?
<htd:toPart part="NCName" expressionLanguage="anyURI">+
XPath expression
</htd:toPart>
</htd:toParts>
</htd:subtask>
</htd:composition>
...
</htd:task>
Standard-overriding-elements is used in the syntax above as a shortened form of the following list of elements:
<htd:priority expressionLanguage="anyURI"? >
integer-expression
</htd:priority>
<htd:peopleAssignments>?
<htd:genericHumanRole>
<htd:from>...</htd:from>
</htd:genericHumanRole>
</htd:peopleAssignments>
The <peopleAssignments> element is used to assign people to a task. For each generic human role, a people assignment element can be specified. A WS-HumanTask Definition MUST specify a people assignment for potential owners of a human task. An empty <potentialOwners> element is used to specify that no potential owner is assigned by the human task's definition but another means is used e.g. nomination. Specifying people assignments for task stakeholders, task initiators, excluded owners and business administrators is optional. Human tasks never specify recipients. A WS-HumanTask Definition MUST NOT specify people assignments for actual owners.
Syntax:
<htd:peopleAssignments>
<htd:potentialOwners>
...
</htd:potentialOwners>
<htd:excludedOwners>?
...
</htd:excludedOwners>
<htd:taskInitiator>?
...
</htd:taskInitiator>
<htd:taskStakeholders>?
...
</htd:taskStakeholders>
<htd:businessAdministrators>?
...
</htd:businessAdministrators>
</htd:peopleAssignments>
People assignments can result in a set of values or an empty set. In case people assignment results in an empty set then the task potentially requires administrative attention. This is out of scope of the specification, except for people assignments for potential owners (see section 4.10.1 “Normal processing of a Human Task” for more details).
Example:
<htd:peopleAssignments>
<htd:potentialOwners>
<htd:from logicalPeopleGroup="regionalClerks">
<htd:argument name="region">
htd:getInput("ClaimApprovalRequest")/region
</htd:argument>
</htd:from>
</htd:potentialOwners>
<htd:businessAdministrators>
<htd:from logicalPeopleGroup="regionalManager">
<htd:argument name="region">
htd:getInput("ClaimApprovalRequest")/region
</htd:argument>
</htd:from>
</htd:businessAdministrators>
</htd:peopleAssignments>
Tasks can be assigned to people in sequence and parallel. Elements htd:sequence and htd:parallel elements in htd:potentialOwners are used to represent such assignments.
A task can be assigned to people in parallel using the htd:parallel element. . The htd:parallel element is defined as follows:
· The htd:from element defines the parallel potential owners. This can evaluate to multiple users/groups.
· The attribute ‘type’ in htd:parallel identifies how parallel assignments are created for the multiple users/groups returned from htd:from. If type is ‘all’ then an assignment MUST be created for each user returned by htd:from. If type is ‘single’ then an assignment MUST be created for each htd:from clause (this assignment could have with n potential owners). The default value of type is ‘all’.
· The htd:parallel and htd:sequence elements define nested routing patterns within the parallel routing pattern
· The htd:completionBehavior defines when the routing pattern completes. The completion criteria also define how the result is constructed for the parent task when a parallel routing pattern is complete.
Each parallel assignment MUST result in a separate sub task. Sub tasks created for each parallel assignment MUST identify the parent task using the htd:parentTaskId.
Syntax:
<htd:potentialOwners>
<htd:parallel type="all|single"?>
<htd:completionBehavior>
<htd:from>...</htd:from>*
pattern*
</htd:parallel>
</htd:potentialOwners>
Example:
<htd:peopleAssignments>
<htd:potentialOwners>
<htd:parallel type="all">
<htd:from>
htd:getInput("ClaimApprovalRequest")/claimAgent
</htd:from>
</htd:parallel>
</htd:potentialOwners>
</htd:peopleAssignments>
A task can be assigned to people in sequence using the htd:sequence element. The htd:sequence is defined as follows:
Sequential routing patterns MUST use a separate sub task for each step in a sequential pattern. Sub tasks created for each sequential assignment MUST identify the parent task using the htd:parentTaskId.
Syntax:
<htd:potentialOwners>
<htd:sequence type="all|single"?>
<htd:completionBehavior>?
<htd:from>...</htd:from>*
pattern*
</htd:sequence>
</htd:potentialOwners>
Example:
<htd:peopleAssignments>
<htd:potentialOwners>
<htd:sequence type="all">
<htd:from logicalPeopleGroup="regionalClerks">
<htd:argument name="region">
htd:getInput("ClaimApprovalRequest")/region
</htd:argument>
</htd:from>
<htd:from
logicalPeopleGroup="regionalManager">
<htd:argument name="region">
htd:getInput("ClaimApprovalRequest")/region
</htd:argument>
</htd:from>
</htd:sequence>
</htd:potentialOwners>
</htd:peopleAssignments/>
The completion behavior of a task, routing pattern or composite task can be influenced by a specification of completion conditions and the result construction for tasks, routing patterns, or composite tasks. For this purpose, the task, routing pattern or composite task contains a htd:completionBehavior element.
Multiple completion conditions can be specified as nested htd:completion elements. They are evaluated in lexical order. When one of the specified completion conditions is met then the task is considered to be completed; in case of routing patterns and composite tasks all remaining running sub tasks MUST be skipped (i.e., set to the "Obsolete" state) and the associated result construction MUST be applied.
In case of composite tasks and routing patterns the following applies: At most one default completion MUST be specified with no completion condition in order to specify the result construction after regular completion of all sub tasks. If no result construction is applied, e.g. because no “default” result construction is specified and none of the specified completion conditions is met, then the parent task’s output is not created, i.e., it remains uninitialized. Moreover, note that a completion condition can be specified without referencing sub task output data, which allows the parent task to be considered completed even without creating any sub tasks. When output data from sub tasks is referenced by completion conditions or result constructions, only output data of already finished sub tasks MUST be considered.
If none of the specified completion conditions is met then the state of the task or the parent task remains unchanged.
<htd:completionBehavior completionAction=”manual|automatic”?>?
<htd:completion name="NCName">*
<htd:condition ... >
...
</htd:condition>
<htd:result>?
...
<htd:result>
</htd:completion>
<htd:defaultCompletion>?
<htd:result>
...
<htd:result>
</htd:defaultCompletion>
</htd:completionBehavior>
The completionBehavior element has optional attribute completionAction. This optional attribute specifies how the task, routing pattern, or composite task is completed. If the value is set to "manual" the task or parent task MUST be completed explicitly by the actual owner as soon as the completion conditions evaluate to true. If the value is set to "automatic" the task or parent task MUST be set to complete as soon as the completion conditions evaluate to true. For routing patterns, the completionAction attribute MUST have value "automatic". The default value for this attribute is “automatic”.
If completionBehavior is not specified, the default behavior is that of a completionBehavior with completionCondition is "true" and a completionAction of "manual" for simple and composite tasks, and "automatic" for routing patterns.
A completion condition defines when a task or a set of sub tasks associated with the parent task is considered completed. It is specified Boolean expression which can refer to input data of the task, the parent task or its sub tasks, output data produced by already finished sub tasks, or other data obtained from WS-HumanTask API calls (e.g. the number of sub tasks), or functions that test that some designated amount of time has passed.
The completion condition MUST be defined using an htd:condition element.
<htd:condition expressionLanguage="anyURI"?>
boolean expression
</htd:condition>
Within the Boolean expression of a completion condition, aggregation functions can be used to evaluate output data produced by the already finished sub tasks of the parent task.
If an error (e.g. division by zero) occurs during the condition evaluation then the condition MUST be considered to have evaluated to “false”.
The time functions that are available are defined as follows:
The return value is true after the specified absolute time has passed, otherwise false.
Completion conditions of a task MUST use only time functions.
The time functions in the completion condition are be evaluated with respect to the beginning of execution of the task or parent task on which the completion is defined. To achieve this, the evaluation of the htd:waitFor and htd:waitUntil calls within the condition are treated differently from the rest of the expression. When the containing task or parent task is created, the actual parameter expression for any htd:waitFor and htd:waitUntil calls MUST be evaluated and the completion condition should be rewritten to replace these calls with only htd:waitUntil calls with constant parameters. The durations calculated for any htd:waitFor calls MUST be converted into absolute times and rewritten as htd:waitUntil calls. The result of these replacements is called the preprocessed completion condition.
For the parent task, the preprocessed completion condition MUST be evaluated at the following times:
For tasks, the preprocessed completion condition MUST be evaluated at the following times:
Example:
The first completion condition may be met even without starting sub tasks. When both parts of the second completion condition are met, that is, 7 days have expired and more than half of the finished sub tasks have an outcome of “Rejected”, then the parallel routing pattern is considered completed.
<htd:parallel>
...
<htd:completionBehavior>
<htd:completion>
<htd:condition>
htd:getInput("ClaimApprovalRequest")/amount < 1000
</htd:condition>
<htd:result> ... </htd:result>
</htd:completion>
<htd:completion>
<htd:condition>
( htd:getCountOfSubtasksWithOutcome("Rejected") /
htd:getCountOfSubtasks() > 0.5 )
and htd:waitFor("P7D")
</htd:condition>
<htd:result> ... </htd:result>
</htd:completion>
</htd:completionBehavior>
...
</htd:parallel>
When multiple sub tasks are created in order let several people work on their own sub task in parallel then the outputs of these sub tasks sometimes need to be combined for the creation of the parent task’s output.
If all sub tasks have the same interface definition (as in routing patterns) then the result construction can be defined in a declarative way using aggregation functions. Alternatively, the result may be created using explicit assignments.
The result construction MUST be defined as htd:result element, containing one or more htd:aggregate or htd:copy elements, executed in the order in which they appear in the task definition.
<htd:result>
(
<htd:aggregate ... />
|
<htd:copy> ... </htd:copy>
)+
</htd:result>
An htd:aggregate element describes the result aggregation for a leaf element of the parent task’s output document. In most cases, this approach is only meaningful for routing patterns with identical sub task interfaces. Note that the construction of (complex-typed) non-leaf elements is out of scope of the declarative result aggregation.
<htd:aggregate part="NCName"?
location="query"?
condition="bool-expr"?
function="function-call"/>+
The htd:aggregate element is defined as follows:
If a declarative result aggregation is applied, it is still possible that no values can be provided for the aggregation of a particular output field, for example, if no subtask has set a value to an optional field (by omission or by an explicit nil value).
In this case, the following rules determine how the aggregated output field of the parent task is set.
Example:
Consider the following output document used in a parallel routing pattern:
<element name="Award" type="tns:tAward" />
<complexType name="tAward">
<sequence>
<element name="AwardRecommended" type="xsd:string" />
<element name="AwardDetails" type="tns:tAwardDetails" />
</sequence>
</complexType>
<complexType name="tAwardDetails">
<sequence>
<element name="Amount" type="xsd:integer" />
<element name="Appraisal" type="xsd:string" />
</sequence>
</complexType>
A possible result aggregation could then look like this. The first aggregation determines the most frequent occurrence of an award recommendation. The second aggregation calculates the average award amount for sub tasks with an award recommendation of ‘yes’. The third aggregation creates a comma-separated concatenation of all sub task’s appraisals.
<htd:parallel ...>
...
<htd:completionBehavior>
<htd:completion>
<htd:condition> ... </htd:condition>
<htd:result>
<htd:aggregate location="/Award/AwardRecommended"
function="htd:mostFrequentOccurence()"/>
<htd:aggregate location="/Award/AwardDetails/Amount"
condition="/Award/AwardRecommended='yes'"
function="htd:avg()"/>
<htd:aggregate location="/Award/AwardDetails/Appraisal"
function="htd:concatWithDelimiter(',')"/>
</htd:result>
</htd:completion>
</htd:completionBehavior>
</htd:parallel>
An htd:copy element describes the explicit assignment to an element of the parent task’s output document.
<htd:copy>+
<htd:from expressionLanguage="anyURI"?>
expression
</htd:from>
<htd:to queryLanguage="anyURI"?>
query
</htd:to>
</htd:copy>
The htd:copy element is defined as follows:
Consider the following output document used in a parallel routing pattern:
<element name="Order" type="tns:tOrder" />
<complexType name="tOrder">
<sequence>
<element name="Item" type="tns:tItem" maxOccurs="unbounded"/>
<element name="TotalPrice" type="xsd:integer" />
</sequence>
</complexType>
<complexType name="tItem">
<sequence>
...
</sequence>
</complexType>
A possible result aggregation could then look like this. All sub task order item lists are concatenated to one parent task order item list. The total price is calculated using an aggregation function.
<htd:parallel>
...
<htd:completionBehavior>
<htd:completion>
<htd:condition> ... </htd:condition>
<htd:result>
<htd:copy>
<htd:from>
htd:getSubtaskOutputs("orderResponse", "/Order/Item")
</htd:from>
<htd:to>/Order/Item</htd:to>
</htd:copy>
<htd:copy>
<htd:from>
htd:sum(htd:getSubtaskOutputs("orderResponse",
"/Order/TotalPrice"))
</htd:from>
<htd:to>/Order/TotalPrice</htd:to>
</htd:copy>
</htd:result>
</htd:completion>
</htd:completionBehavior>
</htd:parallel>
Example 2:
Output data from heterogeneous sub tasks is assigned into the parent task’s output. The complete complex-typed sub task output documents are copied into child elements of the parent task output document.
<htd:task name="bookTrip">
... produces itinerary ...
<htd:composition type="parallel" ...>
<htd:subtask name="bookHotel">
<htd:task>
... produces hotelReservation ...
</htd:task>
</htd:subtask>
<htd:subtask name="bookFlight">
<htd:task>
... produces flightReservation ...
</htd:task>
</htd:subtask>
</htd:composition>
...
<htd:completionBehavior>
<htd:defaultCompletion>
<htd:result>
<htd:copy>
<htd:from>
htd:getSubtaskOutput("bookHotel",
"bookHotelResponse",
"/hotelReservation")
</htd:from>
<htd:to>/itinerary/hotelReservation</htd:to>
</htd:copy>
<htd:copy>
<htd:from>
htd:getSubtaskOutput("bookFlight",
"bookFlightResponse",
"/flightReservation")
</htd:from>
<htd:to>/itinerary/flightReservation</htd:to>
</htd:copy>
</htd:result>
</htd:defaultCompletion>
</htd:completionBehavior>
</htd:task>
Timeouts and escalations allow the specification of a date or time before which the task or sub task has to reach a specific state. If the timeout occurs a set of actions is performed as the response. The state of the task is not changed. Several deadlines are specified which differ in the point when the timer clock starts and the state which has to be reached with the given duration or by the given date. They are:
· Start deadline: Specifies the time until the task has to start, i.e. it has to reach state InProgress. It is defined as either the period of time or the point in time until the task has to reach state InProgress. Since expressions are allowed, durations and deadlines can be calculated at runtime, which for example enables custom calendar integration. The time starts to be measured from the time at which the task enters the state Created. If the task does not reach state InProgress by the deadline an escalation action or a set of escalation actions is performed. Once the task is started, the timer becomes obsolete.
· Completion deadline: Specifies the due time of the task. It is defined as either the period of time until the task gets due or the point in time when the task gets due. The time starts to be measured from the time at which the task enters the state Created. If the task does not reach one of the final states (Completed, Failed, Error, Exited, Obsolete) by the deadline an escalation action or a set of escalation actions is performed.
The element <deadlines> is used to include the definition of all deadlines within the task definition. It is optional. If present then the WS-HumanTask Definition MUST specify at least one deadline. Deadlines defined in ad-hoc sub tasks created at runtime MUST NOT contradict the deadlines of their parent task. The value of the name attribute MUST be unique for all deadline specifications within a task definition.
Syntax:
<htd:deadlines>
<htd:startDeadline name="NCName">*
<htd:documentation xml:lang="xsd:language"? >*
text
</htd:documentation>
( <htd:for expressionLanguage="anyURI"? >
duration-expression
</htd:for>
| <htd:until expressionLanguage="anyURI"? >
deadline-expression
</htd:until>
)
<htd:escalation name="NCName">*
...
</htd:escalation>
</htd:startDeadline>
<htd:completionDeadline name="NCName">*
...
</htd:completionDeadline>
</htd:deadlines>
The language used in expressions is specified using the expressionLanguage attribute. This attribute is optional. If not specified, the default language as inherited from the closest enclosing element that specifies the attribute is used.
For all deadlines if a status is not reached within a certain time then an escalation action, specified using element <escalation>, can be triggered. The <escalation> element is defined in the section below. When the task reaches a final state (Completed, Failed, Error, Exited, Obsolete) all deadlines are deleted.
Escalations are triggered if
Escalations use notifications to inform people about the status of the task. Optionally, a task might be reassigned to some other person or group as part of the escalation. Notifications are explained in more detail in section 6 “Notifications”. For an escalation, a WS-HumanTask Definition MUST specify exactly one escalation action.
When defining escalations, a notification can be either referred to, or defined inline.
Notifications used in escalations can use the same type of input data as the surrounding task or sub task, or different type of data. If the same type of data is used then the input message of the task or sub task is passed to the notification implicitly. If not, then the <toPart> elements are used to assign appropriate data to the notification, i.e. to explicitly create a multi-part WSDL message from the data. The part attribute refers to a part of the WSDL message. The expressionLanguage attribute specifies the language used in the expression. The attribute is optional. If not specified, the default language as inherited from the closest enclosing element that specifies the attribute is used.
A WS-HumanTask Definition MUST specify a <toPart> element for every part in the WSDL message definition because parts not explicitly represented by <toPart> elements would result in uninitialized parts in the target WSDL message. The order in which parts are specified is not relevant. If multiple <toPart> elements are present, a WS-HumanTask Processor MUST execute them in an “all or nothing” manner. If any of the <toPart>s fails, the escalation action will not be performed and the execution of the task is not affected.
Reassignments are used to replace the potential owners of a task when an escalation is triggered. The <reassignment> element is used to specify reassignment. If present then a WS-HumanTask Definition MUST specify potential owners. A reassignment triggered by a sub task escalation MUST apply to the sub task only. A reassignment MAY comprise of a complex people assignment using Routing Patterns.
In the case where several reassignment escalations are triggered, the first reassignment (lexical order) MUST be considered for execution by the WS-HumanTask Processor. The task is set to state Ready after reassignment. Reassignments and notifications are performed in the lexical order.
A task MAY have multiple start deadlines and completion deadlines associated with it. Each such deadline encompasses escalation actions each of which MAY send notifications to certain people. The corresponding set of people MAY overlap.
As an example, the figure depicts a task that has been created at time T1. Its two start deadlines would be missed at time T2 and T3, respectively. The associated escalations whose conditions evaluate to “true” are triggered. Both, the escalations Esc-1 to Esc-n as well as escalations Esc-a to Esc-z can involve an overlapping set of people. The completion deadline would be missed at time T4.
Syntax:
<htd:deadlines>
<htd:startDeadline name="NCName">*
...
<htd:escalation name="NCName">*
<htd:condition expressionLanguage="anyURI"?>?
boolean-expression
</htd:condition>
<htd:toParts>?
<htd:toPart part="NCName"
expressionLanguage="anyURI"?>+
expression
</htd:toPart>
</htd:toParts>
<!-- notification specified by reference -->
<htd:localNotification reference="QName">?
<htd:priority expressionLanguage="anyURI"?>?
integer-expression
</htd:priority>
<htd:peopleAssignments>?
<htd:recipients>
...
</htd:recipients>
</htd:peopleAssignments>
</htd:localNotification>
<!-- notification specified inline -->
<htd:notification name="NCName">?
...
</htd:notification>
<htd:reassignment>?
<htd:potentialOwners>
...
</htd:potentialOwners>
</htd:reassignment>
</htd:escalation>
</htd:startDeadline>
<htd:completionDeadline name="NCName">*
...
</htd:completionDeadline>
</htd:deadlines>
Example:
The following example shows the specification of a start deadline with escalations. At runtime, the following picture depicts the result of what is specified in the example:
In case that task has been started before T2 was reached, then the start deadline is deactivated, no escalation occurs.
<htd:startDeadline name="sendNotifications">
<htd:documentation xml:lang="en-US">
If not started within 3 days, - escalation notifications are sent
if the claimed amount is less than 10000 - to the task's potential
owners to remind them or their todo - to the regional manager, if
this approval is of high priority (0,1, or 2) - the task is
reassigned to Alan if the claimed amount is greater than or equal
10000
</htd:documentation>
<htd:for>P3D</htd:for>
<htd:escalation name="reminder">
<htd:condition>
<![CDATA[
htd:getInput("ClaimApprovalRequest")/amount < 10000
]]>
</htd:condition>
<htd:toParts>
<htd:toPart name="firstname">
htd:getInput("ClaimApprovalRequest","ApproveClaim")/firstname
</htd:toPart>
<htd:toPart name="lastname">
htd:getInput("ClaimApprovalRequest","ApproveClaim")/lastname
</htd:toPart>
</htd:toParts>
<htd:localNotification reference="tns:ClaimApprovalReminder">
<htd:documentation xml:lang="en-US">
Reuse the predefined notification "ClaimApprovalReminder".
Overwrite the recipients with the task's potential owners.
</htd:documentation>
<htd:peopleAssignments>
<htd:recipients>
<htd:from>htd:getPotentialOwners("ApproveClaim")</htd:from>
</htd:recipients>
</htd:peopleAssignments>
</htd:localNotification>
</htd:escalation>
<htd:escalation name="highPrio">
<htd:condition>
<![CDATA[
(htd:getInput("ClaimApprovalRequest")/amount < 10000
&& htd:getInput("ClaimApprovalRequest")/prio <= 2)
]]>
</htd:condition>
<!-- task input implicitly passed to the notification -->
<htd:notification name="ClaimApprovalOverdue">
<htd:documentation xml:lang="en-US">
An inline defined notification using the approval data as its
input.
</htd:documentation>
<htd:interface portType="tns:ClaimsHandlingPT"
operation="escalate" />
<htd:peopleAssignments>
<htd:recipients>
<htd:from logicalPeopleGroup="regionalManager">
<htd:argument name="region">
htd:getInput("ClaimApprovalRequest")/region
</htd:argument>
</htd:from>
</htd:recipients>
</htd:peopleAssignments>
<htd:presentationElements>
<htd:name xml:lang="en-US">Claim approval overdue</htd:name>
<htd:name xml:lang="de-DE">
Überfällige Schadensforderungsgenehmigung
</htd:name>
</htd:presentationElements>
</htd:notification>
</htd:escalation>
<htd:escalation name="highAmountReassign">
<htd:condition>
<![CDATA[
htd:getInput("ClaimApprovalRequest")/amount >= 10000
]]>
</htd:condition>
<htd:reassignment>
<htd:documentation>
Reassign task to Alan if amount is greater than or equal
10000.
</htd:documentation>
<htd:potentialOwners>
<htd:from>
<htd:literal>
<htt:organizationalEntity>
<htt:user>Alan</htt:user>
</htt:organizationalEntity>
</htd:literal>
</htd:from>
</htd:potentialOwners>
</htd:reassignment>
</htd:escalation>
</htd:startDeadline>
All timeouts and escalations apply to sub tasks also. If htd:escalation is triggered for a sub task, then any htd:reassignment MUST be applied only to that.
Human tasks can have a number of different states and substates. The state diagram for human tasks below shows the different states and the transitions between them.
Upon creation, a task goes into its initial state Created. Task creation starts with the initialization of its properties in the following order:
Task creation succeeds irrespective of whether the people assignment returns a set of values or an empty set. People queries that cannot be executed successfully are treated as if they were returning an empty set.
If potential owners were not assigned automatically during task creation then they MUST be assigned explicitly using nomination, which is performed by the task’s business administrator. The result of evaluating potential owners removes the excluded owners from results. The task remains in the state Created until it is activated (i.e., an activation timer has been specified) and has potential owners.
When the task has a single potential owner, it transitions into the Reserved state, indicating that it is assigned to a single actual owner. Otherwise (i.e., when it has multiple potential owners or is assigned to a work queue), it transitions into the Ready state, indicating that it can be claimed by one of its potential owners. Once a potential owner claims the task, it transitions into the Reserved state, making that potential owner the actual owner.
Once work is started on a task that is in state Ready or Reserved, it goes into the InProgress state, indicating that it is being worked on – if the transition is from Ready, the user starting the work becomes its actual owner.
On successful completion of the work, the task transitions into the Completed final state. On unsuccessful completion of the work (i.e., with an exception), the task transitions into the Failed final state.
The lifecycle of sub tasks is the same as that of the main task.
For human tasks that have subtasks two different cases exist, with different implications:
The first case has the sub-case where a potential owner has been modeled on the primary task and subtasks have been modeled that are activated either manually or automatically. Another sub-case of the first case is the one where no potential owner has been modeled and thus nomination has to occur. In all cases there is an actual owner eventually and the primary task goes through the state transitions from Created to Ready to Reserved to InProgress, etc.
In the second case where no actual owner is desired the human task (the primary task) directly transitions from state Created to InProgress. Subtasks are always instantiated automatically.
The current actual owner of a human task can release a task to again make it available for all potential owners. A task can be released from active states that have an actual owner (Reserved, InProgress), transitioning it into the Ready state. Business data associated with the task (intermediate result data, ad-hoc attachments and comments) is kept.
A task that is currently InProgress can be stopped by the actual owner, transitioning it into state Reserved. Business data associated with the task as well as its actual owner is kept.
Task’s potential owners, actual owner or business administrator can delegate a task to another user, making that user the actual owner of the task, and also adding her to the list of potential owners in case she is not, yet. A task can be delegated when it is in an active state (Ready, Reserved, InProgress), and transitions the task into the Reserved state. Business data associated with the task is kept.
Similarly, task’s potential owners, actual owner or business administrator can forward an active task to another person or a set of people, replacing himself by those people in the list of potential owners. Potential owners can only forward tasks that are in the Ready state. Forwarding is possible if the task has a set of individually assigned potential owners, not if its potential owners are assigned using one or many groups. If the task is in the Reserved or InProgress state then the task is implicitly released first, that is, the task is transitioned into the Ready state. Business data associated with the task is kept. The user performing the forward is removed from the set of potential owners of the task, and the forwardee is added to the set of potential owners.
Task state transitions may be caused by the invocation of API operations (see section 7 “Programming Interfaces”) or by events (see section 8 “Interoperable Protocol for Advanced Interaction with Human Tasks”).
If a task has sub tasks then some state transitions are propagated to these sub tasks. Conversely, if a task has a parent task then some state transitions are propagated to that parent task.
The following table defines how task state transitions MUST be propagated to sub tasks and to parent tasks.
Task Event |
Effect on Sub Tasks |
Effect on Parent Task |
suspend operation invoked |
suspend (ignored if not applicable, e.g., if the sub task is already suspended or in a final state) – a suspend event is propagated recursively if the sub task is not in a final state |
none |
suspend event received (from a parent task) |
||
resume operation invoked |
resume (ignored if not applicable, e.g., if the sub task is not suspended or in a final state) – a resume event is propagated recursively if the sub task is not in a final state |
none |
resume event received (from a parent task) |
||
complete operation invoked |
exit (ignored if the sub task is in a final state) |
completion may be initiated (see section 4.7 “Completion Behavior”) |
complete event received |
||
fail operation invoked |
exit (ignored if the sub task is in a final state) |
none (if “manual” activation pattern), otherwise fail |
fail event received |
||
non-recoverable error event received |
||
exit event received |
exit (ignored if the sub task is in a final state) |
none |
skip operation invoked (and the task is “skipable”) |
skip |
completion may be initiated (see section 4.7 “Completion Behavior”) |
All other task state transitions MUST NOT affect sub tasks or a parent task.
Task lifecycle state changes and data changes are maintained as a history of task events. Task events contain the following data:
Task Event
For example, if the User1 delegated a task to User2, then the user and startOwner would be User1, endOwner would be User2. The event data would be the <htt:organizationalEntity/> element used in the WSHT delegate operation.
The system generated attribute 'event id' MUST be unique on a per task basis.
Some task events (e.g. setOutput) may have data associated with event and others may not (e.g. claim). The following table lists the event types and the data.
Actions/Operations resulting in task events |
|||
Event Type |
Owner Change |
State Change |
Data Value |
created |
maybe |
yes |
|
claim |
yes |
yes |
|
Start |
maybe |
yes |
|
stop |
|
yes |
|
release |
yes |
yes |
|
suspend |
|
yes |
|
suspendUntil |
|
yes |
<htt:pointOfTime>2020-12-12T12:12:12Z </htt:pointOfTime> or <htt:timePeriod>PT1H</htt:timePeriod> |
resume |
|
yes |
|
complete |
|
yes |
<htt:taskData> <ns:someData xmlns:ns="urn:foo"/> </htt:taskData> |
remove |
|
|
|
fail |
|
yes |
<htt:fail> <htt:identifier>urn:b4p:1</htt:identifier> <htt:faultName>fault1</htt:faultName> <htt:faultData> <someFaultData xmlns="urn:foo"/> </htt:faultData> </htt:fail> |
setPriority |
|
|
<htt:priority>500000</htt:priority> |
addAttachment |
|
|
<htt:addAttachment> <htt:identifier>urn:b4p:1</htt:identifier> <htt:name>myAttachment</htt:name> <htt:accessType>MIME</htt:accessType> <htt:contentType>text/plain</htt:contentType> <htt:attachment/> </htt:addAttachment> |
deleteAttachment |
|
|
<htt:identifier> urn:b4p:1</htt:identifier> |
addComment |
|
|
<htt:text>text for comment</htt:text> |
updateComment |
|
|
<htt:text>new text for comment</htt:text> |
deleteComment |
|
|
<htt:text>deleted comment text</htt:text> |
skip |
|
yes |
|
forward |
maybe |
maybe |
<htt:organizationalEntity> <htt:user>user5</htt:user> <htt:user>user6</htt:user> </htt:organizationalEntity> |
delegate |
yes |
maybe |
<htt:organizationalEntity> <htt:user>user5</htt:user> </htt:organizationalEntity> |
setOutput |
|
|
<htt:setOutput> <htt:identifier>urn:b4p:1</htt:identifier> <htt:part>outputPart1</htt:part> <htt:taskData> <ns:someData xmlns:ns="urn:foo" /> </htt:taskData> </htt:setOutput> |
deleteOutput |
|
|
|
setFault |
|
|
<htt:setFault> <htt:identifier>urn:b4p:1</htt:identifier> <htt:faultName>fault1</htt:faultName> <htt:faultData><someFault xmlns="urn:fault"/></htt:faultData> </htt:setFault> |
deleteFault |
|
|
|
activate |
maybe |
yes |
|
nominate |
maybe |
maybe |
<htt:organizationalEntity> <htt:user>user1</htt:user> <htt:user>user2</htt:user> </htt:organizationalEntity> |
setGenericHumanRole |
|
|
<htt:setGenericHumanRole> <htt:identifier>urn:b4p:1</htt:identifier> <htt:genericHumanRole>businessAdministrators</htt:genericHumanRole> <htt:organizationalEntity> <htt:user>user7</htt:user> <htt:user>user8</htt:user> </htt:organizationalEntity> </htt:setGenericHumanRole> |
expire |
|
yes |
|
escalated |
|
|
|
cancel |
|
|
|
There is a getTaskHistory operation that allows a client to query the system and retrieve a list of task events that represent the history of the task. This operation can:
The option to whether or not to include event data is useful since in some cases the event data content (e.g. setOutput) may be large. In a typical case, an API client should be able to query the system to get a "light weight" response of events (e.g. with out event data) and then when necessary, make an additional API call to get a specific event details with data. The latter can be accomplished by specifying the event id when invoking the getTaskHistory operation.
The XML Schema definition of the filter is the following:
<xsd:complexType name="tTaskHistoryFilter">
<xsd:choice>
<xsd:element name="eventId" type="xsd:integer" />
<!-- Filter to allow narrow down query by status, principal,
event Type. -->
<xsd:sequence>
<xsd:element name="status" type="tStatus" minOccurs="0"
maxOccurs="unbounded" />
<xsd:element name="eventType" type="tTaskEventType" minOccurs="0"
maxOccurs="unbounded" />
<xsd:element name="principal" type="xsd:string" minOccurs="0" />
<xsd:element name="afterEventTime" type="xsd:dateTime"
minOccurs="0" />
<xsd:element name="beforeEventTime" type="xsd:dateTime"
minOccurs="0" />
</xsd:sequence>
</xsd:choice>
</xsd:complexType>
<xsd:simpleType name="tTaskEventType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="create" />
<xsd:enumeration value="claim" />
<xsd:enumeration value="start" />
<xsd:enumeration value="stop" />
<xsd:enumeration value="release" />
<xsd:enumeration value="suspend" />
<xsd:enumeration value="suspendUntil" />
<xsd:enumeration value="resume" />
<xsd:enumeration value="complete" />
<xsd:enumeration value="remove" />
<xsd:enumeration value="fail" />
<xsd:enumeration value="setPriority" />
<xsd:enumeration value="addAttachment" />
<xsd:enumeration value="deleteAttachment" />
<xsd:enumeration value="addComment" />
<xsd:enumeration value="updateComment" />
<xsd:enumeration value="deleteComment" />
<xsd:enumeration value="skip" />
<xsd:enumeration value="forward" />
<xsd:enumeration value="delegate" />
<xsd:enumeration value="setOutput" />
<xsd:enumeration value="deleteOutput" />
<xsd:enumeration value="setFault" />
<xsd:enumeration value="deleteFault" />
<xsd:enumeration value="activate" />
<xsd:enumeration value="nominate" />
<xsd:enumeration value="setGenericHumanRole" />
<xsd:enumeration value="expire" />
<xsd:enumeration value="escalated" />
</xsd:restriction>
</xsd:simpleType>
The XML Schema definition of events returned for the history is the following:
<xsd:element name="taskEvent">
<xsd:complexType>
<xsd:annotation>
<xsd:documentation>
A detailed event that represents a change in the task's state.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<!-- event id - unique per task -->
<xsd:element name="id" type="xsd:integer" />
<!-- event date time -->
<xsd:element name="eventTime" type="xsd:dateTime" />
<!-- task ID -->
<xsd:element name="identifier" type="xsd:anyURI" />
<xsd:element name="principal" type="xsd:string" minOccurs="0"
nillable="true" />
<!-- Event type. Note - using a restricted type limits
extensibility to add custom event types. -->
<xsd:element name="eventType" type="tTaskEventType" />
<!-- actual owner of the task before the event -->
<xsd:element name="startOwner" type="xsd:string" minOccurs="0"
nillable="true" />
<!-- actual owner of the task after the event -->
<xsd:element name="endOwner" type="xsd:string" minOccurs="0"
nillable="true" />
<!-- WSHT task status -->
<xsd:element name="status" type="tStatus" />
<!-- boolean to indicate this event has optional data -->
<xsd:element name="hasData" type="xsd:boolean" minOccurs="0" />
<xsd:element name="eventData" type="xsd:anyType" minOccurs="0"
nillable="true" />
<xsd:element name="faultName" type="xsd:string" minOccurs="0"
nillable="true" />
<!-- extensibility -->
<xsd:any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
The <leanTask> element is used to specify human tasks. This section introduces the syntax for the element, and individual properties are explained in subsequent sections.
The element <leanTask> derives from the type htd:tTask, with the following augmentations:
<htd:leanTask>
<htd:interface>….</htd:interface>
<htd:messageSchema>...</htd:messageSchema>
... All elements from htd:task except <interface> and <composition> ...
<htd:composition>….</htd:composition>
</htd:leanTask>
The following attributes and elements are defined for lean tasks and are different from the definition of htd:task:
This element references the schema of the data that is used for both the input and output messages of the lean task.
<messageSchema>
<messageField name="xsd:NCName" type="xsd:QName">*
<messageDisplay xml:lang="xsd:language"?>+
Language specific display
</messageDisplay>
<messageChoice
namevalue="xsd:NCNameanySimpleType">*
<messageDisplay xml:lang="xsd:language"?>+
Language specific display
</messageDisplay>
</messageChoice>
</messageField>
</messageSchema>
The <messageSchema> element specifies the data that a Lean Task accepts. As it is currently defined, a WS-HumanTask Processor could render the following form elements in a way that only requires vendor-specific knowledge between the WS-HumanTask Processor and the WS-HumanTask Client and no vender-specific knowledge between the WS-HumanTask Processor and the WS-HumanTask Parent:
String
Integer
Float
Date Time
Bool
Enumeration (Choice)
Each of these is accomplished by using an instance of a <messageField>. For string, integer, float, datetime, and boolean fields, this is accomplished by using the type attribute of the <messageField>. The supported set of values are: xsd:string, xsd:integer, xsd:float, xsd:datetime, and xsd:boolean, all respectively matching the list above. If a simple rendering language like HTML were used, this could be accomplished by using a textbox control that simply had special rules about the format of its input.
The enumeration field uses a combination of one <messageField> element and possibly many child <messageChoice> elements. Each child <messageChoice> represents one possible option that could be selected from the enumeration. If a simple rendering language like HTML were used, this could be shown using radio buttons, a dropdown list, or a listbox that only supports single selection.
For all <messageField> and <messageChoice> elements, it is possible to specify a per-lanugage <messageDisplay> element. It uses xml:lang, a standard XML attribute, to define the language of the enclosed information. This attribute uses tags according to RFC 1766 (see [RFC1766]). There could be zero or more <messageDisplay> elements. A <messageField> or <messageChoice> MUST NOT specify multiple <messageDisplay> elements having the same value for the attribute xml:lang.
The combination of <messageSchema> and <possibleOutcomes> can be used to generate a form of sufficient functionality for many simple tasks, precluding the need for a renderings element.
Example:
<messageSchema>
<messageField name="amount" type="xsd:float">
<messageDisplay xml:lang="en-us">Amount</messageDisplay>
<messageDisplay xml:lang="fr-fr”>Quantité</messageDisplay>
</messageField>
<messageField name="currencyUnit" type="xsd:string">
<messageDisplay xml:lang="en-us">Currency<messageDisplay>
<messageDisplay xml:lang="fr-fr">Devise</messageDisplay>
<messageChoice namevalue="USD">
<messageDisplay xml:lang="en-us">US Dollars</messageDisplay>
<messageDisplay xml:lang="fr-fr">US Dollars</messageDisplay>
</messageChoice>
<messageChoice namevalue="EURO">
<messageDisplay xml:lang="en-us">Euro Dollars</messageDisplay>
<messageDisplay xml:lang="fr-fr">Euros</messageDisplay>
</messageChoice>
</messageField>
</messageSchema>
The following XML could be used for a simple ‘ToDoTask’:
<htd:task name="ToDoTask">
<htd:messageSchema />
<htd:possibleOutcomes>
<htd:possibleOutcome name="Completed" />
... language specific translations ...
</htd:possibleOutcomes>
<htd:delegation potentialDelegates="anybody" />
<htd:presentationElements>
<htd:name>ToDo Task</htd:name>
... language specific translations ...
<htd:subject>Please complete the described work</htd:subject>
... language specific translations ...
<htd:description contentType="mimeTypeString" />
... language specific translations ...
</htd:presentationElements>
</htd:task>
Notifications are used to notify a person or a group of people of a noteworthy business event, such as that a particular order has been approved, or a particular product is about to be shipped. They are also used in escalation actions to notify a user that a task is overdue or a task has not been started yet. The person or people to whom the notification will be assigned to could be provided, for example, as result of a people query to organizational model.
Notifications are simple human interactions that do not block the progress of the caller, that is, the caller does not wait for the notification to be completed. Moreover, the caller cannot influence the execution of notifications, e.g. notifications are not terminated if the caller terminates. The caller, i.e. an application, a business process or an escalation action, initiates a notification passing the required notification data. The notification appears on the task list of all notification recipients. After a notification recipient removes it, the notification disappears from the recipient’s task list.
A notification MAY have multiple recipients and optionally one or many business administrators. The generic human roles task initiator, task stakeholders, potential owners, actual owner and excluded owners play no role.
Presentation elements and task rendering, as described in sections 4.3 and 4.4 respectively, are used for notifications also. In most cases the subject line and description are sufficient information for the recipients, especially if the notifications are received in an e-mail client or mobile device. But in some cases the notifications can be received in a proprietary client so the notification can support a proprietary rendering format to enable this to be utilized to the full, such as for rendering data associated with the caller invoking the notification. For example, the description could include a link to the process audit trail or a button to navigate to business transactions involved in the underlying process.
Notifications do not have ad-hoc attachments, comments or deadlines.
Definition of notifications
<htd:notification name="NCName">
<htd:interface portType="QName" operation="NCName"/>
<htd:priority expressionLanguage="anyURI"?>?
integer-expression
</htd:priority>
<htd:peopleAssignments>
<htd:recipients>
...
</htd:recipients>
<htd:businessAdministrators>?
...
</htd:businessAdministrators>
</htd:peopleAssignments>
<htd:presentationElements>
...
</htd:presentationElements>
<htd:renderings>?
...
</htd:renderings>
</htd:notification>
The following attributes and elements are defined for notifications:
· name: This attribute is used to specify the name of the notification. The name combined with the target namespace MUST uniquely identify a notification in the notification definition. The attribute is mandatory. It is not used for notification rendering.
· interface: This element is used to specify the operation used to invoke the notification. The operation is specified using WSDL, that is a WSDL port type and WSDL operation are defined. The element and its portType and operation attributes are mandatory. In the operation attribute, a WS-HumanTask Definition MUST reference a one-way WSDL operation.
· priority: This element is used to specify the priority of the notification. It is an optional element which value is an integer expression. If present then the WS-HumanTask Definition MUST specify a value between 0 and 10, where 0 is the highest priority and 10 is the lowest. If not present, the priority of the notification is considered as 5. The result of the expression evaluation is of type htt:tPriority. The expressionLanguage attribute specifies the language used in the expression. The attribute is optional. If not specified, the default language as inherited from the closest enclosing element that specifies the attribute is used.
· peopleAssignments: This element is used to specify people assigned to the notification. The element is mandatory. A WS-HumanTask Definition MUST include a people assignment for recipients and MAY include a people assignment for business administrators.
· presentationElements: The element is used to specify different information used to display the notification, such as name, subject and description, in a task list. The element is mandatory. See section 4.3 for more information on presentation elements.
· rendering: The element is used to specify rendering method. It is optional. If not present, notification rendering is implementation dependent. See section 4.4 for more information on rendering.
Same as human tasks, notifications are in pseudo-state Inactive before they are activated. Once they are activated they move to the Ready state. This state is observable, that is, when querying for notifications then all notifications in state Ready are returned. When a notification is removed then it moves into the final pseudo-state Removed.
A number of applications are involved in the life cycle of a task. These comprise:
· The task list client, i.e. a client capable of displaying information about the task under consideration
· The requesting application, i.e. any partner that has initiated the task
· The supporting application, i.e. an application launched by the task list client to support processing of the task.
The task infrastructure provides access to a given task. It is important to understand that what is meant by task list client is the software that presents a UI to one authenticated user, irrespective of whether this UI is rendered by software running on server hardware (such as in a portals environment) or client software (such as a client program running on a users workstation or PC).
A given task exposes a set of operations to this end. A WS-HumanTask Processor MUST provide the operations listed below and an application (such as a task list client) can use these operations to manipulate the task. All operations MUST be executed in a synchronous fashion and MUST return a fault if certain preconditions do not hold. For operations that are not expected to return a response they MAY return a void message. The above applies to notifications also.
An operation takes a well-defined set of parameters as its input. Passing an illegal parameter or an illegal number of parameters MUST result in the hta:illegalArgumentFault being returned. Invoking an operation that is not allowed in the current state of the task MUST result in an hta:illegalStateFault.
By default, the identity of the person on behalf of which the operation is invoked is passed to the task. When the person is not authorized to perform the operation the hta:illegalAccessFault and hta:recipientNotAllowed MUST be returned in the case of tasks and notifications respectively.
Invoking an operation that does not apply to the task type (e.g., invoking claim on a notification) MUST result in an hta:illegalOperationFault.
The language of the person on behalf of which the operation is invoked is assumed to be available to operations requiring that information, e.g., when accessing presentation elements.
For an overview of which operations are allowed in what state, refer to section 4.10 “Human Task Behavior and State Transitions”. For a formal definition of the allowed operations, see Appendix D “WS-HumanTask Client API Port Type".
For information which generic human roles are authorized to perform which operations, refer to section 7.1.4 “Operation Authorizations”.
This specification does not stipulate the authentication, language passing, addressing, and binding scheme employed when calling an operation. This can be achieved using different mechanisms (e.g. WS-Security, WS-Addressing).
Operations are executed by end users, i.e. actual or potential owners. The identity of the user is implicitly passed when invoking any of the operations listed in the table below.
If the task is in a predefined state listed as valid pre-state before the operation is invoked then, upon successful completion, the task MUST be in the post state defined for the operation. If the task is in a predefined state that is not listed as valid pre-state before the operation is invoked then the operation MUST be rejected and MUST NOT cause a task state transition.
All of the operations below apply to tasks and sub tasks only unless specifically noted below.
The column “Supports Batch Processing” below indicates if an operation can be used to process multiple human tasks at the same time. One or more operations on individual tasks may fail without causing the overall batch operation to fail.
Description |
Parameters |
Supports Batch Processing |
Pre-State |
Post-State |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addAttachment |
Add attachment to a task. Returns an identifier for the attachment. |
In
Out
|
No |
(any state) |
(no state transition) |
addComment |
|
In
Out
|
No |
(any state) |
(no state transition) |
claim |
|
In · task identifier
Out ·
|
|
|
|
complete |
Execution of the task finished successfully. The fault hta:illegalStateFault MUST be returned if the task interface defines non-empty task output but no output data is provided as the input parameter and the task output data has not been set previously, e.g. using operation setOutput. |
In
Out
|
Yes
|
InProgress |
Completed |
delegate |
Assign the task to one user and set the task to state Reserved. If the recipient was not a potential owner then this person MUST be added to the set of potential owners. For details on delegating human tasks refer to section 4.10.3. |
In
Out
|
Yes |
Ready Reserved InProgress |
Reserved |
deleteAttachment |
Delete the attachment with the specified identifier from the task. Attachments provided by the enclosing context MUST NOT be affected by this operation. |
In
Out
|
No |
(any state) |
(no state transition) |
deleteComment |
|
In
Out
|
No
|
(any state) |
(no state transition) |
deleteFault |
|
In
Out
|
No |
|
(no state transition) |
deleteOutput |
Deletes the |
In
Out
|
No
|
|
(no state transition) |
|
|
|
|
|
|
fail |
The fault hta:illegalStateFault MUST be returned if the task interface defines at least one faults but either fault name or fault data is not provided and it has not been set previously, e.g. using operation setFault. |
In
Out
|
Yes
|
InProgress |
|
forward |
Forward the task to another organization entity. The WS-HumanTask Client MUST specify the receiving organizational entity. Potential owners MAY forward a task while the task is in the Ready state. For details on forwarding human tasks refer to section 4.10.3 . |
In
Out
|
Yes |
Ready Reserved InProgress |
Ready |
getAttachment |
|
In
Out
|
|
|
|
getAttachmentInfos |
Get attachment information for all attachments associated with the task. |
In
Out
|
No |
(any state) |
(no state transition) |
getComments |
Get all comments of a task |
In
Out
|
No
|
(any state) |
(no state transition) |
getFault |
Get the fault data of the task. |
In
Out
|
No |
(any state) |
(no state transition) |
getInput |
Get the data for the part of the task's input message. |
In
Out
|
No |
(any state) |
(no state transition) |
getOutcome |
Get the outcome of the task |
In
Out
|
No |
(any state) |
(no state transition) |
getOutput |
Get the data for the part of the task's output message. |
In
Out
|
No |
(any state) |
(no state transition) |
getParentTask |
Returns the superior composite task of a sub task |
In · task identifier Out
|
No |
(any state) |
(no state transition) |
getParentTaskIdentifier |
Returns the task identifier of the superior composite task of a sub task |
In · task identifier Out
|
No |
(any state) |
(no state transition) |
getRendering |
Applies to both tasks and notifications. Returns the rendering specified by the type parameter. |
In
Out
|
No |
(any state) |
(no state transition) |
getRenderingTypes |
Applies to both tasks and notifications. Returns the rendering types available for the task or notification. |
In
Out
|
No |
(any state) |
(no state transition) |
getSubtaskIdentifiers |
Returns |
In · task identifier Out
|
No |
(any state) |
(no state transition) |
getSubtasks |
Returns all sub tasks of a task (created instances + not yet created sub task definitions) |
In · task identifier Out
|
No |
(any state) |
(no state transition) |
getTaskDescription |
Applies to both tasks and notifications. Returns the presentation description in the specified mime type. |
In
Out
|
No |
(any state) |
(no state transition) |
getTaskDetails |
Applies to both tasks Returns |
In
Out
|
No
|
(any state) |
(no state transition) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getTaskHistory |
Get a list of events representing the history of the task. Filter allows narrowing the results by status, principal, event Type. startIndex and maxTasks are integers that allow paging of the results. includeData is a Boolean. Data is included with the returned events only if this is true. |
In
Out
|
No |
(any state) |
(no state transition) |
getTaskInstanceData |
Get any or all details of a task, except the contents of the attachments. This duplicates functionality provided by the get() operations above, but provides all the data in a single round trip. Properties is an optional space separated list of properties of the task that should be provided. Properties are named by the local part of the QName of the element returned for task details. If it is not specified, then all properties are returned. If it is specified, then only the properties specified are returned. In the case that multiple elements have the same local part (which can happen for extensions from two different namespaces) then all of the matching properties are returned. Some properties of a task may have multiple values (i.e., taskDescription, input and ouput). When such a property is requested, all valid values for the property are returned. There is an exception for the “renderings” property, which is controlled by the “renderingPreferences” parameter.. renderingPreference is an optional list of rendering types, in order of preference. If properties is not specified or includes "renderings", then If renderingPreferences is not specified, the result includes all renderings. If it is specified, then the task's rendering whose type is earliest in the provided list of rendering types is returned. |
In
· properties
Out
|
No |
(any state) |
(no state transition) |
getTaskOperations |
|
In
Out
|
No
|
(any state) |
(no state transition) |
|
|
|
|
|
|
hasSubtasks |
Returns true if a task has at least one (already created or not yet created, but specified) sub task |
In · task identifier Out
|
No |
(any state) |
(no state transition) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
instantiateSubTask |
Creates an instantiateable subtask for the task from the definition of the task.
The fault hta:illegalArgumentFault MUST be returned if the task does not have an instantiateable subtask of the given name.
Returns the identifier for the created subtask. |
In · task identifier · subtask name Out
|
No |
Reserved In Progress |
(no state transition) |
|
|
In · task identifier
Out
|
|
|
(no state transition) |
release |
Release the task, i.e. set the task back to status Ready. |
In
Out
|
Yes |
InProgress Reserved |
Ready |
|
Used by notification recipients to remove the notification permanently from their task list client. It will not be returned on any subsequent retrieval operation invoked by the same user. |
In
Out
|
Yes |
Ready
|
|
resume |
Resume a suspended task. |
In
Out
|
Yes |
Suspended/Ready Suspended/Reserved Suspended/InProgress |
Ready (from Suspended/Ready) Reserved (from Suspended/Reserved) InProgress (from Suspended/InProgress) |
setFault |
Set the fault data of the task. The fault hta:illegalOperationFault MUST be returned if the task interface defines no faults. |
In
Out
|
No |
InProgress |
(no state transition) |
setOutput |
Set the data for the part of the task's output message. |
In
Out
|
No |
InProgress |
(no state transition) |
setPriority |
Change the priority of the task. The WS-HumanTask Client MUST specify the integer value of the new priority. |
In
Out
|
Yes
|
(any state) |
(no state transition) |
setTaskCompletionDeadlineExpression |
Sets a deadline expression for the named completion deadline of the task |
In
Out void |
Yes |
Created Ready Reserved In Progress |
(no state transition) |
setTaskCompletionDurationExpression |
Sets a duration expression for the named completion deadline of the task |
In
Out void |
Yes |
Created Ready Reserved In Progress |
(no state transition) |
setTaskStartDeadlineExpression |
Sets a deadline expression for the named start deadline of the task |
In
Out
|
Yes |
Created Ready Reserved In Progress |
(no state transition) |
setTaskStartDurationExpression |
Sets a duration expression for the named start deadline of the task |
In
Out void |
Yes |
Created Ready Reserved In Progress |
(no state transition) |
skip |
Skip the task. If the task is not skipable then the fault hta:illegalOperationFault MUST be returned.
|
In
Out
|
Yes
|
Created Ready Reserved InProgress |
Obsolete |
start |
Start the execution of the task, i.e. set the task to status InProgress. |
In
Out
|
Yes |
Ready Reserved |
InProgress |
stop |
Cancel/stop the processing of the task. The task returns to the Reserved state. |
In
Out
|
Yes |
InProgress |
Reserved |
suspend |
Suspend the task. |
In
Out
|
Yes |
Ready Reserved InProgress |
Suspended/Ready (from Ready) Suspended/Reserved (from Reserved) Suspended/InProgress (from InProgress) |
suspendUntil |
Suspend the task for a given period of time or until a fixed point in time. The WS-HumanTask Client MUST specify either a period of time or a fixed point in time. |
In
Out
|
Yes
|
Ready Reserved InProgress |
Suspended/Ready (from Ready) Suspended/Reserved (from Reserved) Suspended/InProgress (from InProgress) |
updateComment |
Updates the identified comment with the supplied new text. |
In
Out
|
No |
(any state) |
(no state transition) |
Simple query operations allow retrieving task data. These operations MUST be supported by a WS-HumanTask Processor. The identity of the user is implicitly passed when invoking any of the following operations.
The following operations will return both matching tasks and sub tasks.
Operation Name |
Description |
Parameters |
Authorization |
getMyTaskAbstracts |
Retrieve the task abstracts. This operation is used to obtain the data required to display a task list. If no task type has been specified then the default value “ALL” MUST be used. If no generic human role has been specified then the default value “actualOwner” MUST be used. If no work queue has been specified then only personal tasks MUST be returned. If the work queue is specified then only tasks of that work queue MUST be returned. If no status list has been specified then tasks in all valid states are returned. The where clause is optional. If specified, it MUST reference exactly one column using the following operators: equals (“=”), not equals (“<>”), less than (“<”), greater than (“>”), less than or equals (“<=”), and greater than or equals (“>=”), e.g., “Task.Priority = 1”). The created-on clause is optional. The where clause is logically ANDed with the created-on clause, which MUST reference the column Task.CreatedTime with operators as described above. The combination of the two clauses enables simple but restricted paging in a task list client. If maxTasks is specified, then the number of task abstracts returned for this query MUST NOT exceed this limit. The taskIndexOffset can be used to perform multiple identical queries and iterate over result sets where the maxTasks size exceeds the query limit. If maxTasks has not been specified then all tasks fulfilling the query are returned. |
In
Out
|
Any |
getMyTaskDetails |
Retrieve the task details. This operation is used to obtain the data required to display a task list, as well as the details for the individual tasks. If no task type has been specified then the default value “ALL” MUST be used. If no generic human role has been specified then the default value “actualOwner” MUST be used. If no work queue has been specified then only personal tasks MUST be returned. If the work queue is specified then only tasks of that work queue MUST be returned. If no status list has been specified then tasks in all valid states are returned. The where clause is optional. If specified, it MUST reference exactly one column using the following operators: equals (“=”), not equals (“<>”), less than (“<”), greater than (“>”), less than or equals (“<=”), and greater than or equals (“>=”),e.g., “Task.Priority = 1”. The created-on clause is optional. The where clause is logically ANDed with the created-on clause, which MUST reference the column Task.CreatedTime with operators as described above. The combination of the two clauses enables simple but restricted paging in the task list client. If maxTasks is specified, then the number of task details returned for this query MUST NOT exceed this limit. If maxTasks has not been specified then all tasks fulfilling the query are returned. |
In
Out
|
Any |
The return types tTaskAbstract and tTaskDetails are defined in section 3.8.4 “Data Types for Task Instance Data”.
Simple Task View
The table below lists the task attributes available to the simple query operations. This view is used when defining the where clause of any of the above query operations.
Column Name |
Type |
ID |
xsd:string |
TaskType |
Enumeration |
Name |
xsd:QName |
Status |
Enumeration (for values see 4.10 “Human Task Behavior and State Transitions”) |
Priority |
htt:tPriority |
CreatedTime |
xsd:dateTime |
ActivationTime |
xsd:dateTime |
ExpirationTime |
xsd:dateTime |
HasPotentialOwners |
xsd:boolean |
StartByTimeExists |
xsd:boolean |
CompleteByTimeExists |
xsd:boolean |
RenderingMethodExists |
xsd:boolean |
Escalated |
xsd:boolean |
ParentTaskId |
xsd:string |
HasSubTasks |
xsd:boolean |
SearchBy |
xsd:string |
Outcome |
xsd:string |
The advanced query operation is used by the task list client to perform queries not covered by the simple query operations defined in 7.1.2. A WS-HumanTask Processor MAY support this operation. An implementation MAY restrict the results according to authorization of the invoking user.
The following operations will return both matching tasks and sub tasks.
Operation Name |
Description |
Parameters |
query |
Retrieve task data. All clauses assume a (pseudo-) SQL syntax. If maxTasks is specified, then the number of task returned by the query MUST NOT exceed this limit. The taskIndexOffset can be used to perform multiple identical queries and iterate over result sets where the maxTasks size exceeds the query limit. |
In
Out
|
ResultSet Data Type
This is the result set element that is returned by the query operation.
<xsd:element name="taskQueryResultSet" type="tTaskQueryResultSet" />
<xsd:complexType name="tTaskQueryResultSet">
<xsd:sequence>
<xsd:element name="row" type="tTaskQueryResultRow"
minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
The following is the type of the row element contained in the result set. The value in the row are returned in the same order as specified in the select clause of the query.
<xsd:complexType name="tTaskQueryResultRow">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="id" type="xsd:stringanyURI"/>
<xsd:element name="taskType" type="xsd:string"/>
<xsd:element name="name" type="xsd:QName"/>
<xsd:element name="status" type="tStatus"/>
<xsd:element name="priority" type="htt:tPriority"/>
<xsd:element name="taskInitiator"
type="htt:tUser"/>
<xsd:element name="taskStakeholders"
type="htt:tOrganizationalEntity"/>
<xsd:element name="potentialOwners"
type="htt:tOrganizationalEntity"/>
<xsd:element name="businessAdministrators"
type="htt:tOrganizationalEntity"/>
<xsd:element name="actualOwner" type="htt:tUser"/>
<xsd:element name="notificationRecipients"
type="htt:tOrganizationalEntity"/>
<xsd:element name="createdTime" type="xsd:dateTime"/>
<xsd:element name="createdBy" type="xsd:string"/>
<xsd:element name="lastModifiedTime" type="xsd:dateTime"/>
<xsd:element name="lastModifiedBy" type="xsd:string"/>
<xsd:element name="activationTime" type="xsd:dateTime"/>
<xsd:element name="expirationTime" type="xsd:dateTime"/>
<xsd:element name="isSkipable" type="xsd:boolean"/>
<xsd:element name="hasPotentialOwners" type="xsd:boolean"/>
<xsd:element name="startByTime" type="xsd:dateTime"/>
<xsd:element name="completeByTime" type="xsd:dateTime"/>
<xsd:element name="presentationName" type="tPresentationName"/>
<xsd:element name="presentationSubject"
type="tPresentationSubject"/>
<xsd:element name="renderingMethodName" type="xsd:QName"/>
<xsd:element name="hasOutput" type="xsd:boolean"/>
<xsd:element name="hasFault" type="xsd:boolean"/>
<xsd:element name="hasAttachments" type="xsd:boolean"/>
<xsd:element name="hasComments" type="xsd:boolean"/>
<xsd:element name="escalated" type="xsd:boolean"/>
<xsd:element name="parentTaskId" type="xsd:stringanyURI"/>
<xsd:element name="hasSubTasks" type="xsd:boolean"/>
<xsd:element name="searchBy" type="xsd:string"/>
<xsd:element name="outcome" type="xsd:string"/>
<xsd:element name="taskOperations" type="tTaskOperations"/>
<xsd:any namespace="##other" processContents="lax"/>
</xsd:choice>
</xsd:complexType>
Complete Task View
The table below is the set of columns used when defining select clause, where clause, and order-by clause of query operations. Conceptually, this set of columns defines a universal relation. As a result the query can be formulated without specifying a from clause. A WS-HumanTask Processor MAY extend this view by adding columns.
Column Name |
Type |
Constraints |
ID |
xsd:string |
|
TaskType |
Enumeration |
Identifies the task type. The following values are allowed:
Note that notifications are simple tasks that do not block the progress of the caller, |
Name |
xsd:QName |
|
Status |
Enumeration |
For values see section 4.10 “Human Task Behavior and State Transitions” |
Priority |
htt:tPriority |
|
(GenericHumanRole) |
xsd:tUser or htt:tOrganizationalEntity |
|
CreatedTime |
xsd:dateTime |
The time in UTC when the task has been created. |
CreatedBy |
xsd:string |
|
LastModifiedTime |
xsd:dateTime |
The time in UTC when the task has been last modified. |
LastModifiedBy |
xsd:string |
|
ActivationTime |
xsd:dateTime |
The time in UTC when the task has been activated. |
ExpirationTime |
xsd:dateTime |
The time in UTC when the task will expire. |
IsSkipable |
xsd:boolean |
|
StartByTime |
xsd:dateTime |
The time in UTC when the task needs to be started. This time corresponds to the respective start deadline. |
CompleteByTime |
xsd:dateTime |
The time in UTC when the task needs to be completed. This time corresponds to the respective end deadline. |
PresentationName |
xsd:string |
The task’s presentation name. |
PresentationSubject |
xsd:string |
The task’s presentation subject. |
RenderingMethodName |
xsd:QName |
The task’s rendering method name. |
HasOutput |
xsd:boolean |
|
HasFault |
xsd:boolean |
|
HasAttachments |