Skip Navigation Links | |
Exit Print View | |
Oracle Java CAPS Worklist Manager Service Engine User's Guide Java CAPS Documentation |
Using the Worklist Manager Service Engine
Worklist Manager Service Engine Overview
Worklist Manager Service Engine Features
Worklist Manager Service Engine Architecture
About the Worklist Manager Console
The Composite Application Project
XPath Expressions in Task Definitions
Worklist Manager Task Validation
Steps to Implement a Worklist Manager Task
Defining Worklist Manager Tasks
(Optional) Connecting to the LDAP Server
(Optional) Installing the Sample Worklist Manager Console Projects
To Install the Sample Worklist Manager Console
Creating the Worklist Module Project
Creating the XML Schema Definition (XSD)
To Create the XML Schema Definition
Creating the Worklist Manager Task Definition
To Create the Worklist Manager Task Definition
Assigning Users and User Groups to a Task
To Assign File Realm Users and Groups to a Task
To Assign LDAP Users and Groups to a Task
Configuring Advanced Task Options
Defining Time Limits and Deadlines for a Task
Defining Automatic Task Escalations
To Define Automatic Escalations
Defining Automatic Task Notifications
To Define Automatic Notifications
To Associate a Notification With a Task Status Change or Escalation
To Configure the Email BC for Task Notification
To Define a Custom Notification
Defining Trigger Actions Using the Mapper
To Define Trigger Actions Using the Mapper
Initializing Variables Using the Mapper
To Initialize Variables Using the Mapper
Creating the Worklist Manager Database
Creating the Worklist Manager Database
Creating the Database for JavaDB (Derby)
Creating the Database for MySQL
Creating the Database for Oracle
Setting the GlassFish JVM Classpath to the Database Drivers
To set the GlassFish JVM Classpath settings
Creating the JDBC Connection Pool and JDBC Resource
To Create the JDBC Connection Pool
Configuring the Service Engine to Use the Worklist Manager Database
To Configure the Service Engine for the Database
Configuring Worklist Manager Service Engine Runtime Properties
To Configure WLM SE Runtime Properties
Worklist Manager Service Engine Runtime Property Descriptions
Defining Worklist Manager Console Security
Defining Worklist Manager Console Security Using a File Realm
To Create a User Login Profile in the File Realm
To Define Security Roles for the Worklist Manager Console
To Map Groups to Security Roles for the Worklist Manager Console
Defining Worklist Manager Console Security Using LDAP
To Create an LDAP Realm in the GlassFish Server
To Update web.xml for the Worklist Manager Console (for LDAP)
To Map User Groups to Security Roles for the Worklist Manager Console (for LDAP)
To Configure the Worklist Manager Service Engine for LDAP
Including the Worklist Manager Task in a BPEL Process
To Include the Worklist Manager Task in a BPEL Process
Creating and Deploying the Composite Application
To Create and Deploy the Composite Application
Testing the Worklist Manager Composite Application
To Run All Test Cases in a Project
Using the Default Worklist Manager Console
Installing and Deploying the Worklist Manager Console Sample
To Install and Deploy the Worklist Manager Console Sample
Logging In to the Worklist Manager Console
To Launch the Worklist Manager Console From a Browser
To Launch the Worklist Manager Console From the GlassFish Admin Console
Using XPath Expressions and Functions in Task Definitions
wlmfn:get-task-owner as xs:string
wlmfn:get-email() as xs:string
wlmfn:get-email($arg as xs:string) as xs:string
wlmfn:get-manager-email() as xs:string
wlmfn:get-manager-email($arg as xs:string) as xs:string
wlmfn:get-manager-uid() as xs:string
wlmfn:get-manager-uid($arg as xs:string) as xs:string
Entering XPath Variables in Design View
Creating Worklist Manager Task Mappings
To Create a Mapping Without Using any Functions
To Use a Function in a Mapping
To Delete a Link or Function From a Mapping
Customizing the Worklist Manager Console
About the Worklist Manager Console
Functionality and UI Semantics Specification
Customizing the Worklist Manager Console
Creating a Custom Worklist Manager Console
Creating the Web Application and Composite Application
To Configure the Web Application
You can customize the sample Worklist Manager Console to update the look and feel, and to extend the functionality. The following topics provide information about how the Worklist Manager Console was designed, the standards implements, and how you can customize it.
The following topic provide information about the technology behind the Worklist Manager Console:
The application itself consists of the following four pages:
Login
The Login page is the first page you see when you open the console in a web browser. It allows you to enter your username and password to authenticate in the system. Additionally this page reappears whenever the HTTP session expires.
Tasks List
The Tasks List page is centered around letting you find the task you are interested in. By default it displays an unfiltered list of tasks that are available (visible) for the logged in user. It provides search capabilities, allowing you to filter the list of tasks to better fit the view you are interested in. Upon selecting a task from the list, you can navigate to the Task Info page for this particular task and assign the task to yourself.
Task Info
On the Task Info page you can view the detailed information about the task (including the task input data, in the format defined by the developer), assign the task to yourself, fill in the task output data, and finally complete the task.
Help
The Help page is ultimately static, simply displaying some text content that describes the usage scenarios for the application.
Given the above pages list, you can define which items need to be directly addressable by the user (from the browser), these include:
Login form
Not-filtered tasks list
Tasks list with a certain filter (search criteria) applied
Particular task info
Particular task action (e.g. checkout or complete)
For the tasks list (both unfiltered and filtered), it should also be possible to address a certain page with a specific page size.
The web application is based on the following APIs, libraries, technologies, and standards.
Server
JSP 2.1
JAX-WS 2.0
Client
XHTML 1.0
CSS 2.1
Javascript 1.6
Document Object Model, Level 1
Communication Protocol
HTTP 1.1
The web application supports the following server-side environment:
GlassFish Enterprise Server v2.1.1
GlassFish ESB 2.2
The web application supports the following browsers and operating systems in the client-side environment.
Browsers
Mozilla Firefox 3.5.x
Microsoft Internet Explorer 7, with all available updates
Microsoft Internet Explorer 8, with all available updates
Safari 4.0.x
Operating Systems
Mac OS X 10.5.x
Windows XP Professional, with all available updates
Windows 7, with all available updates
The following topics describe the pages of the web application, listing all the active UI elements and several passive elements, and describing their purpose and the result of the user actions.
All pages of the web application contain the following elements:
The page header provides helper information for the user as well as some common controls. It includes the following blocks:
Title Block
A static text block showing the title of the web application.
Pages Menu Block
The Pages Menu is a set of links to the most commonly used pages of the application. Currently all of them point to the Tasks List page, but with different filters.
All Tasks link
A link control. If it is activated, the page is reloaded and the Tasks List page appears, showing all tasks visible to the user thfcat are in one of the following states: ASSIGNED, CLAIMED or ESCALATED.
My Tasks link
A link control. If it is activated the page is reloaded and the Tasks List page appears, showing all tasks that are claimed by the current user and are in one of the following states: CLAIMED, COMPLETED or ESCALATED.
Last Query link
A link control. If it is activated, the page is reloaded and the Tasks List page appears, showing the result of the last query run. If there is no such query, the link is not visible.
Other Menu Block
In this section of the menu, auxiliary information is displayed.
Current User Data
A static text block. If a user is logged in, it shows a welcome string together with the user's username. If no user is logged in (such as on the Login page) it shows a note about not being logged in.
Help Link
A link control. When it is activated, the page is reloaded and the Help page appears.
This control shows additional information about the current page and the web application as a whole. It includes the following elements:
Copyright Block
A static text block showing the copyright information.
Debugging Information
A static text block showing debug information about the current page, such as the amount of time it took to generate the page.
The URL of this page is: context-root/login.jsp. In addition to the common page elements the Login page shows the Login form, which allows a user to authenticate in the system using a private username and password combination.
Login Field
A regular text field. You enter a username into the field when logging into the system. There are no limitations on the characters allowed to be entered or the overall length of the field's value because these are dependent on the limitations of the underlying authentication system.
Password Field
A password text field and all characters are hidden. You enter a password into the field when logging into the system. There are no limitations on the characters allowed to be entered or the overall length of the field's value because these are dependent on the limitations of the underlying authentication system.
Submit Button
When this button is activated, the page reloads and the system attempts to log the user in. If the login procedure succeeds, the last opened page appears if the login was due to a session timeout; otherwise the non-filtered variant of the Tasks List appears. If the login procedure fails, the console returns to the Login page and an appropriate error message appears.
The URL of the page is: context-root/index.jsp or just context-root/. In addition to the common page elements the Tasks List page shows the Tasks List Table, which is the main user interface element on the page. The table contains data about all the tasks that are currently available to the user. The tasks are displayed in pages, the display can be controlled by the pages navigator, the page size selector and the sort selector.
If no tasks were found the contents of the table are not shown, instead the user is presented with an appropriate information message. By default the tasks displayed in the table are those that allow any action from the user, which are those in one of the following states: ASSIGNED, ESCALATED, CLAIMED This can be refined using the Advanced search box. Each row in this table corresponds to a single task.
The table includes the following elements:
ID column
This column contains the numeric id of the current task and additionally the background of the column is painted according to the current task's priority. The colors used are defined in the Priorities legend. The column contains only static textual content.
Title Column
This column displays the textual title of the task. If the task does not have a title or it is an empty string, a special string like "<No title>" is displayed. The task title itself is just some static text. This column includes the following control:
Claim Link
This is a regular link. It is shown only for tasks which can be claimed, that is for tasks in ASSIGNED or ESCALATED states. When it is activated the page is reloaded and the Task Info for the current task is shown. The task is moved to the CLAIMED state
Status Column
This column displays the textual name of the current task's state. The column contains only static textual content.
Submitted On Column
This column displays the date and time of the moment when the task was created (submitted to the system). If this moment is today, only the hours and minutes are shown. If the moment is within a week, the date and time (day, month, hours, minutes) are shown. If the moment is at some more distant past, just the date (day, month, year) is shown. The column contains only static textual content.
Assigned To Column
This column shows the names of the groups and users which this task is available to (has been assigned to). If the current task is not assigned to anyone, an m-dash is displayed (which is an impossible situation, as in this case the current user would not see this task). The column contains only static textual content.
Claimed By Column
This column shows the name of the user that this task has been claimed by. If the current task was not claimed by anyone, an m-dash is displayed. The column contains only static textual content.
Deadline Column
This column shows the deadline moment of the current task. Like the Submitted On column, the date is formatted differently based on how far away the given moment is. If the moment is today, it is shown in hours and minutes. If it is within a week, it is shown in day, month, hours, and minutes. If it is in a more distant future, it is shown in day, month, and the year. If the current task has no deadline, an m-dash is displayed.
This control helps you to navigate between the paged list of the available tasks. It is displayed twice, before the Tasks list table and after it. It is a composite control and contains the following elements:
First Link
A regular link. It is active (not static text) if there is a possibility to move to the first page; that is, the user is currently viewing a page with index larger than 1. When it is activated the page is reloaded and the user is taken to the first page of the tasks list. The URL of the page shows this fact in the start query string parameter.
Previous Link
A regular link. It is active (not static text) if there is a possibility to move to the previous page; that is, the user is currently viewing a page with index larger than 1. When it is activated the page is reloaded and the user is taken to the previous page of the tasks list (the one with index less by one). The URL of the page shows this fact in the start query string parameter.
Pages Links
A set of regular links. These links show the closest seven pages of the page list. For example, if the user is viewing the first page the following pages will be shown: 1, 2, 3, 4, 5, 6, 7. If the user is viewing page 7, then 4, 5, 6, 7, 8, 9, 10 are shown. If the user is viewing page 20 and 20 is the last page, then 14, 15, 16, 17, 18, 19, 20 are shown. The current page is not a link, but a regular static text. If there are not enough pages to show (that is. the total amount of pages is less than seven), a reduced set is shows. For example, if the total number of pages is three, the set of links will always contain: 1, 2, 3. When any of the links is activated the page reloads and the user is taken to the corresponding page of tasks list. The URL of the page shows this fact in the start query string parameter.
Next Link
A regular link. It is active (not static text) if there is a possibility to move to the next page; that is, the user is currently viewing a page with index less than the last page's one. When it is activated the page is reloaded and the user is taken to the next page of the tasks list (the one with index less by one). The URL of the page shows this fact in the start query string parameter.
Last Link
A regular link. It is active (not static text) if there is a possibility to move to the last page; that is, if the user is currently viewing a page with index less than the last page's one. When it is activated the page is reloaded and the user is taken to the last page of the tasks list (the one with index less by one). The URL of the page shows this fact in the start query string parameter.
This is a drop-down list. It allows you to define how many tasks should be shown on a single page. The available options are: 10, 20, 50 and 100. When the value of the selector changes, the page is reloaded and the user is presented with the updated list, this field's value on the reloaded page will contain the chosen value. This fact is reflected in the URL of the page in the size query string parameter. The system tries to keep you on the same page you were viewing before changing the size of the page. For example, if you were viewing page with the index 5, you will stay on this page unless there are not enough pages. In the latter case you is taken to the last page of the updated tasks list.
This is a drop-down list. It allows you to define the sort order of the tasks list. The available options are ID, Title, Submitted on, Assigned to, Deadline, Priority, Claimed by, Status. The corresponding sort directions are ascending, ascending, descending, ascending, ascending, descending, ascending, ascending.
When the value of the selector changes the page is reloaded and the user is taken to the same page of the tasks list he was viewing before changing the sort order (that is, the index of the tasks list page stays the same.) This field's value on the reloaded page will contain the chosen value. The sort order is shown in the URL of the page in the order query string parameter.
This is a static block explaining the color values of the task priorities. Basically the priorities are split in three groups: blue (1-3), yellow (4-7) and red (8-10).
This block contains one of the two possible sub-blocks: Basic search box and Advanced search box. By default the Basic search box is visible and the Advanced search box is hidden.
The basic search box allows you to perform a simple text-based search on the tasks list, and includes the following elements:
Search Criteria Field
A regular text field. When performing a basic search, enter the search criteria into this field. There are no limitations on the characters and total length of the field value.
Simple Search Button
A button. When it is activated the page is reloaded and the Tasks List page appears with the tasks list filtered according to the specified search criteria. The value of the Search criteria field in the reloaded page shows the value entered for the search. Additionally the search criteria are shown in the URL of the page in the search query string parameter.
Switch to advanced link
A regular link. When it is activated, the page is not reloaded, the Basic search box is hidden and the Advanced search box is shown instead of it.
This block allows you to define fine-grained search criteria, and includes the following elements:
Status Selector
A multi-select list. It contains the statuses that can be used as search criteria, namely: ASSIGNED, CLAIMED, ESCALATED, COMPLETED, EXPIRED and FAILED. By default ASSIGNED and CLAIMED are selected.
Users Field
A regular text field without any limitations on the allowed characters and the total length. When performing an advanced search, enter the names of the users for the tasks you want to view.
Groups Field
A regular text field without any limitations on the allowed characters and the total length. When performing an advanced search, enter the names of the user groups for the tasks you want to view.
Text Search Field
A regular text field without any limitations on the allowed characters and the total length. This field is the same as the Search criteria field of the Basic search box, and allows the user to enter additional text criteria for an advanced search.
Advanced Search Button
A button. When it is activated, the page reloads and the Tasks List page appears with a list of tasks filtered according to the specified search criteria. The values of the Status Selector, Users Field, Groups Field and Text Search Field in the reloaded page show the values entered for the search, the Basic search box is hidden and Advanced search box is displayed instead. Additionally the search criteria are shown in the URL of the page in the status, users, groups and search query string parameters.
Switch to Simple Link
A regular link. When it is activated, the page is not reloaded, the Advanced search box is hidden and the Basic search box is shown instead.
The URL of the page is: context-root/task.jsp. In addition to the common page elements the Task Info page includes the following elements:
This is a block of static text providing general information about the task being viewed. It includes the following elements:
Task Title and ID
The title of the current task alongside with its numerical ID.
Task Status
The textual representation of the current task's status.
Task Priority
The numerical value of the tasks priority (as opposed to the color coded indicator in ID column of the Tasks list table) .
Task Submitted On
The date time of the task creation (submission) moment. The rules for displaying the date time are the same as in the Submitted on column of the Tasks list table.
Task Deadline
The date time of the task deadline moment. The rules for displaying the date time are the same as in the Deadline column of the Tasks list table. If the current task has no deadline an m-dash is displayed.
Task Assigned To
The names of the groups and users to which this task is available. If the current task is not assigned to anyone, an m-dash is displayed. Note that this is an impossible occurrence as in this case the current user would not see this task.
Task Claimed By
The name of the user who claimed the task. If the current task has not been claimed, an m-dash is displayed.
This block of user interface controls shows the information and the available actions for the current task and its input data. Since this is one of the major points for user-customization, we specify only the default controls here.
Task Input Data Field
A regular multiline text field. It has no limitations on the allowed characters or the total length. The value of the field is the input data (in XML format) of the current task. The text field is never editable because input data should never be modified. You can customize the display of this field according to the types of tasks you expect users to work with.
Claim Button
A regular button. It is available only if the task has not yet been claimed by any user; that is, the task is in one of the following states: ASSIGNED or ESCALATED. When it is activated the page is reloaded and the task is changed to the CLAIMED state.
Reassign Link
A regular link. It is available only if the task has not yet been claimed by any user; that is, the task is in one of the following states: ASSIGNED or ESCALATED. When it is activated the page is not reloaded; the Claim button and the Reassign link are hidden; and the Reassign button, To Users field, To Groups field, and Claim link appear.
Reassign Button
A regular button. It is available only if the task has not yet been claimed by any user; that is, the task is in one of the following states: ASSIGNED or ESCALATED. When it is activated the page is reloaded; the task is moved to the ASSIGNED state; the Assigned To value is set to the values specified in the To Users field and To Groups field; and the Tasks List page appears , filtered according to the last query.
To Users Field
A regular text field without any limitations on the allowed characters or the total length. It is available only if the task has not yet been claimed by any user; that is, the task. is in one of the following states: ASSIGNED or ESCALATED. Enter a space-separated list of user names to reassign the task to.
To Groups Field
A regular text field without any limitations on the allowed characters or the total length. It is available only if the task has not yet been claimed by any user; that is, the task is in one of the following states: ASSIGNED or ESCALATED. Enter a space-separated list of group names to reassign the task to
Claim Link
A regular link. It is available only if the task has not yet been claimed by any user; that is, the task is in one of the following states: ASSIGNED or ESCALATED. It is hidden by default. When it is activated the page is not reloaded, the Reassign button, To Users field, To Groups field, and Claim link are hidden, and the Claim button and the Reassign link appear.
This block of user interface controls shows the information and the available actions for the current task and its output data. Since this is one of the major points for user customization, only the default controls are specified here. This block is shown only if the task is in one of the following states: CLAIMED, COMPLETED, EXPIRED, ESCALATED, or FAILED.
Task Output Field
A regular multiline text field. It has no limitations on the allowed characters or the total length. The value of the field is the output data (in XML format) of the current task. The field is editable only if the task in the CLAIMED state and has been claimed by the current user. A developer may customize the display of this field according to the types of tasks he's expecting the users to work with.
Save Button
A regular button. It is visible only if the task in the CLAIMED state and has been claimed by the current user. When it is activated the page is reloaded and the task's output data is updated according the value specified by the user. If an error occurs when updating the task's output data an error message is displayed, but the Task output field keeps the value entered by the user before attempting to save.
Save and Complete Button
A regular button. It is visible only if the task in the CLAIMED state and has been claimed by the current user. When it is activated the page is reloaded, the task's output data is updated according the value specified by the user and the task is moved to the COMPLETED state. If an error occurs when updating the task's output data an error message is displayed, the task is not moved to the COMPLETED state, but the Task output field keeps the value entered by the user before attempting to save and complete.
Revoke Button Revoke Button
A regular button. It is visible only if the task is in the CLAIMED state and has been claimed by the current user. When it is activated the page is reloaded and the task is moved back to the ASSIGNED state, the "Claimed by" value is cleared.
The URL of the page is: <context-root>/help.jsp. The Help page is inherently very simple. In addition to the common page elements, it shows a block of static text describing the usage scenarios of the web application.
The following topics list the possible customization points of the web application that a developer might use to customize the application. This primarily involves customizing the appearance of the application, localizing the application, correcting security settings, and, most importantly, providing custom forms for different types of tasks.
All paths referenced in the instructions are relative to the sources root of the web application project.
For a list of the functions included in the client API, see WLM Client WSDL API
All style-defining information for the application pages is contained in the CSS style sheets. You can modify these files customize the appearance of the web application.
/web/css/common.css
The style information for the common page elements: global formatting div elements, the header, and the footer.
/web/css/login.css
This file contains the style data for the elements appearing on the Login page, that is for the login form.
/web/css/task.css
The styles for the elements appearing on the Task Info page (the task information block, task input data and the task output data). This is only for common task input and output data; not the task input and output fields themselves.
/web/css/tasks-list.css
The style data for the elements appearing on the Tasks List page (the tasks list table and the pages navigation). The styles for the search box are provided separately.
/web/css/search.css
The style data for the elements appearing on the Tasks List page, namely the search box.
/web/css/handlers/default.css
The styles for the task input data field and the task output data field for their default (non-customized) variants.
/web/css/handlers/purchase-order-sample.css
The styles for the task input data field and the task output data field for the customized forms covering the standard Purchase Order sample for the WLM SE.
The following conventions were used in authorizing the default web application:
All identifiers use CamelCase with no dash or underscore separators.
All CSS classes begin with an uppercase letter.
All element IDs begin with a lowercase letter.
All elements names in HTML are all-lowercase.
All element names in CSS are all-uppercase.
There is only one localizing bundle for the application, which is located at /src/java/com/sun/glassfishesb/wlm/console/Messages.properties. You can add your own localizations according the standard Java rules (appending the language and country elements to the bundle name) and you can alter the current labels to fit the terminology used in your organization.
The application uses container-managed security exclusively. All security bindings are located in /web/WEB-INF/web.xml and /web/WEB-INF/sun-web.xml files. In the web.xml file, it is in the security-constraint and the security-role elements. By default the application accepts users with the staff role. If you need more roles, add more security-role elements and list them within auth-constraint.
The authentication realm used is file, and you can add another realm by editing the realm-name element. For GlassFish, the security roles defined in web.xml need to be mapped to user groups, which is done in the sun-web.xml file in the security-role-mapping element.
In order to customize the display of the task input data field, you need to perform the following steps:
Create the JSP file that will display the input data field and place it in the /web/WEB-INF/handlers/input/ directory.
Edit the /web/WEB-INF/includes/input-handler.jsp file. The if-else statement needs to be updated to make sure the newly created JSP file is included if the current task (represented by the iha_task variable) has the desired type (the iha_task.getTaskDefId() method).
In the actual JSP file that will render the task input data field, the following context is available via request attributes. Following are the attribute names, their types, and their meaning:
com.sun.glassfishesb.wlm.console.locale also defined as LOCALE_ATTRIBUTE in Constants.java.
A java.util.Locale class representing the current locale of the user's browser.
com.sun.glassfishesb.wlm.console.task-id also defined as TASK_ID_ATTRIBUTE in Constants.java.
A java.lang.Long representing the numerical ID of the current task.
com.sun.glassfishesb.wlm.console.user-id also defined as USER_ID_ATTRIBUTE in Constants.java.
A java.lang.String representing the username of the current user.
com.sun.glassfishesb.wlm.console.task also defined as TASK_ATTRIBUTE in Constants.java.
A TaskType class (automatically generated from the WLM SE's WSDL file) representing the current task.
com.sun.glassfishesb.wlm.console.task-input-data also defined as TASK_INPUT_DATA_ATTRIBUTE in Constants.java.
An org.w3c.dom.Element and the XML representation of the task's input data.
The handler JSP file is expected to output the HTML code suitable for display in the web browser.
You can also consult these files to get a better understanding of the processing logic that needs to be defined:
/web/WEB-INF/handlers/input/default.jsp
/web/WEB-INF/handlers/input/purchase-order-sample.jsp
To customize the display and, potentially, the behavior of the task output data field, you need to perform the following steps:
Create the JSP file that will display the output data field and place it in the /web/WEB-INF/handlers/output/ directory.
Edit the /web/WEB-INF/includes/output-handler.jsp file. You need to update the if-else statement to make sure the newly created JSP file is included if the current task (represented by the oha_task variable) has the desired type (the oha_task.getTaskDefId() method).
In the actual JSP file that renders the task output data field, the following context is available through request attributes. Following are the attribute names, their types, and their meaning:
com.sun.glassfishesb.wlm.console.localealso defined as LOCALE_ATTRIBUTE in Constants.java
A java.util.Locale class representing the current locale of the user's browser.
com.sun.glassfishesb.wlm.console.task-id also defined as TASK_ID_ATTRIBUTE in Constants.java
A java.lang.Long representing the numerical ID of the current task.
com.sun.glassfishesb.wlm.console.user-id also defined as USER_ID_ATTRIBUTE in Constants.java
A java.lang.String representing the username of the current user.
com.sun.glassfishesb.wlm.console.task also defined as TASK_ATTRIBUTE in Constants.java
A TaskType class (automatically generated from the WLM SE's WSDL file) representing the current task.
com.sun.glassfishesb.wlm.console.task-input-data also defined as TASK_INPUT_DATA_ATTRIBUTE in Constants.java
An org.w3c.dom.Element and the XML representation of the task's input data.
com.sun.glassfishesb.wlm.console.task-output-data also defined as TASK_OUTPUT_DATA_ATTRIBUTE in Constants.java
An org.w3c.dom.Element and the XML representation of the task's input data.
com.sun.glassfishesb.wlm.console.task-output-handler-mode also defined as TASK_OUTPUT_HANDLER_MODE_ATTRIBUTE in Constants.java
A java.lang.String that can take two values: "output-mode" or "parse-mode". It defines the mode of operation for the task output data handler.
com.sun.glassfishesb.wlm.console.task-output-data-read-only also defined as TASK_OUTPUT_DATA_READ_ONLY_ATTRIBUTE in Constants.java
A java.lang.Boolean indicating whether the handler should render the output data as read-only or read-write.
com.sun.glassfishesb.wlm.console.task-output-data-exception also defined as TASK_OUTPUT_DATA_EXCEPTION_ATTRIBUTE in Constants.java.
A java.lang.Throwable representing the exception that occurred while trying to parse or set the updated task output data. It should be null if no exceptions occurred.
The task output data handler is much more complex than the one for the input data. First it should be able to operate in two modes, and instructions on which mode to use are passed in with the corresponding request attribute. It should either render the output data in HTML, or parse the updated output data. There is no standard way to do this, as the customized handler prepares the input form itself and is the only entity that knows what the request parameter names are and how to use them. Second it should be able to store it into the request attribute. In the latter case the output data handler is expected to prepare the org.w3c.dom.Element object and place it in the com.sun.glassfishesb.wlm.console.task-output-data request attribute.
When in rendering mode, the output handler should watch out for two flags:
Whether the output data is currently read-only (in this case it should not render any input fields and so on)
Whether an exception occurred while parsing or trying to set the updated output data submitted by the user. If an exception occurred the output handler should not use the output data supplied through the request attribute, but use the one submitted by the user so the user can correct the mistakes made while filling out the output data form.
In rendering mode, the handler JSP file is expected to output the HTML code suitable for display in the web browser. You can also consult these files to get a better understanding of the logic that needs to be defined:
/web/WEB-INF/handlers/output/default.jsp
/web/WEB-INF/handlers/output/purchase-order-sample.jsp