com.ptc.windchill.pdmlink.change.server.impl
Class WorkflowProcessHelper

java.lang.Object
  extended by com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper

public class WorkflowProcessHelper
extends Object

This class contains static methods to support the PDMLink Workflow process; These methods are intended to be called by routing expressions and synchronization robot expressions.

Supported API: true

Extendable: true


Method Summary
static void applyPendingEffectivities(ChangeOrderIfc changeNotice)
          Processes pending effectivities on a change notice, creating active product effectivities.
static void approveHangingChanges(WTChangeOrder2 cOrder)
          Set the UnIncorporatedChange status to APPROVED.
static String checkActivitiesFinished(ChangeOrder2 cOrder)
          

Supported API: true This method checks if the state of all of the associated Change Tasks of the cOrder: - If there are associated Change Tasks and at least one of the Change Tasks are in the LCM_RESOLVED_STATE and the rest are either in the LCM_RESOLVED_STATE or the LCM_CANCELLED_STATE then return RESOLVED.
static String checkImplementation(WTChangeOrder2 cOrder)
          

Supported API: true Return the State of the Change Order.
static String checkOrdersFinished(ChangeRequest2 cRequest)
          

Supported API: true This method checks if the state of all of the associated ECNs of the cRequest: - If at least on of the ECNs are in the LCM_RESOLVED_STATE and the rest are either in the LCM_RESOLVED_STATE or the LCM_CANCELLED_STATE then return RESOLVED.
static void forcePRsToResolved(WTChangeRequest2 changeRequest)
          

Supported API: true This method forces the state of all associated Problem Reports or Variances to the state defined in the PR_RESOLVED_STATE as well as setting the resolution date.
static ChangeNoticeComplexity getComplexity(WTChangeOrder2 changeOrder)
          

Supported API: true This method returns the complexity of an ECN, as opposed to the complexity of an associated ECR.
static WTCollection getUnpromotableChangeables(WTChangeOrder2 cOrder)
          Return the changeable2 objects associated through the ChangeRecord2 link that have no CHANGE transition.
static Boolean isComplex(WTChangeOrder2 changeOrder)
          

Supported API: true This method returns true if the complexity of any Change Request associated to the changeOrder is COMPLEX.
static void processBusinessDecision(WTChangeRequest2 changeRequest, BusinessDecisionCategory a_BusinessDecision, String track, String comments)
          

Supported API: true This method processes the business decision of a Change Request: - Persist the BusinessDecisionSummary on the Change Request - Persist the BusinessDecisionAudit on the Change Request
static void processConfirmation(WTChangeIssue changeIssue, ConfirmationCategory a_ConfirmationCategory)
          

Supported API: true This method processes the confirmation of a Problem Report: - Persist the ConfirmationCategory on the Problem Report - Persist the ConfirmationAudit on the Problem Report
static void promoteChangeables(WTChangeOrder2 cOrder)
          All the changeables of a ChangeOrder are automatically promoted to state defined by the CHANGE transition.
static void setECNResolutionDate(WTChangeOrder2 changeOrder)
          

Supported API: true This method sets the resolution date of a Change Notice.
static void setPRResolutionDate(WTChangeIssue changeIssue)
          

Supported API: true This method sets the resolution date of a Problem Report.
static void setRoleToECN(WTChangeOrder2 changeOrder, String sRole)
          

Supported API: true Obtains the principles assigned to the given role on all parent Change Requests and copies those principles to the same role on the passed Change Order.
static void setRoleToECR(WTChangeRequest2 request, String sRole)
          

Supported API: true Obtains the principles assigned to the given role on all associated Change Issues and copies those principles to the same role on the passed Change Order.
static void setSubmitterRole(VersionableChangeItem chg, String sRole)
          

Supported API: true Assigns the original creator of the change item to the specified role
static void setTrack(WTChangeRequest2 changeRequest, String track)
          

Supported API: true This method sets the complexity (track) of a change request
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

processConfirmation

public static void processConfirmation(WTChangeIssue changeIssue,
                                       ConfirmationCategory a_ConfirmationCategory)
                                throws WTPropertyVetoException,
                                       WTException


Supported API: true This method processes the confirmation of a Problem Report: - Persist the ConfirmationCategory on the Problem Report - Persist the ConfirmationAudit on the Problem Report

Parameters:
changeIssue -
a_ConfirmationCategory -
Throws:
WTException
WTPropertyVetoException
See Also:
WTChangeIssue, ConfirmationCategory, ConfirmationAudit

forcePRsToResolved

public static void forcePRsToResolved(WTChangeRequest2 changeRequest)
                               throws WTException,
                                      WTPropertyVetoException


Supported API: true This method forces the state of all associated Problem Reports or Variances to the state defined in the PR_RESOLVED_STATE as well as setting the resolution date. It also terminates any running workflow processes of the associated Problem Reports or Variances.

Parameters:
changeRequest -
Throws:
WTException
WTPropertyVetoException
See Also:
WTChangeIssue

setECNResolutionDate

public static void setECNResolutionDate(WTChangeOrder2 changeOrder)
                                 throws WTException,
                                        WTPropertyVetoException


Supported API: true This method sets the resolution date of a Change Notice. This method also sets the state of the associated Change Tasks to the CA_RESOLVED_STATE

Parameters:
changeOrder -
Throws:
WTException
WTPropertyVetoException
See Also:
WTChangeOrder2, WTChangeActivity2

setPRResolutionDate

public static void setPRResolutionDate(WTChangeIssue changeIssue)
                                throws WTException,
                                       WTPropertyVetoException


Supported API: true This method sets the resolution date of a Problem Report.

Parameters:
changeIssue -
Throws:
WTException
WTPropertyVetoException
See Also:
WTChangeIssue

getUnpromotableChangeables

public static WTCollection getUnpromotableChangeables(WTChangeOrder2 cOrder)
                                               throws WTException
Return the changeable2 objects associated through the ChangeRecord2 link that have no CHANGE transition.

Supported API: true

Parameters:
cOrder -
Throws:
WTException
See Also:
WTChangeOrder2, Changeable2, ChangeRecord2

promoteChangeables

public static void promoteChangeables(WTChangeOrder2 cOrder)
                               throws WTException
All the changeables of a ChangeOrder are automatically promoted to state defined by the CHANGE transition. In Addition, If any of the changeables have a live workflow, it is terminated.

Supported API: true

Parameters:
cOrder -
Throws:
WTException

processBusinessDecision

public static void processBusinessDecision(WTChangeRequest2 changeRequest,
                                           BusinessDecisionCategory a_BusinessDecision,
                                           String track,
                                           String comments)
                                    throws WTPropertyVetoException,
                                           WTException


Supported API: true This method processes the business decision of a Change Request: - Persist the BusinessDecisionSummary on the Change Request - Persist the BusinessDecisionAudit on the Change Request

Parameters:
changeRequest -
a_BusinessDecision -
track -
Throws:
WTException
WTPropertyVetoException
See Also:
BusinessDecisionCategory

setTrack

public static void setTrack(WTChangeRequest2 changeRequest,
                            String track)
                     throws WTPropertyVetoException,
                            WTException


Supported API: true This method sets the complexity (track) of a change request

Parameters:
changeRequest -
a_BusinessDecision -
track -
Throws:
WTException
WTPropertyVetoException
See Also:
Complexity

checkOrdersFinished

public static String checkOrdersFinished(ChangeRequest2 cRequest)
                                  throws ChangeException2,
                                         WTException


Supported API: true This method checks if the state of all of the associated ECNs of the cRequest: - If at least on of the ECNs are in the LCM_RESOLVED_STATE and the rest are either in the LCM_RESOLVED_STATE or the LCM_CANCELLED_STATE then return RESOLVED. - If all of the ECNs are in the LCM_CANCELLED_STATE then return CANCELLED. - If there are no associated Change Notices then return NO_SUBORDINATES. - If any are in some other state then return NOT_FINISHED.

Parameters:
cRequest -
Returns:
String
Throws:
WTException
ChangeException2

checkActivitiesFinished

public static String checkActivitiesFinished(ChangeOrder2 cOrder)
                                      throws ChangeException2,
                                             WTException


Supported API: true This method checks if the state of all of the associated Change Tasks of the cOrder: - If there are associated Change Tasks and at least one of the Change Tasks are in the LCM_RESOLVED_STATE and the rest are either in the LCM_RESOLVED_STATE or the LCM_CANCELLED_STATE then return RESOLVED. - If all of the Change Tasks are in the LCM_CANCELLED_STATE then return CANCELLED. - If any Change Tasks are in some other state then return NOT_FINISHED.

Parameters:
cOrder -
Returns:
String
Throws:
WTException
ChangeException2

checkImplementation

public static String checkImplementation(WTChangeOrder2 cOrder)
                                  throws ChangeException2,
                                         WTException


Supported API: true Return the State of the Change Order.

Parameters:
cOrder -
Returns:
String
Throws:
WTException
ChangeException2

setRoleToECN

public static void setRoleToECN(WTChangeOrder2 changeOrder,
                                String sRole)
                         throws WTException


Supported API: true Obtains the principles assigned to the given role on all parent Change Requests and copies those principles to the same role on the passed Change Order.

Parameters:
changeOrder -
sRole -
Throws:
WTException

setRoleToECR

public static void setRoleToECR(WTChangeRequest2 request,
                                String sRole)
                         throws WTException


Supported API: true Obtains the principles assigned to the given role on all associated Change Issues and copies those principles to the same role on the passed Change Order.

Parameters:
request -
sRole -
Throws:
WTException

getComplexity

public static ChangeNoticeComplexity getComplexity(WTChangeOrder2 changeOrder)
                                            throws WTException


Supported API: true This method returns the complexity of an ECN, as opposed to the complexity of an associated ECR.

Parameters:
changeOrder - The change order (ECN) whose complexity will be evaluated.
Returns:
Complexity The complexity of the passed change order (ECN).
Throws:
WTException
See Also:
ChangeNoticeComplexity

isComplex

public static Boolean isComplex(WTChangeOrder2 changeOrder)
                         throws WTException


Supported API: true This method returns true if the complexity of any Change Request associated to the changeOrder is COMPLEX.

Parameters:
changeOrder -
Returns:
Boolean
Throws:
WTException
See Also:
ChangeNoticeComplexity

setSubmitterRole

public static void setSubmitterRole(VersionableChangeItem chg,
                                    String sRole)
                             throws WTException


Supported API: true Assigns the original creator of the change item to the specified role

Parameters:
chg -
sRole -
Throws:
WTException

applyPendingEffectivities

public static void applyPendingEffectivities(ChangeOrderIfc changeNotice)
                                      throws WTException
Processes pending effectivities on a change notice, creating active product effectivities. This method directly defers to the effectivity service for processing.



Supported API: true

Parameters:
changeNotice - change notice participating in workflow
Throws:
WTException - surfaced from call to effectivity service method

approveHangingChanges

public static void approveHangingChanges(WTChangeOrder2 cOrder)
                                  throws WTException,
                                         WTPropertyVetoException
Set the UnIncorporatedChange status to APPROVED.

Supported API: true

Parameters:
cOrder - change notice participating in workflow
Throws:
WTException - surfaced from call to effectivity service method
WTPropertyVetoException