wt.workflow.definer
Class WfDefinitionDefaultDelegate

java.lang.Object
  extended bywt.workflow.definer.WfDefinitionDefaultDelegate
All Implemented Interfaces:
Externalizable, Serializable, WfDefinitionDelegate

public class WfDefinitionDefaultDelegate
extends Object
implements WfDefinitionDelegate, Externalizable

Defines the default behavior for all methods that can be called from the WfDefinitionHandler.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static int APPLICATION_TEMPLATE
           
private static int ASSIGNED_ACTIVITY_TEMPLATE
           
private static int BLOCK_TEMPLATE
           
private static String CLASSNAME
           
private static int CONNECTOR_TEMPLATE
           
private static int EXPRESSION
           
private static int EXPRESSION_TEMPLATE
           
private static int EXTERNAL_METHOD_TEMPLATE
           
static long EXTERNALIZATION_VERSION_UID
           
private static int INTERNAL_METHOD_TEMPLATE
           
private static int NODE_TEMPLATE_LINK
           
protected static long OLD_FORMAT_VERSION_UID
           
private static int OTHER_BC_OBJECT
           
private static int OTHER_RBC_OBJECT
           
private static int PROCESS_STEP_TEMPLATE_LINK
           
private static int PROCESS_TEMPLATE
           
private static int PROXY_TEMPLATE
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private static int SYNCHRONIZATION_TEMPLATE
           
private static int TIMER_TEMPLATE
           
private static boolean VERBOSE
           
 
Constructor Summary
WfDefinitionDefaultDelegate()
           
 
Method Summary
private static void deleteApplicationTemplate(WfApplRobotTemplate bt)
          Process the deletion of an WfApplRobotTemplate object.
private static void deleteBlockTemplate(WfBlockTemplate bt)
          Process the deletion of an WfBlockTemplate object.
private static void deleteExpression(WfExpression e)
          Process the deletion of an Expression object.
private static void deleteExpressionTemplate(WfExprRobotTemplate bt)
          Process the deletion of an WfExprRobotTemplate object.
private static void deleteNodeTemplateLink(NodeTemplateLink ntl)
          Process the deletion of an NodeTemplateLink object.
private static void deleteProcessStepTemplateLink(ProcessStepTemplateLink pstl)
          Process the deletion of an ProcessStepTemplateLink object.
private static void deleteProxyTemplate(WfProxyTemplate pt)
          Process the deletion of an WfProxyTemplate object.
private static void deleteSynchronizationTemplate(WfSynchRobotTemplate bt)
          Process the deletion of an WfSynchRobotTemplate object.
private static int getType(Assertion asser)
          Determine the type of object in the Assertion.
private static void handleApplicationTemplate(Assertion asser)
          Process the WfApplRobotTemplate object's assertion.
private static void handleAssignedActivityTemplate(Assertion asser)
          Process the AssignedActivityTemplate object's assertion.
private static void handleBlockTemplate(Assertion asser)
          Process the WfBlockTemplate object's assertion.
private static void handleConnectorTemplate(Assertion asser)
          Process the Connector object's assertion.
private static void handleExpression(Assertion asser)
          Process the Expression's assertion.
private static void handleExpressionTemplate(Assertion asser)
          Process the WfExprRobotTemplate object's assertion.
private static void handleExternalMethodTemplate(Assertion asser)
          Process the ExternalMethodTemplate object's assertion.
private static void handleInternalMethodTemplate(Assertion asser)
          Process the InternalMethodTemplate object's assertion.
private static void handleNodeTemplateLink(Assertion asser)
          Process the NodeTemplateLink link object's assertion.
private static void handleProcessStepTemplateLink(Assertion asser)
          Process the ProcessStepTemplateLink link object's assertion.
private static void handleProcessTemplate(Assertion asser)
          Process the WfProcessTemplate object's assertion.
private static void handleProxyTemplate(Assertion asser)
          Process the WfProxyTemplateLink link object's assertion.
private static void handleSynchronizationTemplate(Assertion asser)
          Process the handleSynchronizationTemplate object's assertion.
private static void handleTimerTemplate(Assertion asser)
          Process the TimerTemplate object's assertion.
 void postProcessAssertion(Assertion asser)
          Given a BatchContainer assertion, perform the post-processing validation on the target object/type of assertion.
 void postValidateAssertion(Assertion asser)
          Given a BatchContainer assertion, perform the post validation on the target object/type of assertion.
 void preValidateAssertion(Assertion asser)
          Given a BatchContainer Assertion, perform the pre-processing validation on the target object/type of assertion.
 void processAssertion(Assertion asser)
          Given a BatchContainer Assertion, process the assertion

Supported API: false
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
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(WfDefinitionDefaultDelegate thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
private static void removeConnectorTemplate(WfConnectorTemplate ct)
          Process the deletion of an Connector template object.
private static void removeProcessTemplate(WfProcessTemplate aWfProcessTemplate)
          Removes process template
private static void removeStepTemplate(WfTemplateObject step_def)
          Removes step template from its containing process.
private static void updateStepTemplate(ProcessStepTemplateLink link, boolean isRemove)
          Updates both the parent process reference and the link reference on the step side of the link.
private static WfApplRobotTemplate validateApplicationTemplate(WfApplRobotTemplate Ap)
           
private static WfAssignedActivityTemplate validateAssignedActivityTemplate(WfAssignedActivityTemplate aat)
           
private static WfBlockTemplate validateBlockTemplate(WfBlockTemplate bt)
           
private static WfConnectorTemplate validateConnectorTemplate(WfConnectorTemplate ct)
           
private static WfExpression validateExpression(WfExpression e)
           
private static WfExprRobotTemplate validateExpressionTemplate(WfExprRobotTemplate Ex)
           
private static WfExternalMethodTemplate validateExternalMethodTemplate(WfExternalMethodTemplate emt)
           
private static WfInternalMethodTemplate validateInternalMethodTemplate(WfInternalMethodTemplate imt)
           
private static NodeTemplateLink validateNodeTemplateLink(NodeTemplateLink ntl)
           
private static ProcessStepTemplateLink validateProcessStepTemplateLink(ProcessStepTemplateLink pstl)
           
private static WfProcessTemplate validateProcessTemplate(WfProcessTemplate pt)
           
private static WfProxyTemplate validateProxyTemplate(WfProxyTemplate pt)
           
private static WfSynchRobotTemplate validateSynchronizationTemplate(WfSynchRobotTemplate Synch)
           
private static WfTimerTemplate validateTimerTemplate(WfTimerTemplate tt)
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

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

PROCESS_TEMPLATE

private static final int PROCESS_TEMPLATE
See Also:
Constant Field Values

ASSIGNED_ACTIVITY_TEMPLATE

private static final int ASSIGNED_ACTIVITY_TEMPLATE
See Also:
Constant Field Values

CONNECTOR_TEMPLATE

private static final int CONNECTOR_TEMPLATE
See Also:
Constant Field Values

EXPRESSION

private static final int EXPRESSION
See Also:
Constant Field Values

INTERNAL_METHOD_TEMPLATE

private static final int INTERNAL_METHOD_TEMPLATE
See Also:
Constant Field Values

EXTERNAL_METHOD_TEMPLATE

private static final int EXTERNAL_METHOD_TEMPLATE
See Also:
Constant Field Values

PROCESS_STEP_TEMPLATE_LINK

private static final int PROCESS_STEP_TEMPLATE_LINK
See Also:
Constant Field Values

NODE_TEMPLATE_LINK

private static final int NODE_TEMPLATE_LINK
See Also:
Constant Field Values

PROXY_TEMPLATE

private static final int PROXY_TEMPLATE
See Also:
Constant Field Values

BLOCK_TEMPLATE

private static final int BLOCK_TEMPLATE
See Also:
Constant Field Values

APPLICATION_TEMPLATE

private static final int APPLICATION_TEMPLATE
See Also:
Constant Field Values

EXPRESSION_TEMPLATE

private static final int EXPRESSION_TEMPLATE
See Also:
Constant Field Values

TIMER_TEMPLATE

private static final int TIMER_TEMPLATE
See Also:
Constant Field Values

SYNCHRONIZATION_TEMPLATE

private static final int SYNCHRONIZATION_TEMPLATE
See Also:
Constant Field Values

OTHER_BC_OBJECT

private static final int OTHER_BC_OBJECT
See Also:
Constant Field Values

OTHER_RBC_OBJECT

private static final int OTHER_RBC_OBJECT
See Also:
Constant Field Values

VERBOSE

private static final boolean VERBOSE
Constructor Detail

WfDefinitionDefaultDelegate

public WfDefinitionDefaultDelegate()
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
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
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(WfDefinitionDefaultDelegate 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

preValidateAssertion

public void preValidateAssertion(Assertion asser)
                          throws WfException,
                                 WTException
Given a BatchContainer Assertion, perform the pre-processing validation on the target object/type of assertion.

Supported API: false

Specified by:
preValidateAssertion in interface WfDefinitionDelegate
Parameters:
asser - the BatchContainer assertion to be processed
Throws:
WfException
WTException

processAssertion

public void processAssertion(Assertion asser)
                      throws WfException,
                             WTException
Given a BatchContainer Assertion, process the assertion

Supported API: false

Specified by:
processAssertion in interface WfDefinitionDelegate
Parameters:
asser - the BatchContainer assertion to be procesed
Throws:
WfException
WTException

postValidateAssertion

public void postValidateAssertion(Assertion asser)
                           throws WfException,
                                  WTException
Given a BatchContainer assertion, perform the post validation on the target object/type of assertion. The WfDefinitionDefaultDelegate ensures that all associations with other objects are valid.

Supported API: false

Specified by:
postValidateAssertion in interface WfDefinitionDelegate
Parameters:
asser - the BatchContainer assertion to be processed
Throws:
WfException
WTException

postProcessAssertion

public void postProcessAssertion(Assertion asser)
                          throws WfException,
                                 WTException
Given a BatchContainer assertion, perform the post-processing validation on the target object/type of assertion. The WfDefinitionDefaultDelegate enables/disables the object, if approriate.

Supported API: false

Specified by:
postProcessAssertion in interface WfDefinitionDelegate
Parameters:
asser - the BatchContainer assertion to be processed
Throws:
WfException
WTException

getType

private static int getType(Assertion asser)
Determine the type of object in the Assertion. Evaluate the type of Container and the type of target object.

Parameters:
asser - The assertion whose object type needs to be determined
Returns:
int An integer representing the object class.

handleProcessTemplate

private static void handleProcessTemplate(Assertion asser)
                                   throws WTException
Process the WfProcessTemplate object's assertion. A WfProcessTemplate can be added or replaced.

Parameters:
asser - The assertion that contains the WfProcessTemplate to be processed.
Throws:
WTException - An error occurred in the persistence of the object.

handleAssignedActivityTemplate

private static void handleAssignedActivityTemplate(Assertion asser)
                                            throws WTException
Process the AssignedActivityTemplate object's assertion. An AssignedActivityTemplate can be added, replaced or deleted. The deletion of a AssignedActivityTemplate triggers the deletion of all objects and links dependent on it.

Parameters:
asser - The assertion that contains the AssignedActivytTemplate to be processed.
Throws:
WTException - An error occurred during the persistence

handleConnectorTemplate

private static void handleConnectorTemplate(Assertion asser)
                                     throws WTException
Process the Connector object's assertion.

Parameters:
asser - The assertion that contains the ConnectorTemplate to be processed.
Throws:
WTException - An error occurred in the persistence of the object.

handleInternalMethodTemplate

private static void handleInternalMethodTemplate(Assertion asser)
                                          throws WTException
Process the InternalMethodTemplate object's assertion. An InternalMethodTemplate can be added, replaced or deleted. The deletion of a InternalMethodTemplate triggers the deletion of all objects and links dependent on it.

Parameters:
asser - The assertion that contains the to be processed.
Throws:
WTException - An error occurred during the persistence

handleTimerTemplate

private static void handleTimerTemplate(Assertion asser)
                                 throws WTException
Process the TimerTemplate object's assertion. An TimerTemplate can be added, replaced or deleted. The deletion of a TimerTemplate triggers the deletion of all objects and links dependent on it.

Parameters:
asser - The assertion that contains the to be processed.
Throws:
WTException - An error occurred during the persistence

handleExternalMethodTemplate

private static void handleExternalMethodTemplate(Assertion asser)
                                          throws WTException
Process the ExternalMethodTemplate object's assertion. An ExternalMethodTemplate can be added, replaced or deleted. The deletion of a ExternalMethodTemplate triggers the deletion of all objects and links dependent on it.

Parameters:
asser - The assertion that contains the to be processed.
Throws:
WTException - An error occurred during the persistence

handleExpression

private static void handleExpression(Assertion asser)
                              throws WTException
Process the Expression's assertion. An Expression can be added, or deleted.

Parameters:
asser - The assertion that contains the PhaseLink to be processed.
Throws:
WTException - An error occurred in the persistence of the link object.

handleProcessStepTemplateLink

private static void handleProcessStepTemplateLink(Assertion asser)
                                           throws WTException
Process the ProcessStepTemplateLink link object's assertion.

Parameters:
asser - The assertion that contains the ProcessStepTemplateLink to be processed.
Throws:
WTException - An error occurred in the persistence of the link object.

updateStepTemplate

private static void updateStepTemplate(ProcessStepTemplateLink link,
                                       boolean isRemove)
                                throws WTException
Updates both the parent process reference and the link reference on the step side of the link. Called by postProcessAssertion when the argument is an assertion involving a link.

Note: Both a reference to the parent template and to the link are kept with the template object for performance reasons (avoid navigate operations).

Parameters:
link - ProcessStepTemplateLink
Throws:
WTException - An error occurred in the persistence of the link object.

handleNodeTemplateLink

private static void handleNodeTemplateLink(Assertion asser)
                                    throws WTException
Process the NodeTemplateLink link object's assertion. An ProcessStepTemplateLink link can

Parameters:
asser - The assertion that contains the NodeTemplateLink to be processed.
Throws:
WTException - An error occurred in the persistence of the link object.

handleProxyTemplate

private static void handleProxyTemplate(Assertion asser)
                                 throws WTException
Process the WfProxyTemplateLink link object's assertion. An ProcessStepTemplateLink link can

Parameters:
asser - The assertion that contains the NodeTemplateLink to be processed.
Throws:
WTException - An error occurred in the persistence of the link object.

handleBlockTemplate

private static void handleBlockTemplate(Assertion asser)
                                 throws WTException
Process the WfBlockTemplate object's assertion.

Parameters:
asser - The assertion that contains the WfBlockTemplateLink to be processed.
Throws:
WTException - An error occurred in the persistence of the link object.

handleExpressionTemplate

private static void handleExpressionTemplate(Assertion asser)
                                      throws WTException
Process the WfExprRobotTemplate object's assertion.

Parameters:
asser - The assertion that contains the WfExprRobotTemplateLink to be processed.
Throws:
WTException - An error occurred in the persistence of the link object.

handleApplicationTemplate

private static void handleApplicationTemplate(Assertion asser)
                                       throws WTException
Process the WfApplRobotTemplate object's assertion.

Parameters:
asser - The assertion that contains the WfApplRobotTemplateLink to be processed.
Throws:
WTException - An error occurred in the persistence of the link object.

handleSynchronizationTemplate

private static void handleSynchronizationTemplate(Assertion asser)
                                           throws WTException
Process the handleSynchronizationTemplate object's assertion.

Parameters:
asser - The assertion that contains the WfSynchRobotTemplateLink to be processed.
Throws:
WTException - An error occurred in the persistence of the link object.

removeProcessTemplate

private static void removeProcessTemplate(WfProcessTemplate aWfProcessTemplate)
                                   throws WTException
Removes process template

Returns:
boolean
Throws:
WTException

removeStepTemplate

private static void removeStepTemplate(WfTemplateObject step_def)
                                throws WTException
Removes step template from its containing process.

Parameters:
step_def -
Returns:
boolean
Throws:
WTException

removeConnectorTemplate

private static void removeConnectorTemplate(WfConnectorTemplate ct)
                                     throws WTException
Process the deletion of an Connector template object.

Parameters:
ct - The connector to be deleted.
Throws:
WTException - An error occurred in the processing of the delete.

deleteExpression

private static void deleteExpression(WfExpression e)
                              throws WTException
Process the deletion of an Expression object.

Parameters:
e - The Expression to be deleted.
Throws:
WTException - An error occurred in the processing of the delete.

deleteProcessStepTemplateLink

private static void deleteProcessStepTemplateLink(ProcessStepTemplateLink pstl)
                                           throws WTException
Process the deletion of an ProcessStepTemplateLink object.

Parameters:
pstl - The step template link to be deleted.
Throws:
WTException

deleteNodeTemplateLink

private static void deleteNodeTemplateLink(NodeTemplateLink ntl)
                                    throws WTException
Process the deletion of an NodeTemplateLink object.

Parameters:
ntl - The node template link to be deleted.
Throws:
WTException

deleteProxyTemplate

private static void deleteProxyTemplate(WfProxyTemplate pt)
                                 throws WTException
Process the deletion of an WfProxyTemplate object.

Parameters:
pt - The node template link to be deleted.
Throws:
WTException

deleteBlockTemplate

private static void deleteBlockTemplate(WfBlockTemplate bt)
                                 throws WTException
Process the deletion of an WfBlockTemplate object.

Parameters:
bt - The block template link to be deleted.
Throws:
WTException

deleteExpressionTemplate

private static void deleteExpressionTemplate(WfExprRobotTemplate bt)
                                      throws WTException
Process the deletion of an WfExprRobotTemplate object.

Parameters:
bt - The Expressiontemplate link to be deleted.
Throws:
WTException

deleteApplicationTemplate

private static void deleteApplicationTemplate(WfApplRobotTemplate bt)
                                       throws WTException
Process the deletion of an WfApplRobotTemplate object.

Parameters:
bt - The WfApplRobotTemplate link to be deleted.
Throws:
WTException

deleteSynchronizationTemplate

private static void deleteSynchronizationTemplate(WfSynchRobotTemplate bt)
                                           throws WTException
Process the deletion of an WfSynchRobotTemplate object.

Parameters:
bt - The WfSynchRobotTemplate link to be deleted.
Throws:
WTException

validateProcessTemplate

private static WfProcessTemplate validateProcessTemplate(WfProcessTemplate pt)
                                                  throws WTException
Throws:
WTException

validateAssignedActivityTemplate

private static WfAssignedActivityTemplate validateAssignedActivityTemplate(WfAssignedActivityTemplate aat)
                                                                    throws WTException
Throws:
WTException

validateConnectorTemplate

private static WfConnectorTemplate validateConnectorTemplate(WfConnectorTemplate ct)
                                                      throws WTException
Throws:
WTException

validateProcessStepTemplateLink

private static ProcessStepTemplateLink validateProcessStepTemplateLink(ProcessStepTemplateLink pstl)
                                                                throws WTException
Throws:
WTException

validateNodeTemplateLink

private static NodeTemplateLink validateNodeTemplateLink(NodeTemplateLink ntl)
                                                  throws WTException
Throws:
WTException

validateExpression

private static WfExpression validateExpression(WfExpression e)
                                        throws WTException
Throws:
WTException

validateInternalMethodTemplate

private static WfInternalMethodTemplate validateInternalMethodTemplate(WfInternalMethodTemplate imt)
                                                                throws WTException
Throws:
WTException

validateTimerTemplate

private static WfTimerTemplate validateTimerTemplate(WfTimerTemplate tt)
                                              throws WTException
Throws:
WTException

validateExternalMethodTemplate

private static WfExternalMethodTemplate validateExternalMethodTemplate(WfExternalMethodTemplate emt)
                                                                throws WTException
Throws:
WTException

validateProxyTemplate

private static WfProxyTemplate validateProxyTemplate(WfProxyTemplate pt)
                                              throws WTException
Throws:
WTException

validateBlockTemplate

private static WfBlockTemplate validateBlockTemplate(WfBlockTemplate bt)
                                              throws WTException
Throws:
WTException

validateExpressionTemplate

private static WfExprRobotTemplate validateExpressionTemplate(WfExprRobotTemplate Ex)
                                                       throws WTException
Throws:
WTException

validateApplicationTemplate

private static WfApplRobotTemplate validateApplicationTemplate(WfApplRobotTemplate Ap)
                                                        throws WTException
Throws:
WTException

validateSynchronizationTemplate

private static WfSynchRobotTemplate validateSynchronizationTemplate(WfSynchRobotTemplate Synch)
                                                             throws WTException
Throws:
WTException