Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKWorkItemFed

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.DKWorkItemFed
All Implemented Interfaces:
DKConstant, DKConstantFed, DKMessageId, DKMessageIdFed, java.io.Serializable

public class DKWorkItemFed
extends java.lang.Object
implements java.io.Serializable, DKConstantFed, DKMessageIdFed

An object oriented representation of a workitem in the system. A workitem indicates the current location (i.e., a node) in a workflow when the workitem is retrieved.

See Also:
Serialized Form

Fields inherited from interface com.ibm.mm.sdk.common.DKConstantFed
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKConstant
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageIdFed
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKWorkItemFed(dkWorkFlowServiceFed service, java.lang.String workflow_name, java.lang.String name, java.lang.String owner_name)
          Constructs a DKWorkItemFed with the specified workflow service, a workflow name, a node name, and owner name.
 
Method Summary
 void cancel()
          Cancels the workitem.
 void checkIn(DKWorkFlowContainerFed container)
          Checks in the workitem and informs the workflow server that user preocessing has finished.
 void checkOut()
          Checks out a workitem for user processing and changes the state of workitem to DK_FED_FMC_IS_CHECKEDOUT.
 DKTimestamp creationTime()
          Returns the creation time of the workitem.
 java.lang.String description()
          Returns the node description.
 DKWorkFlowContainerFed inContainer()
          Returns a DKWorkFlowContainerFed object associated with the In Container of this workitem.
 DKTimestamp modifiedTime()
          Returns the last modified time of the workiteem.
 java.lang.String name()
          Returns the node name.
 DKTimestamp notificationTime()
          Returns the notification time.
 DKWorkFlowContainerFed outContainer()
          Returns a DKWorkFlowContainerFed object associated with the Out Container of this workitem.
 java.lang.String owner()
          Returns the owner of the worktime.
 int priority()
          Returns the priority of the worktime.
 DKTimestamp receivedTime()
          Returns the received time of the workitem.
 int receiveReason()
          Returns the received reason of the workitem.
 void retrieve()
          Retrieves and refreshes the information of the workitem.
 DKTimestamp startTime()
          Returns the start time of the worktime.
 int state()
          Returns the state of the workitem.
 void transfer(java.lang.String user_id)
          Transfers the workitem to the specified user ID.
 java.lang.String workFlowName()
          Returns the workflow name.
 java.lang.String workFlowTemplateName()
          Returns the workflow template name of the workitem.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DKWorkItemFed

public DKWorkItemFed(dkWorkFlowServiceFed service,
                     java.lang.String workflow_name,
                     java.lang.String name,
                     java.lang.String owner_name)
              throws DKException,
                     java.lang.Exception
Constructs a DKWorkItemFed with the specified workflow service, a workflow name, a node name, and owner name.
Parameters:
service - DkWorkFlowServiceFed object.
workflow_name - name of a workflow.
name - name of a node.
owner_name - name of the owner
Method Detail

name

public java.lang.String name()
                      throws DKException,
                             java.lang.Exception
Returns the node name. return name of the node.

description

public java.lang.String description()
                             throws DKException,
                                    java.lang.Exception
Returns the node description. return description of the node.

state

public int state()
          throws DKException,
                 java.lang.Exception
Returns the state of the workitem. The state can be in one of the following:
Returns:
state of the workitem.
Throws:
DKUsageError - if the DKWorkItemFed object is not retrieved.

workFlowName

public java.lang.String workFlowName()
                              throws DKException,
                                     java.lang.Exception
Returns the workflow name.
Returns:
name of the workflow.

workFlowTemplateName

public java.lang.String workFlowTemplateName()
                                      throws DKException,
                                             java.lang.Exception
Returns the workflow template name of the workitem.
Returns:
name of the workflow template.
Throws:
DKUsageError - if the DKWorkItemFed object is not retrieved.

priority

public int priority()
             throws DKException,
                    java.lang.Exception
Returns the priority of the worktime.
Returns:
the priority of the workitem.
Throws:
DKUsageError - if the DKWorkItemFed object is not retrieved.

owner

public java.lang.String owner()
                       throws DKException,
                              java.lang.Exception
Returns the owner of the worktime.
Returns:
the owner of the worktime.

startTime

public DKTimestamp startTime()
                      throws DKException,
                             java.lang.Exception
Returns the start time of the worktime.
Returns:
DKTimestamp object indicating the start time of the workitem.
Throws:
DKUsageError - if the DKWorkItemFed object is not retrieved.

creationTime

public DKTimestamp creationTime()
                         throws DKException,
                                java.lang.Exception
Returns the creation time of the workitem.
Returns:
DKTimestamp object indicating the creation time of the workitem.
Throws:
DKUsageError - if the DKWorkItemFed object is not retrieved.

notificationTime

public DKTimestamp notificationTime()
                             throws DKException,
                                    java.lang.Exception
Returns the notification time.
Returns:
DKTimestamp object indicating the notification time of the workitem.
Throws:
DKUsageError - if the DKWorkItemFed object is not retrieved.

modifiedTime

public DKTimestamp modifiedTime()
                         throws DKException,
                                java.lang.Exception
Returns the last modified time of the workiteem.
Returns:
DKTimestamp object indicating the last modified time of the workitem.
Throws:
DKUsageError - if the DKWorkItemFed object is not retrieved.

receivedTime

public DKTimestamp receivedTime()
                         throws DKException,
                                java.lang.Exception
Returns the received time of the workitem.
Returns:
DKTimestamp object indicating the received time of the workitem.
Throws:
DKUsageError - if the DKWorkItemFed object is not retrieved.

receiveReason

public int receiveReason()
                  throws DKException,
                         java.lang.Exception
Returns the received reason of the workitem. The reason can be one of the following:
Returns:
the received reason of the workitem.
Throws:
DKUsageError - if the DKWorkItemFed object is not retrieved.

retrieve

public void retrieve()
              throws DKException,
                     java.lang.Exception
Retrieves and refreshes the information of the workitem.

The following code assumes WI is a DKWorkItemFed object.

 WI.retrieve();
 
Throws:
DKUsageError - if the DKWorkItemFed object cannot be retrieved.

checkIn

public void checkIn(DKWorkFlowContainerFed container)
             throws DKException,
                    java.lang.Exception
Checks in the workitem and informs the workflow server that user preocessing has finished.

The following code assumes WI is a retrieved DKWorkItemFed object.

 WI.checkIn();
 
Parameters:
container - DKWorkFlowContainerFed object.
Throws:
DKUsageError - if the DKWorkItemFed object is not retrieved, or the checkin operation fails

checkOut

public void checkOut()
              throws DKException,
                     java.lang.Exception
Checks out a workitem for user processing and changes the state of workitem to DK_FED_FMC_IS_CHECKEDOUT.

The following code assumes WI is a retrieved DKWorkItemFed object.

 WI.checkOut();
 
Throws:
DKUsageError - if the DKWorkItemFed object is not retrieved, or the checkout operation fails.

transfer

public void transfer(java.lang.String user_id)
              throws DKException,
                     java.lang.Exception
Transfers the workitem to the specified user ID.
Parameters:
user_id - user ID.

The following code assumes WI is a retrieved DKWorkItemFed object.

 WI.transfer("USERID");
 
Throws:
DKUsageError - if the DKWorkItemFed object is not retrieved, the transfer operation fails, the workitem is not in the correct state, or the workflow is not in the correct state.

cancel

public void cancel()
            throws DKException,
                   java.lang.Exception
Cancels the workitem.

The following code assumes WI is a retrieved DKWorkItemFed object.

 WI.cancel();
 
Throws:
DKUsageError - if the DKWorkItemFed object is not retrieved, the cancel operation fails, the workitem is not in the correct state, or the workflow is not in the correct state.

inContainer

public DKWorkFlowContainerFed inContainer()
                                   throws DKException,
                                          java.lang.Exception
Returns a DKWorkFlowContainerFed object associated with the In Container of this workitem.

The inContainer method is called to view the container content of a workitem. The following code assumes WI is a retrieved DKWorkItemFed object.

 DKWorkFlowContainerFed con = WI.inContainer();
 
Returns:
a DKWorkFlowContainerFed object.
Throws:
DKUsageError - if the DKWorkItemFed object is not retrieved or the DKWorkFowContainerFed object cannot be retrieved.

outContainer

public DKWorkFlowContainerFed outContainer()
                                    throws DKException,
                                           java.lang.Exception
Returns a DKWorkFlowContainerFed object associated with the Out Container of this workitem.

The outContainer method is called to update the container content of a workitem. The following code assumes WI is a retrieved DKWorkItemFed object.

 DKWorkFlowContainerFed con = WI.outContainer();
 
Returns:
a DKWorkFlowContainerFed object.
Throws:
DKUsageError - if the DKWorkItemFed object is not retrieved or the DKWorkFowContainerFed object cannot be retrieved.

EIP Java APIs

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.