| IBM WebSphere Application ServerTM
Release 6 |
|||||||
PREV NEXT | FRAMES NO FRAMES |
Interface Summary | |
EscalationTemplate | Accesses the properties of an escalation template. |
ApplicationComponent | Accesses the properties of an application component. |
StoredQuery | Accesses the properties of a query stored persistently. |
WorkItem | Accesses the properties of a work item. |
TaskTemplate | Accesses the properties of a task template. |
Task | Accesses the properties of a task instance. |
Escalation | Accesses the properties of an escalation instance. |
LocalHumanTaskManagerHome | The home interface of the LocalHumanTaskManager session bean. |
CustomProperty | Describes a named custom property. |
LocalHumanTaskManager | Local EJB interface for Enterprise Bean: HumanTaskManager |
QueryColumnType | This interface defines symbolic constants for all column types of a query result set. |
HumanTaskManagerDelegate | HumanTaskManagerDelegate wraps the functions of the Human Task Manager API and hides the details of setting up the communication. |
TaskActionIndex | This interface defines symbolic constants to be used as column index when accessing the array of available action flags - see . |
QueryResultSet | Provides the results of a query request. |
TaskModel | Wraps task instances and templates that are created on-the-flight (so-called ad-hoc tasks). |
HumanTaskManagerService | HumanTaskManagerService defines the human task methods that can be called by a local or remote client. |
HumanTaskManager | Remote EJB interface for Enterprise Bean: HumanTaskManager |
HumanTaskManagerHome | The home interface of the HumanTaskManager session bean. |
TaskActions | This interface defines symbolic constants for all actions that can be performed on task instances. |
ValidationProblem | Describes validation problems of task instances or templates that have been created on-the-flight. |
StaffResultSet | Provides the results of a query for persons. |
PortalClientSetting | Interface for Portal client settings. |
JspLocation | Interface to retrieve JSP locations of a Web client setting. |
WebClientSetting | Interface for Web client settings. |
CustomClientSettings | Interface for all client and Web client settings. |
ClientSetting | Interface that supports the definition of user specific client settings. |
TKTID | Interface for a task template object identifier. |
TKIID | Interface for a task instance object identifier. |
ESTID | Interface for an escalation template object identifier. |
ESIID | Interface for an escalation instance object identifier. |
ACOID | Interface for an application component object identifier. |
Class Summary | |
ClientTaskFactory | Factory to create a ClientTaskFactory object. |
HumanTaskManagerDelegateFactory | Factory to create a HumanTaskManagerDelegate object. |
ReplyHandlerWrapper | Wraps the reply handler passed to the Human Task Manager. |
ClientObjectWrapper | Wraps messages passed between the caller and the Human Task Manager. |
ErrorTypeEnum | This enumeration class defines symbolic constants for error types that are found during validation of objects created on-the-flight. |
JspUsageEnum | This enumeration class defines symbolic constants for JSP usage patterns. |
JspApplicableRoleEnum | This enumeration class defines symbolic constants for JSP applicable role patterns. |
Exception Summary | |
TaskBusinessException | A TaskBusinessException wraps fault responses from tasks. |
WorkItemManagerException | A general non-recoverable exception that occured with Work Item Management functions. |
WrongStateException | Exception class for error message Api.WrongState
Thrown when: The task has the wrong state to allow the requested action. |
WrongKindException | Exception class for error message Api.WrongKind
Thrown when: The task has the wrong kind to allow the requested action. |
NotAuthorizedException | Exception class for error message Api.NotAuthorized. |
TaskError | This class is the base class for all Human Task Manager runtime exceptions. |
SystemFaultException | Defines an exception which is thrown when during the execution of a task the Human Task Manager itself runs into an error situation. |
TaskException | This is the base class for all exceptions thrown by the Human Task Manager. |
ObjectDoesNotExistException | Exception class for error message Api.ObjectDoesNotExist. |
Provides the application programming interface (API) for managing task-related objects in the Human Task Manager. You can create application programs that use the API to manage information related to tasks. You can:
The API contains a stateless session bean HumanTaskManager for local and remote access. The HumanTaskManagerService interface describes the functions that can be called locally and remotely. It exposes the functions that can be called by an application program. The application program can be any Java program, including another EJB.
The application program accesses the HumanTaskManager session bean through the bean's home and remote or local interfaces. A reference must be added to your application deployment descriptor. For example, for client applications such as a J2EE client application add the reference to the application-client.xml, for a Web application to the web.xml, and for an EJB application to the ejb-jar.xml.
Add the reference to the remote interface as in the following example:
<ejb-ref> <ejb-ref-name>ejb/HumanTaskManagerHome</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <home>com.ibm.task.api.HumanTaskManagerHome</home> <remote>com.ibm.task.api.HumanTaskManager</remote> </ejb-ref>
Add the reference to the local interface as in the following example:
<ejb-local-ref> <ejb-ref-name>ejb/LocalHumanTaskManagerHome</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local-home>com.ibm.task.api.LocalHumanTaskManagerHome</local-home> <local>com.ibm.task.api.LocalHumanTaskManager</local> </ejb-local-ref>
If you are using the remote interface, then the generated API stubs must be packaged with your application:
Note: If you are using the remote interface, the XSD's describing your messages must be on the classpath.
The HumanTaskManager bean's local or remote home interface is then made available to the client through JNDI by the container where the HumanTaskManager session bean is deployed. To access the remote interface:
// Obtain the default initial JNDI context Context initialContext= new InitialContext(); // Lookup the remote home interface of the HumanTaskManager bean Object result= initialContext.lookup("java:comp/env/ejb/HumanTaskManagerHome"); // Convert the lookup result to the proper type HumanTaskManagerHome home= (HumanTaskManagerHome)javax.rmi.PortableRemoteObject.narrow(result,HumanTaskManagerHome.class);To access the local interface:
// Obtain the default initial JNDI context Context initialContext= new InitialContext(); // Lookup the local home interface of the HumanTaskManager bean LocalHumanTaskManagerHome home= (LocalHumanTaskManagerHome)initialContext.lookup("java:comp/env/ejb/LocalHumanTaskManagerHome");
The home interface contains a create method that returns the HumanTaskManager session bean's remote or local interface. For example, access the remote interface of the session bean:
HumanTaskManager manager= home.create();For example, access the local interface of the session bean:
LocalHumanTaskManager manager= home.create();
When the HumanTaskManager session bean is accessed, the application program can call any of the business functions exposed by the API. For example:
manager.claim(tkiid);
When an instance of the HumanTaskManager session bean is created, the container associates a session context with the instance of the session bean. The session context contains the caller's principal ID and an indication whether the caller belongs to the group of HTM system administrators or monitors. This information is used by both the container and the task manager to check the caller's authorization for each call.
Authorization is always checked by the Human Task Manager, even when checking global security is unset. In the latter case, the caller's principal ID is 'UNAUTHENTICATED' and handled like a normal user ID.
Calls are executed as transactions. A transaction is either established and ended explicitly by the application program, or established by the container when the application progam calls the task manager and ended by the container when the application program receives the result (the deployment descriptor specifies TX_REQUIRED). For example, the application program can establish and end a transaction as follows:
// Obtain user transaction interface UserTransaction transaction= (UserTransaction)intialContext.lookup("jta/usertransaction"); // Begin a transaction transaction.begin(); // Human Task Manager calls ... // On successful return, commit the transaction transaction.commit();Design your own transactions to prevent database deadlocks when multiple transaction instances are running concurrently. For example, the following transaction may result in database deadlocks when run concurrently:
UserTransaction transaction= (UserTransaction)intialContext.lookup("jta/usertransaction"); transaction.begin(); manager.getTask(tkiid); // read-locks the task manager.claim(tkiid); // write-locks the task to update the state transaction.commit();
| IBM WebSphere Application ServerTM
Release 6 |
|||||||
PREV NEXT | FRAMES NO FRAMES |