wt.change2.process
Class ProcessHelper

java.lang.Object
  extended bywt.change2.process.ProcessHelper
All Implemented Interfaces:
Externalizable, Serializable

public class ProcessHelper
extends Object
implements Externalizable

This class contains static methods to support the Change Management objects' workflow processes. These methods are intended to be called by routing expressions and synchronization robot expressions.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
static String CANCELLED
          

Supported API: true
private static String CLASSNAME
           
static String COMPLETE
          

Supported API: true
static String CRITICAL
          

Supported API: true
static long EXTERNALIZATION_VERSION_UID
           
static String NO_SUBORDINATES
          

Supported API: true
static String NON_CRITICAL
          

Supported API: true
static String NOT_ASSOCIATED
          

Supported API: true
static String NOT_FINISHED
          

Supported API: true
static String NOT_SUBMITTED
          

Supported API: true
protected static long OLD_FORMAT_VERSION_UID
           
private static WTPreferences pref
           
static String RELEASE_NOTICE_NAME
          The PTC-defined name of the Release Notice Soft-Type

Supported API: true
private static String RESOURCE
           
(package private) static long serialVersionUID
           
static String SIMPLIFIED_CHANGE_PREFERENCE_KEY_NAME
           
static String SIMPLIFIED_CHANGE_PREFERENCE_NODE_NAME
           
 
Constructor Summary
ProcessHelper()
           
 
Method Summary
static String checkAnalysisActivitiesFinished(ChangeAnalysis cAnalysis)
          Determine if the passed Change Analysis (Change Proposal or Change Investigation) has any pending Analysis Activities.
static String checkAnalysisActivitiesFinished(ChangeInvestigation cInvestigation)
          Determine if the associated Change Investigation has any pending Analysis Activities.
static String checkChangeActivitiesFinished(ChangeOrder2 cOrder)
          Determine if the passed Change Order has any pending Change Activities.
static String checkInvestigationsFinished(ChangeRequest2 cRequest)
          Determine if the passed Change Request has any pending Change Investigations.
static Boolean checkIssueFormalized(WTChangeIssue cIssue)
          Determine if the passed Change Issue has been formalized into a Change Request.
static String checkLifeCycleManagedFinished(LifeCycleManaged life_cycle_managed)
           
private static String checkLifeCycleManagedFinished(QueryResult result)
           
static String checkOrdersFinished(ChangeRequest2 cRequest)
          Determine if the passed Change Request has any pending Change Orders.
static String checkProposalsFinished(ChangeRequest2 cRequest)
          Determine if the passed Change Request has any pending Change Proposals.
static String checkRequestFinished(WTChangeIssue cIssue)
          Determine if the parent Change Request is in state "Complete" or "Cancelled." Returns ProcessHelper.COMPLETE if the parent Change Request is in state "Complete." Returns ProcessHelper.CANCELLED if the parent Change Request is in state "Cancelled." Returns ProcessHelper.NOT_ASSOCIATED if the Change Issue has no parent Change Request.
static String checkRequestFinished(WTChangeRequest2 cRequest)
          Determine if the passed Change Request is in state "Complete" or "Cancelled." Returns ProcessHelper.COMPLETE if the Change Request is in state "Complete." Returns ProcessHelper.CANCELLED if the Change Request is in state "Cancelled."

Supported API: false
static String checkRequestSubmitted(ChangeItem cItem)
          Determine if the parent Change Request has been submitted and returns the complexity of the change.
static String getComplexity(ChangeItem cItem)
          Determine the complexity of the change based on parent Change Request of the passed Change Item.
static String getIssuePriority(WTChangeIssue cIssue)
          Determine if the passed Change Issue is critical or non-critical.
static boolean isCMIIDefaultChangeProcess()
          This method will return whether the Default Change Process is the CMII Closed-Loop change process or the default Change2 implementation.
static boolean isCMIIStandAlone()
          This method will return whether CMII is stand alone or is running within a PDMLink environment.
static boolean isSimplifiedChangeEnabled()
          This method will return whether Simplified Change process is present in the system.
static boolean isSimplifiedChangeStandAlone()
          This method will return whether the Simplified Change is the only Change system present in the system, or if the system is configured as Simplified Change and the CMII process.
static void main(String[] args)
           
 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(ProcessHelper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
static void setSimplifiedChangeStandAlone(boolean standalone)
          This method will set whether the Simplified Change System is the only change system in the infrastructure, or if it is shared with the Windchill CMII process.
 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

CRITICAL

public static final String CRITICAL


Supported API: true

See Also:
Constant Field Values

NON_CRITICAL

public static final String NON_CRITICAL


Supported API: true

See Also:
Constant Field Values

COMPLETE

public static final String COMPLETE


Supported API: true

See Also:
Constant Field Values

CANCELLED

public static final String CANCELLED


Supported API: true

See Also:
Constant Field Values

NOT_ASSOCIATED

public static final String NOT_ASSOCIATED


Supported API: true

See Also:
Constant Field Values

NOT_FINISHED

public static final String NOT_FINISHED


Supported API: true

See Also:
Constant Field Values

NO_SUBORDINATES

public static final String NO_SUBORDINATES


Supported API: true

See Also:
Constant Field Values

NOT_SUBMITTED

public static final String NOT_SUBMITTED


Supported API: true

See Also:
Constant Field Values

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

RELEASE_NOTICE_NAME

public static final String RELEASE_NOTICE_NAME
The PTC-defined name of the Release Notice Soft-Type

Supported API: true

See Also:
Constant Field Values

pref

private static WTPreferences pref

SIMPLIFIED_CHANGE_PREFERENCE_NODE_NAME

public static final String SIMPLIFIED_CHANGE_PREFERENCE_NODE_NAME
See Also:
Constant Field Values

SIMPLIFIED_CHANGE_PREFERENCE_KEY_NAME

public static final String SIMPLIFIED_CHANGE_PREFERENCE_KEY_NAME
See Also:
Constant Field Values
Constructor Detail

ProcessHelper

public ProcessHelper()
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(ProcessHelper 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

getIssuePriority

public static String getIssuePriority(WTChangeIssue cIssue)
Determine if the passed Change Issue is critical or non-critical. Returns ProcessHelper.CRITICAL if the issue has IssuePriority "Emergency", and ProcessHelper.NON_CRITICAL otherwise.

Supported API: true

Parameters:
cIssue -
Returns:
String

checkIssueFormalized

public static Boolean checkIssueFormalized(WTChangeIssue cIssue)
                                    throws ChangeException2,
                                           WTException
Determine if the passed Change Issue has been formalized into a Change Request. Returns true if the passed Change Issue is related to a Change Request through a Formalized By association. Returns false otherwise.

Supported API: true

Parameters:
cIssue -
Returns:
Boolean
Throws:
ChangeException2
WTException

checkRequestFinished

public static String checkRequestFinished(WTChangeIssue cIssue)
                                   throws ChangeException2,
                                          WTException
Determine if the parent Change Request is in state "Complete" or "Cancelled." Returns ProcessHelper.COMPLETE if the parent Change Request is in state "Complete." Returns ProcessHelper.CANCELLED if the parent Change Request is in state "Cancelled." Returns ProcessHelper.NOT_ASSOCIATED if the Change Issue has no parent Change Request.

Supported API: true

Parameters:
cIssue -
Returns:
String
Throws:
ChangeException2
WTException

getComplexity

public static String getComplexity(ChangeItem cItem)
                            throws ChangeException2,
                                   WTException
Determine the complexity of the change based on parent Change Request of the passed Change Item. If the Change Request is a WTChangeRequest2, then it returns the String value of the Complexity Enumerated Type as stored on the Change Item's parent Change Request; otherwise returns the empty string "".

Supported API: true

Parameters:
cItem -
Returns:
String
Throws:
ChangeException2
WTException

checkAnalysisActivitiesFinished

public static String checkAnalysisActivitiesFinished(ChangeInvestigation cInvestigation)
                                              throws ChangeException2,
                                                     WTException
Determine if the associated Change Investigation has any pending Analysis Activities. Returns ProcessHelper.COMPLETE if at least one Change Activity is in state "Complete" and the rest are in state "Complete" or "Cancel." Returns ProcessHelper.CANCELLED if all Analysis Activities are in state "Cancelled." Returns ProcessHelper.NOT_FINISHED if at least one Analysis Activity is pending (i.e. has not reached either state "Complete" or "Cancelled").

Supported API: true

Parameters:
cInvestigation -
Returns:
String
Throws:
ChangeException2
WTException

checkAnalysisActivitiesFinished

public static String checkAnalysisActivitiesFinished(ChangeAnalysis cAnalysis)
                                              throws ChangeException2,
                                                     WTException
Determine if the passed Change Analysis (Change Proposal or Change Investigation) has any pending Analysis Activities. Returns ProcessHelper.COMPLETE if at least one Change Activity is in state "Complete" and the rest are in state "Complete" or "Cancel." Returns ProcessHelper.CANCELLED if all Analysis Activities are in state "Cancelled." Returns ProcessHelper.NOT_FINISHED if at least one Analysis Activity is pending (i.e. has not reached either state "Complete" or "Cancelled").

Supported API: true

Parameters:
cAnalysis -
Returns:
String
Throws:
ChangeException2
WTException

checkProposalsFinished

public static String checkProposalsFinished(ChangeRequest2 cRequest)
                                     throws ChangeException2,
                                            WTException
Determine if the passed Change Request has any pending Change Proposals. Returns ProcessHelper.COMPLETE if at least one Change Proposal is in state "Complete" and the rest are in state "Complete" or "Cancel." Returns ProcessHelper.CANCELLED if all Change Proposals are in state "Cancelled." Returns ProcessHelper.NOT_FINISHED if at least one Change Proposal is pending (i.e. has not reached either state "Complete" or "Cancelled").

Supported API: true

Parameters:
cRequest -
Returns:
String
Throws:
ChangeException2
WTException

checkOrdersFinished

public static String checkOrdersFinished(ChangeRequest2 cRequest)
                                  throws ChangeException2,
                                         WTException
Determine if the passed Change Request has any pending Change Orders. Returns ProcessHelper.COMPLETE if at least one Change Order is in state "Complete" and the rest are in state "Complete" or "Cancel." Returns ProcessHelper.CANCELLED if all Change Orders are in state "Cancelled." Returns ProcessHelper.NOT_FINISHED if at least one Change Order is pending (i.e. has not reached either state "Complete" or "Cancelled").

Supported API: true

Parameters:
cRequest -
Returns:
String
Throws:
ChangeException2
WTException

checkRequestSubmitted

public static String checkRequestSubmitted(ChangeItem cItem)
                                    throws ChangeException2,
                                           WTException
Determine if the parent Change Request has been submitted and returns the complexity of the change. Returns ProcessHelper.NOT_SUBMITTED if the Change Request has not been submitted. Otherwise, if the Change Request is a WTChangeRequest2, then it returns the Complexity Enumerated Type String value as stored on the Change Item's parent Change Request. If the Change Request is not a WTChangeRequest2, then it returns the empty string "".

Supported API: true

Parameters:
cItem -
Returns:
String
Throws:
ChangeException2
WTException

checkChangeActivitiesFinished

public static String checkChangeActivitiesFinished(ChangeOrder2 cOrder)
                                            throws ChangeException2,
                                                   WTException
Determine if the passed Change Order has any pending Change Activities. Returns ProcessHelper.COMPLETE if at least one Change Activity is in state "Complete" and the rest are in state "Complete" or "Cancel." Returns ProcessHelper.CANCELLED if all Change Activities are in state "Cancelled." Returns ProcessHelper.NOT_FINISHED if at least one Change Activity is pending (i.e. has not reached either state "Complete" or "Cancelled").

Supported API: true

Parameters:
cOrder -
Returns:
String
Throws:
ChangeException2
WTException

checkInvestigationsFinished

public static String checkInvestigationsFinished(ChangeRequest2 cRequest)
                                          throws ChangeException2,
                                                 WTException
Determine if the passed Change Request has any pending Change Investigations. Returns ProcessHelper.COMPLETE if at least one Change Investigation is in state "Complete" and the rest are in state "Complete" or "Cancel." Returns ProcessHelper.CANCELLED if all Change Investigations are in state "Cancelled." Returns ProcessHelper.NOT_FINISHED if at least one Change Investigation is pending (i.e. has not reached either state "Complete" or "Cancelled").

Supported API: true

Parameters:
cRequest -
Returns:
String
Throws:
ChangeException2
WTException

checkRequestFinished

public static String checkRequestFinished(WTChangeRequest2 cRequest)
                                   throws ChangeException2,
                                          WTException
Determine if the passed Change Request is in state "Complete" or "Cancelled." Returns ProcessHelper.COMPLETE if the Change Request is in state "Complete." Returns ProcessHelper.CANCELLED if the Change Request is in state "Cancelled."

Supported API: false

Parameters:
cRequest -
Returns:
String
Throws:
ChangeException2
WTException

checkLifeCycleManagedFinished

private static String checkLifeCycleManagedFinished(QueryResult result)

checkLifeCycleManagedFinished

public static String checkLifeCycleManagedFinished(LifeCycleManaged life_cycle_managed)

isCMIIDefaultChangeProcess

public static boolean isCMIIDefaultChangeProcess()
This method will return whether the Default Change Process is the CMII Closed-Loop change process or the default Change2 implementation. This can be overridden for testing purposes by setting
wt.change2.process.cmii=false in wt.properties.

Supported API: false

Returns:
true if the Default process is CMII

isCMIIStandAlone

public static boolean isCMIIStandAlone()
This method will return whether CMII is stand alone or is running within a PDMLink environment.

Supported API: false

Returns:
true if it is installed in a Modular fashion

isSimplifiedChangeEnabled

public static boolean isSimplifiedChangeEnabled()
This method will return whether Simplified Change process is present in the system. Currently Simplified Change is only supported on the PDMLink environment.

Supported API: false

Returns:
true if Simplified Change is supported.

isSimplifiedChangeStandAlone

public static boolean isSimplifiedChangeStandAlone()
This method will return whether the Simplified Change is the only Change system present in the system, or if the system is configured as Simplified Change and the CMII process. A user session needs to be established in order to determine this from the preferences.

Supported API: false

Returns:
true if the Simplified Change process is the only process.

setSimplifiedChangeStandAlone

public static void setSimplifiedChangeStandAlone(boolean standalone)
                                          throws WTException
This method will set whether the Simplified Change System is the only change system in the infrastructure, or if it is shared with the Windchill CMII process.

Supported API: false

Returns:
true if the Simplified Change process is the only process.
Throws:
WTException

main

public static void main(String[] args)