WebLogic Integration


com.bea.b2b.wlpi
Class WorkflowInstance

java.lang.Object
  |
  +--com.bea.b2b.wlpi.WorkflowInstance

public final class WorkflowInstance
extends java.lang.Object
implements java.io.Serializable, javax.jms.MessageListener

An instance of the WorkflowInstance class represents a WebLogic Process Integrator workflow and can be used to send message to it or start it.

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
Serialized Form

Field Summary
static com.bea.eci.logging.LogOutputStream log
           
static java.lang.String PARTYDC_KEY
           
static java.lang.String PARTYNAME_KEY
           
static java.lang.String PARTYROLE_KEY
           
 
Constructor Summary
WorkflowInstance(java.lang.String bpName, int bpMajor, int bpMinor, java.lang.String role, java.util.Hashtable[] partiesProps)
          Keep this signature for backward compatibility Public WorkflowInstance constructor
WorkflowInstance(java.lang.String bpName, java.lang.String bpMajor, java.lang.String bpMinor, java.lang.String role, java.util.Hashtable[] partiesProps)
          Public WorkflowInstance constructor
 
Method Summary
static WorkflowInstance getInstanceForId(java.lang.String id)
          Create a WorkflowInstance object for the specific Id
 java.lang.String getInstanceId()
          Getter for the WLPI Workflow instance id associated with this WorkflowInstance object
 MessageToken getMsgToken()
          Getter for the token of the last message sent
 java.lang.String getOrgName()
          Getter for the WLPI organization name
 java.lang.String getTemplateName()
          Getter for the WLPI template name
 boolean getTerminateStatus()
          Getter for the workflow termination status
 java.lang.String getTpName()
          Getter for the Trading Partner name associated with this workflow instance
 java.lang.Object getVariable(java.lang.String name)
          Gets the value of the specified instance variable for this workflow instance.
 boolean isCompleted()
          Indicates if the workflow instance is completed its execution
 void postMessage(Message msg)
          Send a business message to the WLPI workflow instance associated with this WorkflowInstance object.
 void postStartWFMessage(Message msg)
           
 void setVariable(java.lang.String name, java.lang.Object value)
          Sets an instance variable for this workflow instance.
 void start()
          Instantiate a workflow for the WLPI template name retrieved from the CPAid identified by the CPA and parties properties passed to the constructor.
 void waitForCompletion()
          Waits for this workflow instance to complete.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static com.bea.eci.logging.LogOutputStream log

PARTYNAME_KEY

public static final java.lang.String PARTYNAME_KEY

PARTYROLE_KEY

public static final java.lang.String PARTYROLE_KEY

PARTYDC_KEY

public static final java.lang.String PARTYDC_KEY
Constructor Detail

WorkflowInstance

public WorkflowInstance(java.lang.String bpName,
                        int bpMajor,
                        int bpMinor,
                        java.lang.String role,
                        java.util.Hashtable[] partiesProps)
                 throws WLPIException
Keep this signature for backward compatibility Public WorkflowInstance constructor

Parameters:
bpName - Business Process Name
bpMajor - Business Process Major Version
bpMinor - Business Process Minor Version
role - Role in business process
partiesProps - Array of hashtable each containing a party name and additional party properties
Throws:
WLPIException - for incorrect arguments or if an error occured allocating underlying resources

WorkflowInstance

public WorkflowInstance(java.lang.String bpName,
                        java.lang.String bpMajor,
                        java.lang.String bpMinor,
                        java.lang.String role,
                        java.util.Hashtable[] partiesProps)
                 throws WLPIException
Public WorkflowInstance constructor

Parameters:
bpName - Business Process Name
bpMajor - Business Process Major Version
bpMinor - Business Process Minor Version
role - Role in business process
partiesProps - Array of hashtable each containing a party name and additional party properties
Throws:
WLPIException - for incorrect arguments or if an error occured allocating underlying resources
Method Detail

getTpName

public java.lang.String getTpName()
Getter for the Trading Partner name associated with this workflow instance

Returns:
Trading partner name

getOrgName

public java.lang.String getOrgName()
Getter for the WLPI organization name

Returns:
WLPI organization name

getTemplateName

public java.lang.String getTemplateName()
Getter for the WLPI template name

Returns:
WLPI template name

getMsgToken

public MessageToken getMsgToken()
Getter for the token of the last message sent

Returns:
last message token

getTerminateStatus

public boolean getTerminateStatus()
Getter for the workflow termination status

Returns:
true if the workflow terminated successfully, false otherwise

isCompleted

public boolean isCompleted()
Indicates if the workflow instance is completed its execution

Returns:
boolean - true or false

waitForCompletion

public void waitForCompletion()
                       throws WLPIException
Waits for this workflow instance to complete.

Throws:
WLPIException - If an error occurred when waiting for the workflow instance to complete.

getInstanceId

public java.lang.String getInstanceId()
Getter for the WLPI Workflow instance id associated with this WorkflowInstance object

Returns:
instance id

setVariable

public void setVariable(java.lang.String name,
                        java.lang.Object value)
                 throws WLPIException
Sets an instance variable for this workflow instance.

Parameters:
name - Variable name.
value - Variable value.
Throws:
WLPIException - If an error occurred when setting the instance variable.

getVariable

public java.lang.Object getVariable(java.lang.String name)
                             throws WLPIException
Gets the value of the specified instance variable for this workflow instance.

Parameters:
name - Variable name.
Returns:
Object - Variable value.
Throws:
WLPIException - If an error occurred when getting the instance variable.

getInstanceForId

public static WorkflowInstance getInstanceForId(java.lang.String id)
                                         throws WLPIException
Create a WorkflowInstance object for the specific Id

Parameters:
id - WLPI instance ID of the workflow.
Returns:
WorkFlowInstance Workflow instance object.
Throws:
WLPIException -  

postMessage

public void postMessage(Message msg)
                 throws WLPIException
Send a business message to the WLPI workflow instance associated with this WorkflowInstance object. If the WLPI workflow instance is not started and was configured with a start node event type of business message then WLPI will automatically starts the workflow when receiving the message

Parameters:
msg - Business message
Throws:
WLPIException - if an error occured during the sending of the message

postStartWFMessage

public void postStartWFMessage(Message msg)
                        throws WLPIException


start

public void start()
           throws WLPIException
Instantiate a workflow for the WLPI template name retrieved from the CPAid identified by the CPA and parties properties passed to the constructor.

Throws:
WLPIException - if an error occured during the workflow start

WebLogic Integration

WebLogic Integration (WLI)