ui.xml descriptor
Introduction
The user interface descriptor follows the attached schema: ui.xsd
Versioning
JBPM denotes business process definition using a sequential number. This approach is not practical for business process management. So, every ui.xml file should have a tag tag, identifying the actual version of the process definition.
Permissions
The business process permissions are enclosed in a roles tag. This tag must have three inner tags:
Tag
|
Description
|
---|---|
initiator |
Contains the users and roles that area authorized to start a new process instance. |
supervisor |
Contains the users and roles that can act as this process supervisor. A supervisor can take ownership of any task of the process at any type, as well as cancel any active process. Process supervisors are also enabled to upgrade or disable the process definition |
observers |
Observers can query the process status at any time. Any user that has been assigned a task (despite taken their ownership or not) within a process instance is automatically given the observer permission on this particular process instance. |
Process definition upgrade
Soffid allows the process definition developer to decide whether existing but not yet finished process instances should be upgraded to the new process definition when it is uploaded on Soffid console.
To do this, the ui.xml should have an upgrade tag. Within there can be one or more process tags. Each process must have a tag tag that identifies previous business definition versions that should be upgraded to this one. The upgrade will be performed as long as the current node and current task of the process instance token exists on this new version.
If no node and tasks with such name exists on the new process definition, the process instance will remain on its elder version.
To circumvent this limitation, specially when nodes or tasks have been renamed, the developer can specify the target node or task for some current tasks. This mission is accomplished using one or more task tags. Each task tag should have a source and a target attribute. So, when the process upgrade is performed, the first step will be to search for a task tag with a source attribute matching the current task. If it exists, the process will be upgraded and the new task will be that one with the target attribute name.
User Interface resources
Soffid will try to guess the user interface page based on the task name. If no user interface exists with the same name as the task name, a ui/default.zul will be used. Anyway, it's a good practice to specifiy which user interface page will be used for each business process task. This is accomplished by using the task tag. Following the task tag, a file tag with a path attribute will tell Soffid which resouce to use with such a task.
Example
Sample ui.xml file
<?xml version="1.0" encoding="UTF-8"?>
<process>
<!-- Current work in progress version -->
<tag>1.0.3-SNAPSHOT</tag>
<roles>
<!-- Everyone can start this process -->
<initiator>
<user name="*"/>
</initiator>
<!-- Only SOFFID_ADMIN can manage this process -->
<supervisor>
<role name="SOFFID_ADMIN"/>
</supervisor>
<!-- HR group members will be allowed to quey processes status -->
<observer>
<role name="HR"/>
</observer>
</roles>
<!-- This specify the resource for New sync server request -->
<task name="New sync server request">
<file path="ui/request.zul"/>
</task>
<upgrade>
<!-- Upgrade 1.0.0 version processes -->
<process>
<tag>1.0.0</tag>
</process>
<!-- Do not upgrade 1.0.1 or 1.0.2 version processes -->
<!-- Upgrade prior 1.0.3-SNAPSHOT versions, renaming bad spelled task -->
<process>
<tag>1.0.3-SNAPSHOT</tag>
<task source="New synk server request" target="New sync server request"/>
</process>
</upgrade>
</process>