wt.workflow.definer
Class WfConnectorTemplate

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.workflow.definer.WfConnectorTemplate
All Implemented Interfaces:
DisplayIdentification, Externalizable, NetFactor, ObjectMappable, Persistable, Serializable, WfNodeTemplate

public class WfConnectorTemplate
extends WTObject
implements WfNodeTemplate, Externalizable

WfConnectorTemplate class serves as a template for WfConnector objects.

Use the newWfConnectorTemplate static factory method(s), not the WfConnectorTemplate constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: false

Extendable: false

See Also:
WfConnector, Serialized Form

Field Summary
private static String CLASSNAME
           
static String CONNECTOR_FUNCTION
          Label for the attribute; Function of the connector.
private static int CONNECTOR_FUNCTION_UPPER_LIMIT
           
static String CONNECTOR_TYPE
          Label for the attribute; Type of the connector.
private static int CONNECTOR_TYPE_UPPER_LIMIT
           
private  WfConnectorFunction connectorFunction
           
private  WfConnectorType connectorType
           
static long EXTERNALIZATION_VERSION_UID
           
static String FIRING_THRESHOLD
          Label for the attribute; For THRESHOLD connectors this is the number of inputs that cause the connector to fire.
private  int firingThreshold
           
protected static long OLD_FORMAT_VERSION_UID
           
private  WfContainerTemplateReference parentTemplate
           
private static String RESOURCE
           
private static int ROUTER_TYPE_UPPER_LIMIT
           
private  WfRouterType routerType
           
(package private) static long serialVersionUID
           
static String TERMINATE_ACTIVITIES
          Label for the attribute; Indicates whether preceding running activities should be terminated upon firing of the threshold.
private  boolean terminateActivities
           
private static int USER_EVENT_LIST_UPPER_LIMIT
           
private  UserEventVector userEventList
           
private  long xCoord
           
private  long yCoord
           
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.workflow.definer.WfNodeTemplate
PARENT_TEMPLATE, ROUTER_TYPE, USER_EVENT_LIST, X_COORD, Y_COORD
 
Fields inherited from interface wt.fc.Persistable
IDENTITY, PERSIST_INFO, TYPE
 
Fields inherited from interface wt.identity.DisplayIdentification
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE
 
Constructor Summary
WfConnectorTemplate()
           
 
Method Summary
 boolean addUserEvent(Object usr_evt)
          Adds a user event to connector.
private  void connectorTypeValidate(WfConnectorType a_ConnectorType)
           
 WfConnectorTemplate copy(WfContainerTemplate parent)
          Produces a transient, shallow copy of the connector template that is contained in the process template passed as argument.
 WfNode createWfNode(WfContainer container)
          Creates a workflow connector using information stored in the template, associated with a given process.
 boolean equals(Object obj)
          Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers.
 String getConceptualClassname()
          Deprecated.  
 WfConnectorFunction getConnectorFunction()
          Gets the value of the attribute: CONNECTOR_FUNCTION.
 WfConnectorType getConnectorType()
          Gets the value of the attribute: CONNECTOR_TYPE.
 Enumeration getDestinationActions()
          Return all events that can occur with the connector as destination of a workflow link.
 int getFiringThreshold()
          Gets the value of the attribute: FIRING_THRESHOLD.
private  int getNumberPredecessors()
          Returns the number of incoming links with that map to 'FIRE' in its eventActionMap.
 WfContainerTemplateReference getParentTemplate()
          Gets the value of the attribute: PARENT_TEMPLATE.
 Enumeration getPredecessors()
          This method returns an enumeration (of type NodeTemplateLink) containing the predecessor links of the template.
 WfRouterType getRouterType()
          Gets the value of the attribute: ROUTER_TYPE.
 Enumeration getSourceEvents()
          Return all events that can occur with the connector as source of a workflow link.
 Enumeration getSuccessors()
          This method returns an enumeration (of type NodeTemplateLink) containing the successor links of the template.
 UserEventVector getUserEventList()
          Gets the value of the attribute: USER_EVENT_LIST.
 Object[] getUserEvents()
          Returns an enumeration containing all defined user events for the connector.
 long getXCoord()
          Gets the value of the attribute: X_COORD.
 long getYCoord()
          Gets the value of the attribute: Y_COORD.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
protected  void initialize(WfContainerTemplate parent)
          Supports initialization, following construction of an instance.
 boolean isTerminateActivities()
          Gets the value of the attribute: TERMINATE_ACTIVITIES.
static WfConnectorTemplate newWfConnectorTemplate(WfContainerTemplate parent)
          Constructor for the connector.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
 void readExternal(PersistentRetrieveIfc input)
          Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(WfConnectorTemplate thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 boolean removeUserEvent(Object usr_evt)
          Removes user event from connector.
 void setConnectorFunction(WfConnectorFunction a_ConnectorFunction)
          Sets the value of the attribute: CONNECTOR_FUNCTION.
 void setConnectorType(WfConnectorType a_ConnectorType)
          Sets the value of the attribute: CONNECTOR_TYPE.
 void setFiringThreshold(int a_FiringThreshold)
          Sets the value of the attribute: FIRING_THRESHOLD.
protected  void setParentTemplate(WfContainerTemplateReference a_ParentTemplate)
          Sets the value of the attribute: PARENT_TEMPLATE.
 void setRouterType(WfRouterType a_RouterType)
          Sets the value of the attribute: ROUTER_TYPE.
 void setTerminateActivities(boolean a_TerminateActivities)
          Sets the value of the attribute: TERMINATE_ACTIVITIES.
 void setUserEventList(UserEventVector a_UserEventList)
          Sets the value of the attribute: USER_EVENT_LIST.
 void setXCoord(long a_XCoord)
          Sets the value of the attribute: X_COORD.
 void setYCoord(long a_YCoord)
          Sets the value of the attribute: Y_COORD.
 String toString()
          Returns string representation of the object.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 void writeExternal(PersistentStoreIfc output)
          Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.
 
Methods inherited from class wt.fc.WTObject
checkAttributes, duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getIdentity, getModifyTimestamp, getPersistInfo, getType, initialize, readVersion, setPersistInfo
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wt.fc.Persistable
checkAttributes, getIdentity, getPersistInfo, getType, setPersistInfo
 
Methods inherited from interface wt.fc.NetFactor
getClassInfo
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

CONNECTOR_FUNCTION

public static final String CONNECTOR_FUNCTION
Label for the attribute; Function of the connector. Determines how inputs are logically combined to fire the connector. Can be one of {AND, OR, XOR, THRESHOLD}. Note: XOR is not presently used.

Supported API: false

See Also:
Constant Field Values

CONNECTOR_FUNCTION_UPPER_LIMIT

private static int CONNECTOR_FUNCTION_UPPER_LIMIT

connectorFunction

private WfConnectorFunction connectorFunction

CONNECTOR_TYPE

public static final String CONNECTOR_TYPE
Label for the attribute; Type of the connector. It can be one of {START, END, DEFAULT and GROUND}. START indicates the connector that initiates a process; END the one the finishes the process; DEFAULT indicates that the connector is used internally to join different activities; GROUND is to be used to indicate the end of a processing branch that is performed asynchronously.

There is exactly one START connector for every process. There should be at least one END connector for every process and zero or more of the DEFAULT and GROUND connectors

Supported API: false

See Also:
Constant Field Values

CONNECTOR_TYPE_UPPER_LIMIT

private static int CONNECTOR_TYPE_UPPER_LIMIT

connectorType

private WfConnectorType connectorType

FIRING_THRESHOLD

public static final String FIRING_THRESHOLD
Label for the attribute; For THRESHOLD connectors this is the number of inputs that cause the connector to fire.

Supported API: false

See Also:
Constant Field Values

firingThreshold

private int firingThreshold

TERMINATE_ACTIVITIES

public static final String TERMINATE_ACTIVITIES
Label for the attribute; Indicates whether preceding running activities should be terminated upon firing of the threshold.

Supported API: false

See Also:
Constant Field Values

terminateActivities

private boolean terminateActivities

xCoord

private long xCoord

yCoord

private long yCoord

ROUTER_TYPE_UPPER_LIMIT

private static int ROUTER_TYPE_UPPER_LIMIT

routerType

private WfRouterType routerType

USER_EVENT_LIST_UPPER_LIMIT

private static int USER_EVENT_LIST_UPPER_LIMIT

userEventList

private UserEventVector userEventList

parentTemplate

private WfContainerTemplateReference parentTemplate

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values
Constructor Detail

WfConnectorTemplate

public WfConnectorTemplate()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class WTObject
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class WTObject
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(WfConnectorTemplate thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(PersistentStoreIfc output)
                   throws SQLException,
                          DatastoreException
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
writeExternal in interface ObjectMappable
Overrides:
writeExternal in class WTObject
Parameters:
output -
Throws:
SQLException
DatastoreException

readExternal

public void readExternal(PersistentRetrieveIfc input)
                  throws SQLException,
                         DatastoreException
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
readExternal in interface ObjectMappable
Overrides:
readExternal in class WTObject
Parameters:
input -
Throws:
SQLException
DatastoreException

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Returns:
String

getConnectorFunction

public WfConnectorFunction getConnectorFunction()
Gets the value of the attribute: CONNECTOR_FUNCTION. Function of the connector. Determines how inputs are logically combined to fire the connector. Can be one of {AND, OR, XOR, THRESHOLD}. Note: XOR is not presently used.

Supported API: false

Returns:
WfConnectorFunction

setConnectorFunction

public void setConnectorFunction(WfConnectorFunction a_ConnectorFunction)
Sets the value of the attribute: CONNECTOR_FUNCTION. Function of the connector. Determines how inputs are logically combined to fire the connector. Can be one of {AND, OR, XOR, THRESHOLD}. Note: XOR is not presently used.

Supported API: false

Parameters:
a_ConnectorFunction -

getConnectorType

public WfConnectorType getConnectorType()
Gets the value of the attribute: CONNECTOR_TYPE. Type of the connector. It can be one of {START, END, DEFAULT and GROUND}. START indicates the connector that initiates a process; END the one the finishes the process; DEFAULT indicates that the connector is used internally to join different activities; GROUND is to be used to indicate the end of a processing branch that is performed asynchronously.

There is exactly one START connector for every process. There should be at least one END connector for every process and zero or more of the DEFAULT and GROUND connectors

Supported API: false

Returns:
WfConnectorType

setConnectorType

public void setConnectorType(WfConnectorType a_ConnectorType)
                      throws WTPropertyVetoException
Sets the value of the attribute: CONNECTOR_TYPE. Type of the connector. It can be one of {START, END, DEFAULT and GROUND}. START indicates the connector that initiates a process; END the one the finishes the process; DEFAULT indicates that the connector is used internally to join different activities; GROUND is to be used to indicate the end of a processing branch that is performed asynchronously.

There is exactly one START connector for every process. There should be at least one END connector for every process and zero or more of the DEFAULT and GROUND connectors

Supported API: false

Parameters:
a_ConnectorType -
Throws:
WTPropertyVetoException

connectorTypeValidate

private void connectorTypeValidate(WfConnectorType a_ConnectorType)
                            throws WTPropertyVetoException
Parameters:
a_ConnectorType -
Throws:
WTPropertyVetoException

getFiringThreshold

public int getFiringThreshold()
Gets the value of the attribute: FIRING_THRESHOLD. For THRESHOLD connectors this is the number of inputs that cause the connector to fire.

Supported API: false

Returns:
int

setFiringThreshold

public void setFiringThreshold(int a_FiringThreshold)
Sets the value of the attribute: FIRING_THRESHOLD. For THRESHOLD connectors this is the number of inputs that cause the connector to fire.

Supported API: false

Parameters:
a_FiringThreshold -

isTerminateActivities

public boolean isTerminateActivities()
Gets the value of the attribute: TERMINATE_ACTIVITIES. Indicates whether preceding running activities should be terminated upon firing of the threshold.

Supported API: false

Returns:
boolean

setTerminateActivities

public void setTerminateActivities(boolean a_TerminateActivities)
Sets the value of the attribute: TERMINATE_ACTIVITIES. Indicates whether preceding running activities should be terminated upon firing of the threshold.

Supported API: false

Parameters:
a_TerminateActivities -

createWfNode

public WfNode createWfNode(WfContainer container)
                    throws WTException
Creates a workflow connector using information stored in the template, associated with a given process.

Supported API: false

Specified by:
createWfNode in interface WfNodeTemplate
Parameters:
container -
Returns:
WfNode
Throws:
WTException

newWfConnectorTemplate

public static WfConnectorTemplate newWfConnectorTemplate(WfContainerTemplate parent)
                                                  throws WTException
Constructor for the connector. Default function is set to 'AND' and default type is set to 'OTHER'.

Supported API: false

Parameters:
parent -
Returns:
WfConnectorTemplate
Throws:
WTException

initialize

protected void initialize(WfContainerTemplate parent)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: false

Parameters:
parent -
Throws:
WTException

toString

public String toString()
Returns string representation of the object. Used mostly for debugging purposes: not appropriate for GUI use.

Supported API: false

Overrides:
toString in class WTObject
Returns:
String

getSourceEvents

public Enumeration getSourceEvents()
Return all events that can occur with the connector as source of a workflow link. In the case of connector there is only one event: firing.

Supported API: false

Specified by:
getSourceEvents in interface WfNodeTemplate
Returns:
Enumeration

getDestinationActions

public Enumeration getDestinationActions()
Return all events that can occur with the connector as destination of a workflow link. Includes firing and enabling/disabling of the connector.

Supported API: false

Specified by:
getDestinationActions in interface WfNodeTemplate
Returns:
Enumeration

copy

public WfConnectorTemplate copy(WfContainerTemplate parent)
                         throws WTException
Produces a transient, shallow copy of the connector template that is contained in the process template passed as argument.

Supported API: false

Parameters:
parent -
Returns:
WfConnectorTemplate
Throws:
WTException

addUserEvent

public boolean addUserEvent(Object usr_evt)
Adds a user event to connector. Makes sense only if the connector's router type is MANUAL or CONDITIONAL.

Supported API: false

Specified by:
addUserEvent in interface WfNodeTemplate
Parameters:
usr_evt -
Returns:
boolean

removeUserEvent

public boolean removeUserEvent(Object usr_evt)
Removes user event from connector.

Supported API: false

Specified by:
removeUserEvent in interface WfNodeTemplate
Parameters:
usr_evt -
Returns:
boolean

getUserEvents

public Object[] getUserEvents()
Returns an enumeration containing all defined user events for the connector.

Supported API: false

Specified by:
getUserEvents in interface WfNodeTemplate
Returns:
Object[]

getXCoord

public long getXCoord()
Gets the value of the attribute: X_COORD. X coordinate of the template's position.

Supported API: false

Specified by:
getXCoord in interface WfNodeTemplate
Returns:
long

setXCoord

public void setXCoord(long a_XCoord)
               throws WTPropertyVetoException
Sets the value of the attribute: X_COORD. X coordinate of the template's position.

Supported API: false

Specified by:
setXCoord in interface WfNodeTemplate
Parameters:
a_XCoord -
Throws:
WTPropertyVetoException

getYCoord

public long getYCoord()
Gets the value of the attribute: Y_COORD. Y coodinate of the template's position.

Supported API: false

Specified by:
getYCoord in interface WfNodeTemplate
Returns:
long

setYCoord

public void setYCoord(long a_YCoord)
               throws WTPropertyVetoException
Sets the value of the attribute: Y_COORD. Y coodinate of the template's position.

Supported API: false

Specified by:
setYCoord in interface WfNodeTemplate
Parameters:
a_YCoord -
Throws:
WTPropertyVetoException

getRouterType

public WfRouterType getRouterType()
Gets the value of the attribute: ROUTER_TYPE. Type of the router (NONE, MANUAL, or CONDITIONAL).

Supported API: false

Specified by:
getRouterType in interface WfNodeTemplate
Returns:
WfRouterType

setRouterType

public void setRouterType(WfRouterType a_RouterType)
Sets the value of the attribute: ROUTER_TYPE. Type of the router (NONE, MANUAL, or CONDITIONAL).

Supported API: false

Specified by:
setRouterType in interface WfNodeTemplate
Parameters:
a_RouterType -

getUserEventList

public UserEventVector getUserEventList()
Gets the value of the attribute: USER_EVENT_LIST. Event list associated to the node. Makes sense only for router nodes.

Supported API: false

Specified by:
getUserEventList in interface WfNodeTemplate
Returns:
UserEventVector

setUserEventList

public void setUserEventList(UserEventVector a_UserEventList)
Sets the value of the attribute: USER_EVENT_LIST. Event list associated to the node. Makes sense only for router nodes.

Supported API: false

Specified by:
setUserEventList in interface WfNodeTemplate
Parameters:
a_UserEventList -

getParentTemplate

public WfContainerTemplateReference getParentTemplate()
Gets the value of the attribute: PARENT_TEMPLATE. Reference to parent template. Null if template has no parent.

Supported API: false

Specified by:
getParentTemplate in interface WfNodeTemplate
Returns:
WfContainerTemplateReference

setParentTemplate

protected void setParentTemplate(WfContainerTemplateReference a_ParentTemplate)
Sets the value of the attribute: PARENT_TEMPLATE. Reference to parent template. Null if template has no parent.

Supported API: false

Parameters:
a_ParentTemplate -

getSuccessors

public Enumeration getSuccessors()
                          throws WTException
This method returns an enumeration (of type NodeTemplateLink) containing the successor links of the template. For non-embedded templates, this enumeration is empty, of course.

Supported API: false

Specified by:
getSuccessors in interface WfNodeTemplate
Returns:
Enumeration
Throws:
WTException

getPredecessors

public Enumeration getPredecessors()
                            throws WTException
This method returns an enumeration (of type NodeTemplateLink) containing the predecessor links of the template. For non-embedded templates, this enumeration is empty, of course.

Supported API: false

Specified by:
getPredecessors in interface WfNodeTemplate
Returns:
Enumeration
Throws:
WTException

equals

public boolean equals(Object obj)
Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers. Changed or stale copies are still considered equal by this method. Delegates to PersistenceHelper.equals(Persistable,Object).

Warning: Certain core Windchill operations may depend upon equals being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
equals in class WTObject
Parameters:
obj -
Returns:
boolean

hashCode

public int hashCode()
Returns a hash code for this object based upon its ObjectIdentifier. Delegates to PersistenceHelper.hashCode(Persistable).

Warning: Certain core Windchill operations may depend upon hashCode being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
hashCode in class WTObject
Returns:
int

getNumberPredecessors

private int getNumberPredecessors()
                           throws WTException
Returns the number of incoming links with that map to 'FIRE' in its eventActionMap.

Returns:
number of predecessors of connector.
Throws:
WTException