IBM WebSphere Application ServerTM
Release 6

Package  com.ibm.task.api

Interface Summary
TaskActionIndexThis interface defines symbolic constants to be used as column index when accessing the array of available action flags - see .
LocalHumanTaskManagerLocal EJB interface for Enterprise Bean: HumanTaskManager
LocalHumanTaskManagerHomeThe home interface of the LocalHumanTaskManager session bean.
HumanTaskManagerHomeThe home interface of the HumanTaskManager session bean.
HumanTaskManagerDelegateHumanTaskManagerDelegate wraps the functions of the Human Task Manager API and hides the details of setting up the communication.
ExecutableQueryInterface for customizable queries.
LocalHumanTaskManagerServiceLocalHumanTaskManager defines the human task methods that can be called by a local client.
ReplyHandlerThis interface supports an asynchronous mode of operation.
EscalationAccesses the properties of an escalation instance.
TaskModelWraps task instances and templates that are created spontaneously.
HumanTaskManagerServiceHumanTaskManagerService defines the human task methods that can be called by a local or remote client.
HumanTaskManagerRemote EJB interface for Enterprise Bean: HumanTaskManager
EscalationTemplateAccesses the properties of an escalation template.
TaskActionsThis interface defines symbolic constants for all actions that can be performed on task instances.
TaskTemplateAccesses the properties of a task template.
QueryResultSetProvides the results of a query request.
TaskAccesses the properties of a task instance.
ApplicationComponentAccesses the properties of an application component.
QueryColumnTypeThis interface defines symbolic constants for all column types of a query result set.
StoredQueryAccesses the properties of a query stored persistently.
CustomPropertyDescribes a named custom property.
WorkItemAccesses the properties of a work item.
ValidationProblemDescribes validation problems of task instances or templates that have been created spontaneously (ad hoc).
StaffResultSetReturns the persons or groups that are members of a specific role.
PortalClientSettingInterface for Portal client settings.
JspLocationInterface to retrieve JSP locations of a Web client setting.
WebClientSettingInterface for Web client settings.
CustomClientSettingsInterface for all client and Web client settings.
ClientSettingInterface that supports the definition of user specific client settings.
TKTIDInterface for a task template object identifier.
TKIIDInterface for a task instance object identifier.
ESTIDInterface for an escalation template object identifier.
ESIIDInterface for an escalation instance object identifier.
ACOIDInterface for an application component object identifier.

Class Summary
ClientTaskFactoryFactory to create a ClientTaskFactory object.
HumanTaskManagerDelegateFactoryFactory to create a HumanTaskManagerDelegate object.
StoredQueryPropertyDescribes a property of a stored query.
BinaryCustomPropertyDescribes a custom property that has a binary value.
ReplyHandlerWrapperWraps the reply handler passed to the Human Task Manager.
ClientObjectWrapperWraps messages passed between the caller and the Human Task Manager.
ErrorTypeEnumThis enumeration class defines symbolic constants for error types that are found during validation of objects created on-the-flight.
JspUsageEnumThis enumeration class defines symbolic constants for JSP usage patterns.
JspApplicableRoleEnumThis enumeration class defines symbolic constants for JSP applicable role patterns.

Exception Summary
TaskBusinessExceptionA TaskBusinessException wraps fault responses from tasks.
FaultReplyExceptionA FaultReplyException states that a modelled fault is returned.
WorkItemManagerExceptionA general non-recoverable exception that occured with Work Item Management functions.
QueryUndefinedParameterExceptionException class for error message Api.QueryUndefinedParameter.
ServiceNotUniqueExceptionException class for error message Api.ServiceNotUnique.
EscalationNotAuthorizedExceptionException class for error message Api.EscalationNotAuthorized.
IsNotInlineExceptionException class for error message Api.IsNotInline.
InvalidParameterExceptionException class for error message Api.InvalidParameter.
StaffServiceRuntimeExceptionException class for error message Api.StaffServiceRuntime.
StateObserverErrorException class for error message Api.StateObserver.
SenderAddressInvalidExceptionException class for error message Api.SenderAddressInvalid.
GenericTaskExceptionException class for error message Api.GenericTask.
OutputMessageDefinitionDoesNotMatchExceptionException class for error message Api.OutputMessageDefinitionDoesNotMatch.
WrongTaskTemplateStateExceptionException class for error message Api.WrongTaskTemplateState.
TaskModelNotAuthorizedExceptionException class for error message Api.TaskModelNotAuthorized.
WorkItemDoesNotExistExceptionException class for error message Api.WorkItemDoesNotExist.
TaskTemplateDoesNotExistExceptionException class for error message Api.TaskTemplateDoesNotExist.
ConflictingTypesExceptionException class for error message Api.ConflictingTypes.
IsNotTopLevelTaskExceptionException class for error message Api.IsNotTopLevelTask.
ApplicationVetoExceptionException class for error message Api.ApplicationVeto.
CannotCreateWorkItemExceptionException class for error message Api.CannotCreateWorkItem.
InvalidApplicationStateExceptionException class for error message Api.InvalidApplicationState.
PropertyVetoExceptionException class for error message Api.PropertyVeto.
RunningInstancesExceptionException class for error message Api.RunningInstances.
WrongTaskTemplateKindExceptionException class for error message Api.WrongTaskTemplateKind.
FollowOnTasksNotSupportedExceptionException class for error message Api.FollowOnTasksNotSupported.
QueryUnknownTableExceptionException class for error message Api.QueryUnknownTable.
WrongTaskKindExceptionException class for error message Api.WrongTaskKind.
KeepOutputForCancelClaimNotSupportedExceptionException class for error message Api.KeepOutputForCancelClaimNotSupported.
CoreOTaskServiceResultHasInvalidOutputMessageTypeExceptionException class for error message Core.OTaskServiceResultHasInvalidOutputMessageType.
URLInvalidExceptionException class for error message Api.URLInvalid.
SCAServiceAccessFailureExceptionException class for error message Api.SCAServiceAccessFailure.
TaskIsWaitingForSubTaskExceptionException class for error message Api.TaskIsWaitingForSubTask.
QueryInvalidOperandExceptionException class for error message Api.QueryInvalidOperand.
IsAdHocExceptionException class for error message Api.IsAdHoc.
IsInlineExceptionException class for error message Api.IsInline.
QueryUnknownColumnExceptionException class for error message Api.QueryUnknownColumn.
QueryUnknownOperatorExceptionException class for error message Api.QueryUnknownOperator.
WrongKindExceptionException class for error message Api.WrongKind.
IsNotAdHocExceptionException class for error message Api.IsNotAdHoc.
QueryInvalidTimestampExceptionException class for error message Api.QueryInvalidTimestamp.
MethodNotApplicableExceptionException class for error message Api.MethodNotApplicable.
TaskTerminatedExceptionException class for error message Api.TaskTerminated.
TaskExpiredExceptionException class for error message Api.TaskExpired.
AdminActionExceptionException class for error message Api.AdminAction.
TaskTemplateNotAuthorizedExceptionException class for error message Api.TaskTemplateNotAuthorized.
UserDoesNotExistExceptionException class for error message Api.UserDoesNotExist.
LastAdminWorkItemExceptionException class for error message Api.LastAdminWorkItem.
TaskInstanceActiveExceptionException class for error message Api.TaskInstanceActive.
CoreOTaskServiceInvalidResultExceptionException class for error message Core.OTaskServiceInvalidResult.
InvalidAssignmentReasonExceptionException class for error message Api.InvalidAssignmentReason.
EscalationTemplateNotAuthorizedExceptionException class for error message Api.EscalationTemplateNotAuthorized.
SubTasksNotSupportedExceptionException class for error message Api.SubTasksNotSupported.
CommunicationExceptionException class for error message Api.Communication.
AdministeredObjectDoesNotExistExceptionException class for error message Api.AdministeredObjectDoesNotExist.
IdWrongFormatExceptionException class for error message Api.IdWrongFormat.
UserRegistryExceptionException class for error message Api.UserRegistry.
StoredQueryNameNotUniqueExceptionException class for error message Api.StoredQueryNameNotUnique.
InheritedAccessRightExceptionException class for error message Api.InheritedAccessRight.
AdministratorCannotBeResolvedExceptionException class for error message Api.AdministratorCannotBeResolved.
WrongEscalationStateExceptionException class for error message Api.WrongEscalationState.
UnexpectedFailureExceptionException class for error message Api.UnexpectedFailure.
WrongMessageTypeExceptionException class for error message Api.WrongMessageType.
CoreOTaskServiceResultHasInvalidFaultMessageTypeExceptionException class for error message Core.OTaskServiceResultHasInvalidFaultMessageType.
ParentTaskIsSuspendedExceptionException class for error message Api.ParentTaskIsSuspended.
DataHandlingExceptionException class for error message Api.DataHandling.
EscalationTemplateDoesNotExistExceptionException class for error message Api.EscalationTemplateDoesNotExist.
UnknownAdminOperationExceptionException class for error message Api.UnknownAdminOperation.
ApplicationComponentDoesNotExistExceptionException class for error message Api.ApplicationComponentDoesNotExist.
EverybodyWorkItemExceptionException class for error message Api.EverybodyWorkItem.
TaskDelegationNotSupportedExceptionException class for error message Api.TaskDelegationNotSupported.
ChildTaskInstanceActiveExceptionException class for error message Api.ChildTaskInstanceActive.
CoreOTaskServiceResultHasInvalidFaultMessageQNameExceptionException class for error message Core.OTaskServiceResultHasInvalidFaultMessageQName.
TaskDoesNotExistExceptionException class for error message Api.TaskDoesNotExist.
ConfigurationConnectionNotFoundExceptionException class for error message Configuration.ConnectionNotFound.
IdWrongTypeExceptionException class for error message Api.IdWrongType.
VMMEntityAttributeNotAvailableExceptionException class for error message Api.VMMEntityAttributeNotAvailable.
RefreshTimeoutInvalidExceptionException class for error message Api.RefreshTimeoutInvalid.
InvalidStoredQueryParametersExceptionException class for error message Api.InvalidStoredQueryParameters.
TaskIsEscalatedExceptionException class for error message Api.TaskIsEscalated.
SCAServiceResultErrorExceptionException class for error message Api.SCAServiceResultError.
CoreOTaskServiceRuntimeExceptionReceivedExceptionException class for error message Core.OTaskServiceRuntimeExceptionReceived.
CannotAccessVMMServiceExceptionException class for error message Api.CannotAccessVMMService.
InvalidProtocolExceptionException class for error message Api.InvalidProtocol.
InvalidLengthExceptionException class for error message Api.InvalidLength.
ParameterNullExceptionException class for error message Api.ParameterNull.
NotAuthorizedExceptionException class for error message Api.NotAuthorized.
TaskNotAuthorizedExceptionException class for error message Api.TaskNotAuthorized.
ObjectDoesNotExistExceptionException class for error message Api.ObjectDoesNotExist.
EscalationDoesNotExistExceptionException class for error message Api.EscalationDoesNotExist.
TaskTemplateNotStoppedExceptionException class for error message Api.TaskTemplateNotStopped.
InvalidQNameExceptionException class for error message Api.InvalidQName.
WrongStateExceptionException class for error message Api.WrongState.
WrongTaskStateExceptionException class for error message Api.WrongTaskState.
TaskIsSuspendedExceptionException class for error message Api.TaskIsSuspended.
MessageDefinitionDoesNotMatchExceptionException class for error message Api.MessageDefinitionDoesNotMatch.
FaultMessageDefinitionDoesNotMatchExceptionException class for error message Api.FaultMessageDefinitionDoesNotMatch.
TimeIntervalInvalidExceptionException class for error message Api.TimeIntervalInvalid.
TaskErrorThis class is the base class for all Human Task Manager runtime exceptions.
TaskExceptionThis is the base class for all exceptions thrown by the Human Task Manager.
SystemFaultExceptionDefines an exception which is thrown when during the execution of a task the Human Task Manager itself runs into an error situation.



Package Description

Provides the application programming interface (API) for managing task-related objects in the ProcessChoreographer 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 use WebSphere Integration Developer to add the EJB reference to the deployment descriptor, the binding for the EJB reference is automatically created when the application is deployed.

If your application runs on a different Java Virtual Machine (JVM) from the one where the TaskContainer application runs, complete the following actions:

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);

Note:
Access to the HumanTaskManager session bean does not guarantee that all functions can be executed; the caller must also be authorized for these actions.

When an instance of the HumanTaskManager session bean is created, the container associates a context with the instance of the session bean. The context contains the caller's principal ID, a group membership list, and indicates whether the caller has one of the Human Task Manager J2EE roles, that is, whether the caller belongs to the group of Human Task Manager system administrators or monitors. The context is used by both the container and the Human Task Manager to check the caller's authorization for each call even when global security is not set. If global security is not set, the caller's principal ID has the value 'UNAUTHENTICATED'.

Calls from applications are run 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, avoid running statements similar to the following in parallel:
   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