Enterprise Information Portal APIs

com.ibm.mm.beans.workflow
Class CMBWorkFlowDataManagement

java.lang.Object
  |
  +--com.ibm.mm.beans.workflow.CMBWorkFlowDataManagement
All Implemented Interfaces:
CMBConnectionReplyListener, CMBWorkFlowDataRequestListener, java.util.EventListener, java.beans.PropertyChangeListener, java.io.Serializable

public class CMBWorkFlowDataManagement
extends java.lang.Object
implements java.io.Serializable, java.beans.PropertyChangeListener, CMBConnectionReplyListener, CMBWorkFlowDataRequestListener

This bean provides services to retrieve workflow data. You can obtain an instance of this bean from CMBConnection.

See Also:
CMBConnection, Serialized Form

Constructor Summary
CMBWorkFlowDataManagement()
          Default constructor.
 
Method Summary
 void addCMBExceptionListener(CMBExceptionListener alistener)
          CMBExceptionEvent registration method.
 void addCMBTraceListener(CMBTraceListener alistener)
          CMBTraceEvent registration method.
 void addCMBWorkFlowDataReplyListener(CMBWorkFlowDataReplyListener alistener)
          CMBWorkFlowDataReplyEvent registration method.
 void cancelWorkNotification(java.lang.String itemId, java.lang.String notificationName, java.lang.String owner, int notificationType)
          Cancels a work notification.
 void checkIn(java.lang.String workflowName, java.lang.String nodeName, java.lang.String owner, CMBWorkFlowContainer container)
          Checks in a work item.
 void checkOut(java.lang.String workflowName, java.lang.String nodeName, java.lang.String owner)
          Checks out a work item.
 java.lang.String createProcessInstance(java.lang.String workflowName, java.lang.String workFlowTemplateName, java.lang.String description)
          Create a process instance.
 java.util.Collection getCMBItem(java.util.Collection pidStrings)
          Returns a Collection of CMBItems from a Collection of PidStrings.
 CMBItem getCMBItem(java.lang.String pidString)
          Gets the CMBItem associated with this PidString.
 CMBConnection getConnection()
          Gets the connection bean reference.
 boolean isSuspended(java.lang.String workflowName)
          Checks if a workflow is suspended.
 boolean isTraceEnabled()
          Property getter.
 void onCMBConnectionReply(CMBConnectionReplyEvent evt)
          Implementation of connection reply service method: update the connection handle accordingly.
 void onWorkFlowDataRequest(CMBWorkFlowDataRequestEvent evt)
          Implementation of Data request service method: perform the requested function.
 void propertyChange(java.beans.PropertyChangeEvent evt)
          On property change, import the traceEnabled property value.
 void removeCMBExceptionListener(CMBExceptionListener alistener)
          CMBExceptionEvent unregistration method.
 void removeCMBTraceListener(CMBTraceListener alistener)
          CMBTraceEvent unregistration method.
 void removeCMBWorkFlowDataReplyListener(CMBWorkFlowDataReplyListener alistener)
          CMBWorkFlowDataReplyEvent unregistration method.
 void resume(java.lang.String workflowName, boolean resumeDeep)
          Resumes a workflow.
 void setConnection(CMBConnection conn)
          Set the reference of connection bean.
 void setTraceEnabled(boolean newValue)
          Sets the trace property value.
 void start(java.lang.String workflowName, CMBWorkFlowContainer inContainer)
          Starts a process instance.
 void suspend(java.lang.String workflowName, java.lang.String suspendDateTime, boolean suspendDeep)
          Suspends a workflow for the suspendDateTime .
 void terminate(java.lang.String workflowName)
          Terminates the workflow.
 void transfer(java.lang.String workflowName, java.lang.String nodeName, java.lang.String owner, java.lang.String userID)
          Transfers the work item to another user.
 void transferNotification(java.lang.String itemId, java.lang.String notificationName, java.lang.String owner, java.lang.String userID, int notificationType)
          Transfers the notification to another user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMBWorkFlowDataManagement

public CMBWorkFlowDataManagement()
Default constructor.
Method Detail

onWorkFlowDataRequest

public void onWorkFlowDataRequest(CMBWorkFlowDataRequestEvent evt)
Implementation of Data request service method: perform the requested function. Will fire a CMBWorkFlowDataReplyEvent.
Specified by:
onWorkFlowDataRequest in interface CMBWorkFlowDataRequestListener
Parameters:
evt - a CMBWorkFlowDataRequestEvent

transfer

public void transfer(java.lang.String workflowName,
                     java.lang.String nodeName,
                     java.lang.String owner,
                     java.lang.String userID)
              throws CMBException
Transfers the work item to another user. The workflowName and the node name attributes are required to identify the work item in the workflow system.
Parameters:
workflowName - the workflow name
nodeName - the node name of the work item
owner - the owner of the work item
userID - the userID of the person the work item is being transferred to
Throws:
CMBException -  

transferNotification

public void transferNotification(java.lang.String itemId,
                                 java.lang.String notificationName,
                                 java.lang.String owner,
                                 java.lang.String userID,
                                 int notificationType)
                          throws CMBException
Transfers the notification to another user. To transfer the notification the state of the notification must be one of the following: And the workflow state that the notification is on must be in one of the following states:
Parameters:
itemId - the id of the notification
notificationName - the node name of the notification
owner - the owner of the notification
userID - the userID of the person the work item is being transferred to
notificationType - the notification type
Throws:
CMBException -  

getCMBItem

public CMBItem getCMBItem(java.lang.String pidString)
                   throws CMBServerAccessErrorException,
                          CMBConnectFailedException,
                          CMBException
Gets the CMBItem associated with this PidString.
Parameters:
pidString - the pidString
Throws:
CMBConnectFailedException - if
  • CMB_CONNECT_INVALID_USERID_PASSWD: invalid userid/password
  • CMB_CONNECT_SERVER_UNAVAILABLE: server not available or error occur in server while logging on
CMBServerAccessErrorException - if unable to get access to the server.
CMBException - if there is an error occured in the Content Server. Call CMBException.getErrorData() to get the original exception object.

getCMBItem

public java.util.Collection getCMBItem(java.util.Collection pidStrings)
                                throws CMBServerAccessErrorException,
                                       CMBConnectFailedException,
                                       CMBException
Returns a Collection of CMBItems from a Collection of PidStrings.
Parameters:
pidString - the pidString
Throws:
CMBConnectFailedException - if
  • CMB_CONNECT_INVALID_USERID_PASSWD: invalid userid/password
  • CMB_CONNECT_SERVER_UNAVAILABLE: server not available or error occur in server while logging on
CMBServerAccessErrorException - if unable to get access to the server.
CMBException - if there is an error occured in the Content Server. Call CMBException.getErrorData() to get the original exception object.

suspend

public void suspend(java.lang.String workflowName,
                    java.lang.String suspendDateTime,
                    boolean suspendDeep)
             throws CMBException
Suspends a workflow for the suspendDateTime .
Parameters:
workflowName - the workflow name of the workflow which is being suspended.
suspendDateTime - the time and date to be suspended for. subprocesses is also suspended. The date and time must be in military time in the format: yyyy-mo-dd-hh.mi.ss. Example 1957-12-21-22.23.00 A NULL suspendDateTime means to suspend the item indefinitely. The current state of the workflow process that the item is on must be CMBWorkFlowConstants.CMB_WPN_RUNNING. If the current state of the workflow process is in CMBWorkFlowConstants.CMB_WPN_SUSPENDING or CMBWorkFlowConstants.CMB_WPN_SUSPENDED the workflow process will first be resumed and then suspended using the suspendDateTime.
suspendDeep - if suspendDeep is set to true , processing of all
Throws:
CMBException -  
See Also:
CMBWorkFlowConstants

resume

public void resume(java.lang.String workflowName,
                   boolean resumeDeep)
            throws CMBException
Resumes a workflow.
Parameters:
workflowName - the workflow name of the workflow to be resumed
resumeDeep - if set to true, processing of all subprocesses is also resumed
Throws:
CMBException -  

createProcessInstance

public java.lang.String createProcessInstance(java.lang.String workflowName,
                                              java.lang.String workFlowTemplateName,
                                              java.lang.String description)
                                       throws CMBException
Create a process instance.
Parameters:
workflowName - the workflow name of the process. If the workflow name is null or an empty string a name will be generated by the system. If a workflow name is provided it must be unique or an exception is thrown.
workFlowTemplateName - the name of the workflow template for the process instance
description - the description of the workflow process
Returns:
workflowName the workflow name of the process instance
Throws:
CMBException -  

cancelWorkNotification

public void cancelWorkNotification(java.lang.String itemId,
                                   java.lang.String notificationName,
                                   java.lang.String owner,
                                   int notificationType)
                            throws CMBException
Cancels a work notification. A workNotification is identified in the workflow system by the workNotification attributes: workflow template name, notification name, and notification type.
Parameters:
itemId - the notification unique id
notificationName - the notification name
owner - the owner name
notificationType - the notification type
Throws:
CMBException -  
See Also:
CMBWorkNotification

checkIn

public void checkIn(java.lang.String workflowName,
                    java.lang.String nodeName,
                    java.lang.String owner,
                    CMBWorkFlowContainer container)
             throws CMBException
Checks in a work item. When the work item is checked in the work item state will go to finish and the work item will move to the next node on the workflow. To "check in" a work item, the work item state must be CMBWorkFlowConstants.CMB_WI_CHECKEDOUT and the state of the workflow that the work item is on must have a state of CMBWorkFlowConstants.CMB_WF_READY or CMBWorkFlowConstants.CMB_WF_RUNNING.
Once a user "checks in" a work item, a refresh of the worklist is required to view the latest work.
Before "checking in" a work item you should get the container (CMBWorkFlowQueryService.getContainer(String,String,String)) and determine if the work item is a "workflow value" node. You can determine if the work item is a "workflow value" node by the container method getActivityNode(). If the work item is a "workflow value" node and the container attribute showUserVariableDialog is TRUE then the user variable data in the container should be displayed to the user for input.
Parameters:
workflowName - the workflow name of the workflow which is to be checked in
nodeName - the node name attribute of the work item
owner - the owner attribute of the work item identified
container - the container for the work item. If container is null the default container is used.
Throws:
CMBException -  
See Also:
com.ibm.mm.beans.workflow.CMBWorkFlowDataManagement.checkOut(String,String,String), com.ibm.mm.beans.workflow.CMBWorkFlowQueryService.getContainer(String,String,String), CMBWorkFlowTemplate, CMBWorkFlowConstants

start

public void start(java.lang.String workflowName,
                  CMBWorkFlowContainer inContainer)
           throws CMBException
Starts a process instance.
Before "starting" the process instance you should get the container (CMBWorkFlowQueryService.getContainer(workflowName)) and determine if the user variable data in the container should be displayed to the user for input. The user variable data in the container should be displayed if the container attribute showUserVariableDialog is TRUE.
Parameters:
workflowName - the workflow name of the process instance.
inContainer - the container used to start the workflow. If inContainer is null then default container is used.
Throws:
CMBException -  
See Also:
CMBWorkFlowTemplate, CMBWorkFlowQueryService.getContainer(String)

checkOut

public void checkOut(java.lang.String workflowName,
                     java.lang.String nodeName,
                     java.lang.String owner)
              throws CMBException
Checks out a work item. To Check out a work item, the work item must be in the state CMBWorkFlowConstants.CMB_WI_READY. The workflow the work item is running on must be in the state of CMBWorkFlowConstants.CMB_WF_READY or CMBWorkFlowConstants.CMB_WF_RUNNING. In addition, to "check out" a work item you must be the owner of the work item.
Parameters:
workflowName - the workflow name for the work item
nodeName - the node name of the work item.
owner - the owner of the work item.
Throws:
CMBException -  
See Also:
com.ibm.mm.beans.workflow.CMBWorkFlowQueryService.getState(String,String,String), CMBWorkFlowConstants

terminate

public void terminate(java.lang.String workflowName)
               throws CMBException
Terminates the workflow.
Parameters:
workflowName - the name of the workflow
Throws:
CMBException -  

isSuspended

public boolean isSuspended(java.lang.String workflowName)
                    throws CMBException
Checks if a workflow is suspended.
Parameters:
workflowName - the workflow name
Throws:
CMBException -  

onCMBConnectionReply

public void onCMBConnectionReply(CMBConnectionReplyEvent evt)
Implementation of connection reply service method: update the connection handle accordingly.
Specified by:
onCMBConnectionReply in interface CMBConnectionReplyListener
Parameters:
evt - a CMBConnectionReplyEvent

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
On property change, import the traceEnabled property value.
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
evt - a property changed event

addCMBExceptionListener

public void addCMBExceptionListener(CMBExceptionListener alistener)
CMBExceptionEvent registration method. It ignores a registration request if the listener is already registered.
Parameters:
alistener - listener to be registered

removeCMBExceptionListener

public void removeCMBExceptionListener(CMBExceptionListener alistener)
CMBExceptionEvent unregistration method.
Parameters:
alistener - listener to be unregistered

addCMBTraceListener

public void addCMBTraceListener(CMBTraceListener alistener)
CMBTraceEvent registration method. It ignores a registration request if the listener is already registered.
Parameters:
alistener - listener to be registered

removeCMBTraceListener

public void removeCMBTraceListener(CMBTraceListener alistener)
CMBTraceEvent unregistration method.
Parameters:
alistener - listener to be unregistered

addCMBWorkFlowDataReplyListener

public void addCMBWorkFlowDataReplyListener(CMBWorkFlowDataReplyListener alistener)
CMBWorkFlowDataReplyEvent registration method. It ignores a registration request if the listener is already registered.
Parameters:
alistener - listener to be registered

removeCMBWorkFlowDataReplyListener

public void removeCMBWorkFlowDataReplyListener(CMBWorkFlowDataReplyListener alistener)
CMBWorkFlowDataReplyEvent unregistration method.
Parameters:
alistener - listener to be unregistered

isTraceEnabled

public boolean isTraceEnabled()
Property getter.
Returns:
traceEnabled property value

setTraceEnabled

public void setTraceEnabled(boolean newValue)
Sets the trace property value.
Parameters:
newValue - new trace option value

setConnection

public void setConnection(CMBConnection conn)
Set the reference of connection bean.
Parameters:
conn - reference of connection bean

getConnection

public CMBConnection getConnection()
Gets the connection bean reference.
Returns:
the reference to the CMBConnection object.

EIP JavaBeans

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