(Known issues
)
User Guide and Samples:
Tutorials:

- VRMP Build VideoDesigner Features:
Features:
Worklist Manager SE (WLMSE) is a JBI based engine, which provides task management and human intervention in a business process.Worklist Manager SE uses a simple task definition language to define the tasks related functionality like task assignment to user/groups, escalation, timeout etc.
Also see overview of different concepts
.
WLM Task Definition file is the main artifact to specify task behavior in WLMSE. User can specify things like a task, task assignment, escalation, timeout and notification etc here.
Each task in task definition is exposed as a web service operation by WLMSE. For each task in task definition, a request reply web service operation is defined. The input message of this operation is the task input and output message of this operation is the task output.
<task name="ApprovePurchase" portType="wsdl:ApprovePurchasePT" operation="ApprovePurchase" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://jbi.com.sun/wfse/wsdl/WorkflowApp2/ApprovePurchase"
xmlns="http://jbi.com.sun/wfse"
xmlns:cur="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/XPathFunctions"
xmlns:wsdl="http://jbi.com.sun/wfse/wsdl/WorkflowApp2/ApprovePurchase_TM_BPEL"
xmlns:po="http://wlmse.sample/po">
<import namespace="http://jbi.com.sun/wfse/wsdl/WorkflowApp2/ApprovePurchase_TM_BPEL"
location="ApprovePurchase_TM_BPEL.wsdl"/>
<!-- Make sure to use single quotes for literal value in xpath enabled expression -->
<title expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">'This is a purchase order'</title>
<!-- priority is in 1-10 scale with 10 to be the highest -->
<priority expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">'5'</priority>
<assignment>
<!-- 0-* user -->
<user>'john'</user>
<!-- 0-* group -->
<group>'CustomerServiceRep'</group>
</assignment>
</task>
<task xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://jbi.com.sun/wfse"
targetNamespace="http://localhost/WorklistApp5/ApprovePurchase" name="ApprovePurchase" xmlns:ns0="http://jbi.com.sun/wfse/wsdl/WorkflowApp2/ApprovePurchase_TM_BPEL" portType="ns0:ApprovePurchasePT" operation="ApprovePurchase" xmlns:ns="http://wlmse.sample/po" xmlns:ns1="http://j2ee.netbeans.org/wsdl/EmailNotificationHandler"
xmlns:cur="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/XPathFunctions">
<import location="ApprovePurchase_TM_BPEL.wsdl" namespace="http://jbi.com.sun/wfse/wsdl/WorkflowApp2/ApprovePurchase_TM_BPEL"/>
<title>'This is a task for purchase order'</title>
<priority>'5'</priority>
<assignment>
<group>'CustomerServiceRep'</group>
</assignment>
<escalation>
<duration>'P0Y0M0DT0H3M0S'</duration>
<assignment>
<user>'dale'</user>
</assignment>
</escalation>
</task>
Also see described in User Guide
WLMSE supports task time-out. Task time-out can be useful as the last resort after escalation.
For example, the task is not completed by anyone within a certain time period and will be treated as FAILED and returns to BPEL with a system fault.
A task can time-out based on a deadline or duration. Following example shows the code require to implement task time-out.
<task xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://jbi.com.sun/wfse"
targetNamespace="http://localhost/WorklistApp5/ApprovePurchase" name="ApprovePurchase" xmlns:ns0="http://jbi.com.sun/wfse/wsdl/WorkflowApp2/ApprovePurchase_TM_BPEL" portType="ns0:ApprovePurchasePT" operation="ApprovePurchase" xmlns:ns="http://wlmse.sample/po" xmlns:ns1="http://j2ee.netbeans.org/wsdl/EmailNotificationHandler"
xmlns:cur="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/XPathFunctions">
<import location="ApprovePurchase_TM_BPEL.wsdl" namespace="http://jbi.com.sun/wfse/wsdl/WorkflowApp2/ApprovePurchase_TM_BPEL"/>
<title>'This is a task for purchase order'</title>
<priority>'5'</priority>
<assignment>
<group>'CustomerServiceRep'</group>
</assignment>
<timeout>
<deadline expressionLanguage="xpath">'2009-03-01T23:00:00'</deadline>
</timeout>
<timeout>
<duration expressionLanguage="xpath">'P0Y0M3DT0H0M0S'</duration>
</timeout>
</task>
There is a simple task notification now supported which allows sending notification using smtp bc. The notification takes place when task state changes. For example when task is assigned to a set of users, send them notification regarding tasks to work on. When task is completed by a user send a notification to user's manager regarding completion of the task.
<task xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://jbi.com.sun/wfse"
targetNamespace="http://localhost/WorklistApp5/ApprovePurchase" name="ApprovePurchase" xmlns:ns0="http://jbi.com.sun/wfse/wsdl/WorkflowApp2/ApprovePurchase_TM_BPEL" portType="ns0:ApprovePurchasePT" operation="ApprovePurchase" xmlns:ns="http://wlmse.sample/po" xmlns:ns1="http://j2ee.netbeans.org/wsdl/EmailNotificationHandler"
xmlns:cur="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/XPathFunctions">
<import location="ApprovePurchase_TM_BPEL.wsdl" namespace="http://jbi.com.sun/wfse/wsdl/WorkflowApp2/ApprovePurchase_TM_BPEL"/>
<title>'This is a task for purchase order'</title>
<priority>'5'</priority>
<assignment>
<group>'CustomerServiceRep'</group>
</assignment>
<action name="Task_Assigned" type="Assigned">
<localNotification reference="notifyUsers"/>
</action>
<notification name="notifyManager">
<email portType="ns1:NotificationHandlerPortType" operation="NotificationHandlerOperation">
<address>'mei.w.gao@gmail.com'</address>
</email>
<message>
<subject>'The approve purchase order task has been completed'</subject>
<body>concat(concat(' Purchase Order for ', $TaskInput.part1/ns:purchaserName), ' has been completed.')</body>
</message>
</notification>
<notification name="notifyUsers">
<email portType="ns1:NotificationHandlerPortType" operation="NotificationHandlerOperation">
<address>'mei.wu@sun.com'</address>
</email>
<message>
<subject>'There is a new task of approve purchase order assigned to you'</subject>
<body>'The task can be found at http://localhost:8080/WorklistWebApplication/wlm-jsp/wlmEntry.jsp'</body>
</message>
</notification>
</task>
Also see described in User Guide
User can plug in a custom type of Notification such as let WLM invokes a web service when task status changes, please see Custom Notification
Back to Top
Introducing Variables and Expressions into WLMSE is to allow the elements (Assignment, Escalation, Timeout, etc) in task definition and properties of task instance (Priority, Title, etc) to be dynamically derived from input message.
Details on Xpath Enabled Task Definition
Note: We will provide mapper to enter xpath graphically in the future.
Create a worklist project in NB :
A simple wizard is available which creates worklist task definition file and prompt user for various task related configuration. This allows user to get started with task definition without any coding. Work is under way to launch the wizard from BPEL editor when a human interaction step is needed
WLMSE comes with a generic Worklist Web Application which provides out of box worklist application for a user to see his tasks and work on them. The web application interacts with WLMSE using static WSDL client api.
Worklist Web Application also provides automatic UI for tasks based on generated XForm as available in the deployed worklist application. See more details about how XForms are generated in Automatic XForm Generation section.
WLMSE provides a static client WSDL for a web service client to get task related information.
The static client WSDL provides a generic API to work with WLMSE tasks. Following are the operations exposed in static client WSDL:
TaskList GetTaskList(taskId) ClaimTask(taskId) CompleteTask(taskId) xsd:anyType GetTaskInput(taskId) xsd:anyType GetTaskOutput(taskId) SetTaskOutput(taskId, xsd:anyType) ReassignTask(taskId, Role, User) RevokeTask(taskId) GetTaskXForm(taskId)
Please also see described in User Guide
Back to Top
WLMSE architecture is simple. It is a JBI Based Service Engine which provides worklist and task management functionality. It uses a simple task definition to describe the task related functionality. (More on task definition in later sections)
Following diagram shows the architecture:
The client APIs invoked by a web application (ex: servlet or jsp) is intercepted by JavaEE Service Engine. The web application is secured using the standard J2EE security mechansim available for web application. When the client API is invoked, the subject information about the logged in user is passed along with each call. This subject information is important for WLMSE client API to provide user specific task list etc.
Like any other JBI component, WLMSE processes a service unit (SU) jar as its deployment unit. This SU jar includes task definition, wsdl which binds task in task definition to a wsdl operation, static and dynamic client wsdl, Xform files etc.
Following diagram illustrates a typical interaction between various open jbi components. This also shows how a BPEL business process can invoke a web service operation implemented by Worklist Manager SE for task management.
![]() |
For more information see this presentation
LDAP can be used for authentication, authorization and user management in WLM.
The authentication and authorization for work list client application through LDAP is based on LDAP realm supported in Glassfish and Java EE security model,
in addition to that, WLM integrates LDAP in providing the following feature:
Details on LDAP configuration for WLMSE
Back to Top
MySQL is supported in addition to Derby and Oracle.
Using MySQL, a database named "WORKFLOW" (or something else) must be created using MySQL tools, an account with similar privilege to Oracle user (see Using Oracle in WLM) must be created with an password.
Define datasource
Note: The following statement assumes the user and pwd is root/pwd:
asadmin create-jdbc-connection-pool --host localhost --port 4848 --datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlDataSource --restype javax.sql.DataSource --allownoncomponentcallers=true --property portNumber=3306:user=root:password=pwd:serverName=localhost:databaseName=WORKFLOW WorkflowMySQLPool asadmin create-jdbc-resource --host localhost --port 4848 --connectionpoolid WorkflowMySQLPool jdbc/__workflowMySQL
Make sure you use the created jndi resource and MySQL as data source type for MySQL in wlmse property
Using Oracle, an Oracle User with Password should be created with privileges, for example:
CREATE TABLESPACE "WLMSE_USER_DB" DATAFILE 'WLMSE_USER_DB1.dat' SIZE 2000M, 'WLMSE_USER_DB2.dat' SIZE 2000M; CREATE USER WLMSE_USER IDENTIFIED BY WLMSE_USER DEFAULT TABLESPACE WLMSE_USER_DB QUOTA UNLIMITED ON WLMSE_USER_DB TEMPORARY TABLESPACE temp QUOTA 0M ON system; GRANT CREATE session to WLMSE_USER; GRANT CREATE table to WLMSE_USER; GRANT CREATE procedure to WLMSE_USER; GRANT CREATE sequence to WLMSE_USER; --To run these commands you need to be logged in as " connect sys as sysdba" grant select on sys.dba_pending_transactions to WLMSE_USER; grant select on sys.pending_trans$ to WLMSE_USER; grant select on sys.dba_2pc_pending to WLMSE_USER; grant execute on sys.dbms_system to WLMSE_USER; grant select on SYS.dba_2pc_neighbors to WLMSE_USER; grant force any transaction to WLMSE_USER;
Define datasource
Create jdbc connection pool and jdbc resource for the oracle database in glassfish.
asadmin create-jdbc-connection-pool --host localhost --port 4848 --datasourceclassname oracle.jdbc.pool.OracleDataSource --restype javax.sql.DataSource --allownoncomponentcallers=true --property "portNumber=1521:user=WLMSE_USER:password=WLMSE_USER:serverName=localhost:databaseName=orcl:url=jdbc\:oracle\:thin\:@localhost\:1521\:orcl" WorkflowOraclePool asadmin create-jdbc-resource --host localhost --port 4848 --connectionpoolid WorkflowOraclePool jdbc/__workflowOracle
Set jndi and Oracle type in wlmse property sheet
Make sure you use the created jndi resource and Oracle as data source type for Oracle in wlmse property
![]() |
<message name="GetTaskListRequestMsg">
<part name="queryString" type="ns1:QueryType"/>
<part name="userId" type="xsd:string"/>
<part name="start" type="xsd:int"/>
<part name="pageSize" type="xsd:int"/>
</message>
The GetTaskListRequestMsg in TaskCommon.wsdl is the request msg format for GetTaskList operation. part "start" indicates the start index of a page and the "pageSize" is the number of tasks per page.
Note: If pageSize == 0, no pagination will be done and all tasks will be returned.
The way to determine whether there are more tasks to be returned is in the return msg: GetTaskListResponseMsg
<xsd:complexType name="TaskListType">
<xsd:sequence>
<xsd:element name="totalRecords" type="xsd:int" />
<xsd:element name="returnedRecords" type="xsd:int" />
<xsd:element name="task" type="ns1:TaskType" minOccurs="0" maxOccurs="unbounded">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
totalRecords, returnedRecords and the start part in GetTaskListRequestMsg in conjunction provide information on the current page being returned and the start index of next page (if there is one). If there are no more pages,
returnedRecords will be 0 and no tasks will be returned.
For example:
There are 120 tasks, and GetTaskListRequestMsg1 sets pageSize to be 20 and start = 0, it returns 20 tasks with totalRecords = 120 and returnedRecords = 20, the next page will start with 20, the 3nd page will start with 40 ...
Assuming pageSize = 20 for every page, there will be 6 pages, however if more tasks are created or completed at the same time, the query executes on the current records in the database, therefor totalRecords changes accordingly.
The Sample Worklist Manager Console has built-in pagination that utilizes this feature, pageSize is user configurable on wlm-jsp/wlmEntry.jsp:
<script type="text/javascript">
<!-- User Configurable Begin -->
var refreshInterval = 10000; //default refreshing = 10 sec
var pageStart = 0;
var pageSize = 20; //Pagination Enabled, tasks per page, 0 means no pagination
var savedSort = "id";
var savedDir = "ASC";
<!-- User Configurable End -->
The user guide contains latest tooling bits , samples and instructions to install:
Access Count: 30
StatCounter Access Count :