Change_Activity_Workflow\ // Initialize the parentChangeRequest variable parentChangeOrder=com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.findChangeOrder( (wt.change2.WTChangeActivity2) primaryBusinessObject); ================= Change_Activity_Workflow\ // Determine the state of the parent change request and branch accordingly String state = com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.checkImplementation(parentChangeOrder); if (state.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.IMPLEMENTATION)) result = "Go"; else result = null; ================= Change_Activity_Workflow\ // Determine the state of the parent change request and branch accordingly String state = com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.checkImplementation(parentChangeOrder); if (state.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.IMPLEMENTATION)) result = "Go"; else result = null; ================= Change_Notice_Workflow\ String role=new String("wt.project.role.ECR AUTHOR"); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECN((wt.change2.WTChangeOrder2)primaryBusinessObject#role); ================= Change_Notice_Workflow\ String role=new String("wt.project.role.ECR AUTHOR"); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECN((wt.change2.WTChangeOrder2)primaryBusinessObject#role); role=new String("wt.project.role.PR AUTHOR"); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECN((wt.change2.WTChangeOrder2)primaryBusinessObject#role); ================= Change_Notice_Workflow\ java.lang.String role="wt.project.role.CHANGE ADMINISTRATOR I"; com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECN((wt.change2.WTChangeOrder2)primaryBusinessObject#role); role="wt.project.role.CHANGE ADMINISTRATOR II"; com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECN((wt.change2.WTChangeOrder2)primaryBusinessObject#role); ================= Change_Notice_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.promoteChangeables((wt.change2.WTChangeOrder2)primaryBusinessObject); ================= Change_Notice_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setECNResolutionDate((wt.change2.WTChangeOrder2)primaryBusinessObject); ================= Change_Notice_Workflow\ String role=new String("wt.project.role.ECR AUTHOR"); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECN((wt.change2.WTChangeOrder2)primaryBusinessObject#role); ================= Change_Notice_Workflow\ submitDate=new Timestamp(System.currentTimeMillis()); ================= Change_Notice_Workflow\ wt.fc.collections.WTHashSet unpromChanges = (wt.fc.collections.WTHashSet) com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.getUnpromotableChangeables((wt.change2.WTChangeOrder2)primaryBusinessObject); java.util.Iterator i = unpromChanges.persistableIterator(); wt.enterprise.RevisionControlled p = null; String unpromotables = ""; if (i.hasNext()){ p = (wt.enterprise.RevisionControlled)i.next(); unpromotables = unpromotables + p.getDisplayIdentity(); } while (i.hasNext()){ p = (wt.enterprise.RevisionControlled)i.next(); unpromotables = unpromotables + "; " + p.getDisplayIdentity(); } if (unpromotables.length()!=0){ unpromotable = "- The following Resulting Data will not be promoted because there is no change transition defined: \n"; java.util.StringTokenizer s = new java.util.StringTokenizer( unpromotables# ";" ); while (s.hasMoreTokens()){ unpromotable += "- - " + s.nextToken() + "\n"; } unpromotable += "\n There are two ways to resolve the issue: \n 1. If you did not intend to promote the resulting data# then simply complete the task. \n 2. If you did intend to promote the resulting data# there may be a problem with the configuration of lifecycle templates. Select the Rework option and enter comments for Change Administrator II."; unpromotable += ""; } ================= Change_Notice_Workflow\ // Continue if the primaryBusinessObject has progressed past the initial state inInitialPhase =wt.lifecycle.LifeCycleHelper.service.isInInitialPhase((wt.lifecycle.LifeCycleManaged)primaryBusinessObject) ; if (inInitialPhase != true) result = "Go"; else result = null; ================= Change_Notice_Workflow\ // Continue if the primaryBusinessObject has progressed past the initial state inInitialPhase =wt.lifecycle.LifeCycleHelper.service.isInInitialPhase((wt.lifecycle.LifeCycleManaged)primaryBusinessObject) ; if (inInitialPhase != true) result = "Go"; else result = null; ================= Change_Notice_Workflow\ // "Complete" and the rest are in state "Complete" or "Cancel." // It returns ProcessHelper.CANCELLED if all Change Orders are in state "Cancelled" or // ProcessHelper.NOT_FINISHED if at least one Change Order is pending // (i.e. has not reached either state "Complete" or "Cancelled"). String checkActivitiesFinished = null; checkActivitiesFinished = com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.checkActivitiesFinished((wt.change2.WTChangeOrder2)primaryBusinessObject); if (checkActivitiesFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.RESOLVED)) result = "Resolved"; else if (checkActivitiesFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.CANCELLED)) result = "Cancelled"; else if (checkActivitiesFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.NOT_FINISHED)) result = null; ================= Change_Notice_Workflow\ // "Complete" and the rest are in state "Complete" or "Cancel." // It returns ProcessHelper.CANCELLED if all Change Orders are in state "Cancelled" or // ProcessHelper.NOT_FINISHED if at least one Change Order is pending // (i.e. has not reached either state "Complete" or "Cancelled"). String checkActivitiesFinished = null; checkActivitiesFinished = com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.checkActivitiesFinished((wt.change2.WTChangeOrder2)primaryBusinessObject); if (checkActivitiesFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.RESOLVED)) result = "Resolved"; else if (checkActivitiesFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.CANCELLED)) result = "Cancelled"; else if (checkActivitiesFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.NOT_FINISHED)) result = null; ================= Change_Notice_Workflow\ result = inInitialPhase; ================= Change_Notice_Workflow\ wt.fc.collections.WTHashSet unpromChanges = (wt.fc.collections.WTHashSet) com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.getUnpromotableChangeables((wt.change2.WTChangeOrder2)primaryBusinessObject); java.util.Iterator i = unpromChanges.persistableIterator(); wt.enterprise.RevisionControlled p = null; String unpromotable1=""; if (i.hasNext()){ p = (wt.enterprise.RevisionControlled)i.next(); unpromotable1 = unpromotable1 + p.getName(); } while (i.hasNext()){ p = (wt.enterprise.RevisionControlled)i.next(); unpromotable1 = unpromotable1 + "; " + p.getName(); } if (unpromotable1.length()!=0){ unpromotable2 = "- The following Resulting Data will not be promoted because there is no change transition defined: \n"; java.util.StringTokenizer s = new java.util.StringTokenizer( unpromotable1# ";" ); while (s.hasMoreTokens()){ unpromotable2 += "- - " + s.nextToken() + "\n"; } unpromotable2 += "\n There are two ways to resolve the issue: \n 1. If you did not intend to promote the resulting data# then simply complete the task. \n 2. If you did intend to promote the resulting data# there may be a problem with the configuration of lifecycle templates. Select the Rework option and enter comments for Change Administrator II."; unpromotable2 += ""; } ================= Change_Notice_Workflow\ approval_date=new Timestamp(System.currentTimeMillis()); ================= Change_Request_Workflow\ submitDate=new java.sql.Timestamp(System.currentTimeMillis()); ================= Change_Request_Workflow\ String role=new String("wt.project.role.PR AUTHOR"); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECR((wt.change2.WTChangeRequest2)primaryBusinessObject#role); ================= Change_Request_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.forcePRsToResolved((wt.change2.WTChangeRequest2)primaryBusinessObject); ================= Change_Request_Workflow\ String role=new String("wt.project.role.PR AUTHOR"); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECR((wt.change2.WTChangeRequest2)primaryBusinessObject#role); ================= Change_Request_Workflow\ String role=new String("wt.project.role.PR AUTHOR"); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECR((wt.change2.WTChangeRequest2)primaryBusinessObject#role); ================= Change_Request_Workflow\ String role=new String("wt.project.role.PR AUTHOR"); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECR((wt.change2.WTChangeRequest2)primaryBusinessObject#role); ================= Change_Request_Workflow\ // Continue if the primaryBusinessObject has progressed past the initial state inInitialPhase =wt.lifecycle.LifeCycleHelper.service.isInInitialPhase((wt.lifecycle.LifeCycleManaged)primaryBusinessObject) ; if (inInitialPhase != true) result = "Go"; else result = null; ================= Change_Request_Workflow\ // Continue if the primaryBusinessObject has progressed past the initial state inInitialPhase =wt.lifecycle.LifeCycleHelper.service.isInInitialPhase((wt.lifecycle.LifeCycleManaged)primaryBusinessObject) ; if (inInitialPhase != true) result = "Go"; else result = null; ================= Change_Request_Workflow\ // The method ProcessHelper.checkOrdersFinished // returns ProcessHelper.COMPLETE if at least one Change Order is in state // "Complete" and the rest are in state "Complete" or "Cancel." // It returns ProcessHelper.CANCELLED if all Change Orders are in state "Cancelled" or // ProcessHelper.NOT_FINISHED if at least one Change Order is pending // (i.e. has not reached either state "Complete" or "Cancelled"). String checkOrdersFinished = null; checkOrdersFinished = com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.checkOrdersFinished((wt.change2.ChangeRequest2)primaryBusinessObject); if (checkOrdersFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.RESOLVED)) result = "Resolved"; else if (checkOrdersFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.CANCELLED)) result = "Cancelled"; else if (checkOrdersFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.NOT_FINISHED)) result = null; ================= Change_Request_Workflow\ // The method ProcessHelper.checkOrdersFinished // returns ProcessHelper.COMPLETE if at least one Change Order is in state // "Complete" and the rest are in state "Complete" or "Cancel." // It returns ProcessHelper.CANCELLED if all Change Orders are in state "Cancelled" or // ProcessHelper.NOT_FINISHED if at least one Change Order is pending // (i.e. has not reached either state "Complete" or "Cancelled"). String checkOrdersFinished = null; checkOrdersFinished = com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.checkOrdersFinished((wt.change2.ChangeRequest2)primaryBusinessObject); if (checkOrdersFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.RESOLVED)) result = "Resolved"; else if (checkOrdersFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.CANCELLED)) result = "Cancelled"; else if (checkOrdersFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.NOT_FINISHED)) result = null; ================= Change_Request_Workflow\ Analysis=""; ================= Change_Request_Workflow\ approval_date=new Timestamp(System.currentTimeMillis()); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processBusinessDecision((wt.change2.WTChangeRequest2)primaryBusinessObject#wt.change2.BusinessDecisionCategory.APPROVED# "COMPLEX"# Comments); ================= Change_Request_Workflow\ approval_date=new Timestamp(System.currentTimeMillis()); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processBusinessDecision((wt.change2.WTChangeRequest2)primaryBusinessObject#wt.change2.BusinessDecisionCategory.REJECTED# "COMPLEX"# Comments); ================= Change_Request_Workflow\ Comment="";Clarify_Comments=""; ================= Change_Request_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setTrack((wt.change2.WTChangeRequest2)primaryBusinessObject# "SIMPLE"); ================= Change_Request_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setTrack((wt.change2.WTChangeRequest2)primaryBusinessObject#"COMPLEX"); ================= Change_Request_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setTrack((wt.change2.WTChangeRequest2)primaryBusinessObject# "SIMPLE"); ================= Change_Request_Workflow\ result = inInitialPhase; ================= Change_Request_Workflow\ Review=""; ================= CMII_CA_Workflow\ submitDate=new java.sql.Timestamp(System.currentTimeMillis()); ================= CMII_CA_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setPRResolutionDate((wt.change2.WTChangeIssue)primaryBusinessObject); ================= CMII_CA_Workflow\ // Continue if the primaryBusinessObject has progressed past the initial state inInitialPhase =wt.lifecycle.LifeCycleHelper.service.isInInitialPhase((wt.lifecycle.LifeCycleManaged)primaryBusinessObject) ; if (inInitialPhase != true) result = "Go"; else result = null; ================= CMII_CA_Workflow\ // Continue if the primaryBusinessObject has progressed past the initial state inInitialPhase =wt.lifecycle.LifeCycleHelper.service.isInInitialPhase((wt.lifecycle.LifeCycleManaged)primaryBusinessObject) ; if (inInitialPhase != true) result = "Go"; else result = null; ================= CMII_CA_Workflow\ result = inInitialPhase; ================= CMII_CA_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.CONFIRMED); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= CMII_CA_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.NOTVERIFIED); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= CMII_CA_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.UNREPRODUCABLE); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= CMII_CA_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.WONTRESOLVE); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= CMII_CA_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.DUPLICATE); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= CMII_CA_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.CLARIFICATION); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= CMII_ECN_Workflow\ String role=new String("wt.project.role.ECR AUTHOR"); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECN((wt.change2.WTChangeOrder2)primaryBusinessObject#role); role=new String("wt.project.role.PR AUTHOR"); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECN((wt.change2.WTChangeOrder2)primaryBusinessObject#role); ================= CMII_ECN_Workflow\ submitDate=new Timestamp(System.currentTimeMillis()); ================= CMII_ECN_Workflow\ String role=new String("wt.project.role.ECR AUTHOR"); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECN((wt.change2.WTChangeOrder2)primaryBusinessObject#role); ================= CMII_ECN_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.promoteChangeables((wt.change2.WTChangeOrder2)primaryBusinessObject); ================= CMII_ECN_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setECNResolutionDate((wt.change2.WTChangeOrder2)primaryBusinessObject); ================= CMII_ECN_Workflow\ java.lang.String role="wt.project.role.CHANGE ADMINISTRATOR I"; com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECN((wt.change2.WTChangeOrder2)primaryBusinessObject#role); role="wt.project.role.CHANGE ADMINISTRATOR II"; com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECN((wt.change2.WTChangeOrder2)primaryBusinessObject#role); ================= CMII_ECN_Workflow\ String role=new String("wt.project.role.ECR AUTHOR"); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECN((wt.change2.WTChangeOrder2)primaryBusinessObject#role); ================= CMII_ECN_Workflow\ // Continue if the primaryBusinessObject has progressed past the initial state inInitialPhase =wt.lifecycle.LifeCycleHelper.service.isInInitialPhase((wt.lifecycle.LifeCycleManaged)primaryBusinessObject) ; if (inInitialPhase != true) result = "Go"; else result = null; ================= CMII_ECN_Workflow\ // Continue if the primaryBusinessObject has progressed past the initial state inInitialPhase =wt.lifecycle.LifeCycleHelper.service.isInInitialPhase((wt.lifecycle.LifeCycleManaged)primaryBusinessObject) ; if (inInitialPhase != true) result = "Go"; else result = null; ================= CMII_ECN_Workflow\ // "Complete" and the rest are in state "Complete" or "Cancel." // It returns ProcessHelper.CANCELLED if all Change Orders are in state "Cancelled" or // ProcessHelper.NOT_FINISHED if at least one Change Order is pending // (i.e. has not reached either state "Complete" or "Cancelled"). String checkActivitiesFinished = null; checkActivitiesFinished = com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.checkActivitiesFinished((wt.change2.WTChangeOrder2)primaryBusinessObject); if (checkActivitiesFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.RESOLVED)) result = "Resolved"; else if (checkActivitiesFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.CANCELLED)) result = "Cancelled"; else if (checkActivitiesFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.NOT_FINISHED)) result = null; ================= CMII_ECN_Workflow\ // "Complete" and the rest are in state "Complete" or "Cancel." // It returns ProcessHelper.CANCELLED if all Change Orders are in state "Cancelled" or // ProcessHelper.NOT_FINISHED if at least one Change Order is pending // (i.e. has not reached either state "Complete" or "Cancelled"). String checkActivitiesFinished = null; checkActivitiesFinished = com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.checkActivitiesFinished((wt.change2.WTChangeOrder2)primaryBusinessObject); if (checkActivitiesFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.RESOLVED)) result = "Resolved"; else if (checkActivitiesFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.CANCELLED)) result = "Cancelled"; else if (checkActivitiesFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.NOT_FINISHED)) result = null; ================= CMII_ECN_Workflow\ approval_date=new Timestamp(System.currentTimeMillis()); ================= CMII_ECN_Workflow\ result = inInitialPhase; ================= CMII_ECR_Workflow\ submitDate=new java.sql.Timestamp(System.currentTimeMillis()); ================= CMII_ECR_Workflow\ String role=new String("wt.project.role.PR AUTHOR"); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECR((wt.change2.WTChangeRequest2)primaryBusinessObject#role); ================= CMII_ECR_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.forcePRsToResolved((wt.change2.WTChangeRequest2)primaryBusinessObject); ================= CMII_ECR_Workflow\ String role=new String("wt.project.role.PR AUTHOR"); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECR((wt.change2.WTChangeRequest2)primaryBusinessObject#role); ================= CMII_ECR_Workflow\ String role=new String("wt.project.role.PR AUTHOR"); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECR((wt.change2.WTChangeRequest2)primaryBusinessObject#role); ================= CMII_ECR_Workflow\ String role=new String("wt.project.role.PR AUTHOR"); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setRoleToECR((wt.change2.WTChangeRequest2)primaryBusinessObject#role); ================= CMII_ECR_Workflow\ // Continue if the primaryBusinessObject has progressed past the initial state inInitialPhase =wt.lifecycle.LifeCycleHelper.service.isInInitialPhase((wt.lifecycle.LifeCycleManaged)primaryBusinessObject) ; if (inInitialPhase != true) result = "Go"; else result = null; ================= CMII_ECR_Workflow\ // Continue if the primaryBusinessObject has progressed past the initial state inInitialPhase =wt.lifecycle.LifeCycleHelper.service.isInInitialPhase((wt.lifecycle.LifeCycleManaged)primaryBusinessObject) ; if (inInitialPhase != true) result = "Go"; else result = null; ================= CMII_ECR_Workflow\ // The method ProcessHelper.checkOrdersFinished // returns ProcessHelper.COMPLETE if at least one Change Order is in state // "Complete" and the rest are in state "Complete" or "Cancel." // It returns ProcessHelper.CANCELLED if all Change Orders are in state "Cancelled" or // ProcessHelper.NOT_FINISHED if at least one Change Order is pending // (i.e. has not reached either state "Complete" or "Cancelled"). String checkOrdersFinished = null; checkOrdersFinished = com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.checkOrdersFinished((wt.change2.ChangeRequest2)primaryBusinessObject); if (checkOrdersFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.RESOLVED)) result = "Resolved"; else if (checkOrdersFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.CANCELLED)) result = "Cancelled"; else if (checkOrdersFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.NOT_FINISHED)) result = null; ================= CMII_ECR_Workflow\ // The method ProcessHelper.checkOrdersFinished // returns ProcessHelper.COMPLETE if at least one Change Order is in state // "Complete" and the rest are in state "Complete" or "Cancel." // It returns ProcessHelper.CANCELLED if all Change Orders are in state "Cancelled" or // ProcessHelper.NOT_FINISHED if at least one Change Order is pending // (i.e. has not reached either state "Complete" or "Cancelled"). String checkOrdersFinished = null; checkOrdersFinished = com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.checkOrdersFinished((wt.change2.ChangeRequest2)primaryBusinessObject); if (checkOrdersFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.RESOLVED)) result = "Resolved"; else if (checkOrdersFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.CANCELLED)) result = "Cancelled"; else if (checkOrdersFinished.equals(com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.NOT_FINISHED)) result = null; ================= CMII_ECR_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setTrack((wt.change2.WTChangeRequest2)primaryBusinessObject# "SIMPLE"); ================= CMII_ECR_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setTrack((wt.change2.WTChangeRequest2)primaryBusinessObject#"COMPLEX"); ================= CMII_ECR_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setTrack((wt.change2.WTChangeRequest2)primaryBusinessObject# "SIMPLE"); ================= CMII_ECR_Workflow\ result = inInitialPhase; ================= CMII_ECR_Workflow\ approval_date=new Timestamp(System.currentTimeMillis()); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processBusinessDecision((wt.change2.WTChangeRequest2)primaryBusinessObject#wt.change2.BusinessDecisionCategory.APPROVED# "COMPLEX"# Comments); ================= CMII_ECR_Workflow\ approval_date=new Timestamp(System.currentTimeMillis()); com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processBusinessDecision((wt.change2.WTChangeRequest2)primaryBusinessObject#wt.change2.BusinessDecisionCategory.REJECTED# "COMPLEX"# Comments); ================= CMII_PR_Workflow\ submitDate=new java.sql.Timestamp(System.currentTimeMillis()); ================= CMII_PR_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setPRResolutionDate((wt.change2.WTChangeIssue)primaryBusinessObject); ================= CMII_PR_Workflow\ // Continue if the primaryBusinessObject has progressed past the initial state inInitialPhase =wt.lifecycle.LifeCycleHelper.service.isInInitialPhase((wt.lifecycle.LifeCycleManaged)primaryBusinessObject) ; if (inInitialPhase != true) result = "Go"; else result = null; ================= CMII_PR_Workflow\ // Continue if the primaryBusinessObject has progressed past the initial state inInitialPhase =wt.lifecycle.LifeCycleHelper.service.isInInitialPhase((wt.lifecycle.LifeCycleManaged)primaryBusinessObject) ; if (inInitialPhase != true) result = "Go"; else result = null; ================= CMII_PR_Workflow\ result = inInitialPhase; ================= CMII_PR_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.CONFIRMED); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= CMII_PR_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.NOTVERIFIED); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= CMII_PR_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.UNREPRODUCABLE); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= CMII_PR_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.WONTRESOLVE); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= CMII_PR_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.DUPLICATE); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= CMII_PR_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.CLARIFICATION); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= Problem_Report_Workflow\ submitDate=new java.sql.Timestamp(System.currentTimeMillis()); ================= Problem_Report_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.setPRResolutionDate((wt.change2.WTChangeIssue)primaryBusinessObject); ================= Problem_Report_Workflow\ // Continue if the primaryBusinessObject has progressed past the initial state inInitialPhase =wt.lifecycle.LifeCycleHelper.service.isInInitialPhase((wt.lifecycle.LifeCycleManaged)primaryBusinessObject) ; if (inInitialPhase != true) result = "Go"; else result = null; ================= Problem_Report_Workflow\ // Continue if the primaryBusinessObject has progressed past the initial state inInitialPhase =wt.lifecycle.LifeCycleHelper.service.isInInitialPhase((wt.lifecycle.LifeCycleManaged)primaryBusinessObject) ; if (inInitialPhase != true) result = "Go"; else result = null; ================= Problem_Report_Workflow\ result = inInitialPhase; ================= Problem_Report_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.CONFIRMED); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= Problem_Report_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.NOTVERIFIED); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= Problem_Report_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.UNREPRODUCABLE); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= Problem_Report_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.WONTRESOLVE); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= Problem_Report_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.DUPLICATE); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= Problem_Report_Workflow\ com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.processConfirmation((wt.change2.WTChangeIssue)primaryBusinessObject#wt.change2.ConfirmationCategory.CLARIFICATION); review_date=new java.sql.Timestamp(System.currentTimeMillis()); ================= Promotion_Request_Approval_Process\ wt.maturity.PromotionNotice pn = (wt.maturity.PromotionNotice)primaryBusinessObject; try { wt.util.WTProperties props = wt.util.WTProperties.getLocalProperties(); VERBOSE = props.getProperty("wt.maturity.verbose"#VERBOSE); } catch( Throwable t ) { } try{ wt.maturity.MaturityServerHelper.service.unlockTargets (pn); } catch (wt.maturity.MaturityException me){ if ( VERBOSE ) me.printStackTrace(); } ================= Promotion_Request_Review_Process\ wt.maturity.PromotionNotice pn = (wt.maturity.PromotionNotice)primaryBusinessObject; try { wt.util.WTProperties props = wt.util.WTProperties.getLocalProperties(); VERBOSE = props.getProperty("wt.maturity.verbose"#VERBOSE); } catch( Throwable t ) { } try{ wt.maturity.MaturityServerHelper.service.unlockTargets (pn); } catch (wt.maturity.MaturityException me){ if ( VERBOSE ) me.printStackTrace(); } ================= ReplicationPublish\ sharedCabinet=true; ================= ReplicationPublish\ System.out.println("+++Workflow ReplicationUnit. got post_export event on " + primaryBusinessObject); wt.replication.unit.WTUnit unit = (wt.replication.unit.WTUnit) primaryBusinessObject; wt.replication.unit.UnitReplicationStatus stat = unit.getExportStatus(); if(stat == wt.replication.unit.UnitReplicationStatus.COMPLETE) { sendURL = wt.replication.unit.htmlGeneration.URLOperationHelper.getSendURL(unit); result="success"; } else result="failure"; ================= ReplicationPublish\ System.out.println("+++Workflow ReplicationUnit. got pre_export event on " + primaryBusinessObject); result="started"; ================= ReplicationPublish\ wt.folder.FolderEntry fe = (wt.folder.FolderEntry) primaryBusinessObject; boolean priv = wt.folder.FolderHelper.inPersonalCabinet(fe); if(priv) result="personal"; else result="shared"; ================= ReplicationPublish\ System.out.println("+++Received EXPORT_SCHEDULED event for " + primaryBusinessObject); result="success"; ================= ReplicationPublish\ wt.replication.unit.WTUnit unit = (wt.replication.unit.WTUnit) primaryBusinessObject; wt.replication.export.UnitExportRecord exportRecord= wt.replication.export.StandardExportService.enableScheduleItem(unit); if(exportRecord != null) { exporterUser = (wt.org.WTUser) exportRecord.getCreator().getPrincipal(); result="success"; } else result="failure"; ================= ReplicationPublish\ if(sharedCabinet) result="shared"; else { try { Thread.sleep(1000); } catch(InterruptedException e) {} result="private"; } ================= ReplicationReceive\ System.out.println("+++Workflow ReplicationReceive. got post_import event on " + primaryBusinessObject); wt.replication.unit.WTUnit unit = (wt.replication.unit.WTUnit) primaryBusinessObject; wt.replication.unit.UnitReplicationStatus stat = unit.getImportStatus(); if(stat == wt.replication.unit.UnitReplicationStatus.COMPLETE) { result="success"; } else { result="failure"; } ================= ReplicationReceive\ System.out.println("+++Workflow ReplicationUnit. got post_receive event on " + primaryBusinessObject); wt.replication.unit.WTUnit unit = (wt.replication.unit.WTUnit) primaryBusinessObject; wt.replication.unit.UnitReplicationStatus stat = unit.getReceiverStatus(); if(stat == wt.replication.unit.UnitReplicationStatus.COMPLETE) { importURL=wt.replication.unit.htmlGeneration.URLOperationHelper.getImportURL(unit); result="success"; } else result="failure"; ================= ReplicationReceive\ System.out.println("+++Receive operation scheduled on "+primaryBusinessObject); wt.replication.unit.WTUnit unit = (wt.replication.unit.WTUnit) primaryBusinessObject; wt.replication.receiver.UnitReceiveRecord receiveRecord = wt.replication.receiver.StandardReplicationRecvService.enableScheduleItem(unit); if(receiveRecord != null) { receiverUser= (wt.org.WTUser) receiveRecord.getCreator().getPrincipal(); result="success"; } else result="failure"; ================= ReplicationReceive\ System.out.println("+++Import operation enabled on "+primaryBusinessObject); wt.replication.unit.WTUnit unit = (wt.replication.unit.WTUnit) primaryBusinessObject; wt.replication.imp.UnitImportRecord importRecord=wt.replication.imp.StandardImportService.enableScheduleItem(unit); if(importRecord != null) { result="success"; } else result="failure"; ================= ReplicationReceive\ System.out.println("+++Receive operation scheduled on "+primaryBusinessObject); result="success"; ================= ReplicationReceive\ System.out.println("+++Workflow ReplicationReceive. got pre_import event on " + primaryBusinessObject); result="success"; ================= ReplicationReceive\ System.out.println("+++Got PRE_RECEIVE event for object " + primaryBusinessObject); result="success"; ================= ReplicationReceive\ System.out.println("+++Import operation scheduled on "+primaryBusinessObject); wt.replication.unit.WTUnit unit = (wt.replication.unit.WTUnit) primaryBusinessObject; wt.replication.imp.UnitImportRecord importRecord = (wt.replication.imp.UnitImportRecord) wt.replication.unit.WTUnitHelper.service.getLatestOperationRecord(unit# wt.replication.imp.UnitImportRecord.class); if(importRecord != null) { importerUser=(wt.org.WTUser) importRecord.getCreator().getPrincipal(); result="success"; } else result="failure"; ================= ReplicationSender\ wt.replication.sender.UnitSendRecord rec = (wt.replication.sender.UnitSendRecord) primaryBusinessObject; result = wt.replication.sender.StandardSenderService.enableScheduleItem(rec); ================= ReplicationSender\ System.out.println("+++Workflow ReplicationSender. completed send operation on " + primaryBusinessObject); wt.replication.sender.UnitSendRecord link = (wt.replication.sender.UnitSendRecord) primaryBusinessObject; sitePrincipal= (WTUser) link.getSite().getPrincipal(); siteName=link.getSite().getName(); wt.replication.unit.UnitReplicationStatus ss = link.getStatus(); if(ss == wt.replication.unit.UnitReplicationStatus.COMPLETE) result="success"; else result="failure"; =================