WebLogic Process Integrator Version 1.1

com.bea.wlpi.common
Class InstanceInfo

java.lang.Object
  |
  +--com.bea.wlpi.common.InstanceInfo

public final class InstanceInfo
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

Holds information about a workflow instance.

Objects of this class override the boolean equals(Object) and implement the comparable interface. Homogeneous collections containing objects of this class may, therefore, be searched and sorted using the Collection.contains(Object), List.indexOf(Object), Collections.sort(List) methods.

See Also:
Serialized Form

Field Summary
static int WORKFLOW_STATE_ACTIVE
          Workflow instance is running normally.
static int WORKFLOW_STATE_SUSPENDED
          Workflow instance has been suspended.
 
Constructor Summary
InstanceInfo(java.lang.String id, java.lang.String templateId, java.lang.String templateDefinitionId, java.lang.String name, java.lang.String initiator, java.lang.String parentId, java.sql.Timestamp started, java.sql.Timestamp completed, java.lang.String idString, int state, java.lang.String comment)
          Create a new InstanceInfo object.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compare two InstanceInfo objects.
 boolean equals(java.lang.Object obj)
          Test two InstanceInfo objects for equality.
 java.lang.String getComment()
          Return the human-readable workflow instance comment.
 java.sql.Timestamp getCompleted()
          Return the date/time at which the workflow was completed.
 java.lang.String getId()
          Return the workflow instance ID.
 java.lang.String getIdString()
          Return a human-readable workflow instance label.
 java.lang.String getInitiator()
          Return the workflow initiator ID.
 java.lang.String getName()
          Return the template definition name.
 java.lang.String getParentId()
          Return the parent workflow instance ID.
 java.sql.Timestamp getStarted()
          Return the date/time at which the workflow was instantiated.
 int getState()
          Return the workflow instance state.
 java.lang.String getTemplateDefinitionId()
          Return the workflow template definition ID.
 java.lang.String getTemplateId()
          Return the workflow template ID.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WORKFLOW_STATE_SUSPENDED

public static final int WORKFLOW_STATE_SUSPENDED
Workflow instance has been suspended.

WORKFLOW_STATE_ACTIVE

public static final int WORKFLOW_STATE_ACTIVE
Workflow instance is running normally.
Constructor Detail

InstanceInfo

public InstanceInfo(java.lang.String id,
                    java.lang.String templateId,
                    java.lang.String templateDefinitionId,
                    java.lang.String name,
                    java.lang.String initiator,
                    java.lang.String parentId,
                    java.sql.Timestamp started,
                    java.sql.Timestamp completed,
                    java.lang.String idString,
                    int state,
                    java.lang.String comment)
Create a new InstanceInfo object.
Parameters:
id - The workflow instance ID.
templateId - The ID of the workflow template.
templateDefinitionId - The ID of the workflow template definition.
name - The template definition name.
initiator - The ID of the workflow initiator.
parentId - The ID of the parent workflow instance (when started programmatically as a sub-workflow).
started - The date/time at which the workflow was instantiated.
completed - The date/time at which the workflow was completed.
idString - The human-readable workflow instance label.
state - The workflow instance state: WORKFLOW_STATE_SUSPENDED or WORKFLOW_STATE_ACTIVE.
comment - Human-readable workflow instance comment.
Method Detail

getId

public final java.lang.String getId()
Return the workflow instance ID.
Returns:
The workflow instance ID.

getTemplateId

public final java.lang.String getTemplateId()
Return the workflow template ID.
Returns:
The ID of the workflow template.

getTemplateDefinitionId

public final java.lang.String getTemplateDefinitionId()
Return the workflow template definition ID.
Returns:
The ID of the workflow template definition.

getName

public final java.lang.String getName()
Return the template definition name.
Returns:
The template definition name.

getInitiator

public final java.lang.String getInitiator()
Return the workflow initiator ID.
Returns:
The ID of the workflow initiator.

getParentId

public final java.lang.String getParentId()
Return the parent workflow instance ID.
Returns:
The ID of the parent workflow instance (when started programmatically as a sub-workflow).

getStarted

public final java.sql.Timestamp getStarted()
Return the date/time at which the workflow was instantiated.
Returns:
The date/time at which the workflow was instantiated.

getCompleted

public final java.sql.Timestamp getCompleted()
Return the date/time at which the workflow was completed.
Returns:
The date/time at which the workflow was completed.

getIdString

public final java.lang.String getIdString()
Return a human-readable workflow instance label.
Returns:
The human-readable workflow instance label.

getState

public final int getState()
Return the workflow instance state.
Returns:
The workflow instance state: WORKFLOW_STATE_SUSPENDED or WORKFLOW_STATE_ACTIVE.

getComment

public final java.lang.String getComment()
Return the human-readable workflow instance comment.
Returns:
The human-readable workflow instance comment.

equals

public boolean equals(java.lang.Object obj)
Test two InstanceInfo objects for equality.
Overrides:
equals in class java.lang.Object
Parameters:
obj - The Object with which to compare this one.
Returns:
true if obj is an instance of InstanceInfo with the same ID as this one.
See Also:
compareTo(java.lang.Object)

compareTo

public int compareTo(java.lang.Object o)
Compare two InstanceInfo objects.
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
obj - Object with which to compare this one. Must be null or an instance of InstanceInfo.
Returns:
The result of comparing the started members using the Date.compareTo(Object) method.
Throws:
java.lang.ClassCastException - if o is not an instance of InstanceInfo.
See Also:
equals(java.lang.Object)

WebLogic Process Integrator Version 1.1

WebLogic and Process Integrator are trademarks of BEA Systems, Inc.
Copyright (c) 2000 BEA Systems, Inc., 8920 Woodbine Avenue, Suite 400,
Markham, Ontario L3R 9W9 Canada. All rights reserved.