You can create a custom Worklist Manager Console by calling the client API, TaskCommonService, provided by the Worklist Manager Service Engine. The API is defined in the TaskCommon.wsdl file, which is generated by building the Worklist Module project.
TaskCommon.wsdl is an abstract WSDL document with no bindings or services. You need to make the WSDL document concrete by adding bindings and services for the document. The following procedure does not provide detailed information for adding bindings and services. Refer to the user documentation for the type of binding you are adding for more information.
This task requires that you have already created and built the Worklist Module project that defines the tasks.
Create a web application project in the NetBeans IDE that defines the Worklist Manager Console.
Copy the TaskCommon.wsdl file from the Worklist Module project build directory into the web application project.
This file is located in the Worklist Module project home directory under the /build folder.
From the web application project, open the newly copied TaskCommon.wsdl file in the WSDL Editor.
In WSDL view, right-click Bindings and select Add Binding to add any necessary bindings and services to the file.
When you add the bindings from the WSDL view, the binding operations are created automatically.
Do the following to create a Web Service Client in the web application that invokes TaskCommonService in TaskCommon.wsdl.
You can specify the package name for the Web Service Client rather than using a wrapper. To specify the package name, do the following:
Expand Web Service Reference, right-click TaskCommon, and then select Edit Web Service Attributes.
The attribute editor appears.
Click the WSDL Customization tab, and then expand Global Customization.
Deselect the Use Default check box, and enter the following class as the package name:
com.sun.workflow.client
Click OK, and then click OK on the information dialog box.
Clean and build the web application project.
This generates the client stub classes in the build/generated folder.
Define you custom Worklist Manager Console web pages. Use the generated classes in your web application to invoke operations from TaskCommon.wsdl.
For a reference of the client API, see WLM Client WSDL API.
In the NetBeans Projects window, create a new composite application project.
Drag the web application project you created above to the JBI Module section of the CASA Editor.
Build the composite application.
A SOAP endpoint is added, along with a connector to JBI module.
Delete the connector between the endpoint and JBI module.
Right-click the SOAP provide endpoint, and select Properties. On the Properties window that appears, click Disable in BC, and then click Close.
Drag an External Service Unit from the palette to the External Modules section (left panel) of the CASA Editor.
Name the External Service Unit WLMSE-TaskCommon.
Drag a Provide endpoint to the new service unit. Right-click the endpoint and click Properties. Configure the endpoint as follows:
Click the ellipsis next to the Interface Name property. On the Editor that appears, enter TaskCommonPortType as the Local Name and enter ns1:http://jbi.com.sun/wfse/wsdl/TaskCommon as the Namespace.
Click the ellipsis next to the Service Name property. On the Editor that appears, enter TaskCommonService as the Local Name and enter ns1:http://jbi.com.sun/wfse/wsdl/TaskCommon as the Namespace.
Name the endpoint TaskCommonPort.
The completed properties should look similar to the following figure.
Link the JBI Module with the External Service Unit.
Build and deploy the composite application.
The composite application should appear similar to the following figure.
The WLM SE provides a static WSDL file that exposes several functions that allow a web service to obtain task-related information from the Worklist Manager database.
The GetTaskList function is called when a user performs a query for tasks. It returns a worklist of tasks that match the criteria that are passed in as parameters.
The GetTask function returns a task whose task ID and user name match those that are passed in as parameters.
The ClaimTask function is called when a user claims a task. It changes the status of a task to Claimed and adds the user name of the person who claimed the task to the task properties. It returns a result code of SUCCESS or FAILED.
The CompleteTask function is called when a user marks a task as complete. It changes the status of a task to Complete and returns a result code of SUCCESS or FAILED.
The GetTaskInput function retrieves the data from the input message for the task that matches the given task ID and user name.
The GetTaskOutput functions retrieves the data for the output message for the task that matches the given task ID and user name.
The SetTaskOutput function sets the data for the output message for the task that matches the given task ID and user name. It returns a result code of SUCCESS or FAILED.
The ReassignTask function reassigns the task with the given task ID to the specified user. It returns a result code of SUCCESS or FAILED.
The RevokeTask function reverses a claim made to the task with the given task ID and reverts the Claimed By property to its previous value. It returns a result code of SUCCESS or FAILED.