Class ESIProcessPlanRenderer

java.lang.Object
com.ptc.windchill.esi.rnd.BasicESIRenderer
com.ptc.windchill.esi.mpml.processplan.ESIProcessPlanRenderer
All Implemented Interfaces:
ESIRenderer

public class ESIProcessPlanRenderer extends BasicESIRenderer
This class renders the output of Process plan which includes header, operations, sequences, resources, operation usage links, operation to part links, operated on part links, standard procedure links, work center links, option set, plant and plant assignment link etc.

Supported API: true

Extendable: true
  • Method Details

    • getRoot

      protected MPMProcessPlan getRoot() throws WTException
      If root is already initialized, this method returns it to the caller; otherwise, it fetches a handle to the object corresponding to OBID, stores it in root and returns it.

      Supported API: true
      Returns:
      Handle to root.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • getObid

      protected String getObid()
      Gets the value of the attribute: OBID.

      Supported API: true
      Returns:
      String
    • isDelta

      protected boolean isDelta()
      Gets the value of the attribute: delta.

      Supported API: true
      Returns:
      boolean
    • isResources

      protected boolean isResources()
      Gets the value of the attribute: resources; Whether the resources associated with the Operation need to be published.

      Supported API: true
      Returns:
      boolean
    • isSequences

      protected boolean isSequences()
      Gets the value of the attribute: sequences.

      Supported API: true
      Returns:
      Boolean
    • isStandardProcedures

      protected boolean isStandardProcedures()
      Gets the value of the attribute: standardProcedures.

      Supported API: true
      Returns:
      Boolean
    • getSuboperationDepth

      protected int getSuboperationDepth()
      Gets the value of the attribute: suboperationDepth; Sub Operation up to what depth should be published.

      Supported API: true
      Returns:
      int
    • isOperatedOnPart

      protected boolean isOperatedOnPart()
      Gets the value of the attribute: operatedOnPart; Whether the operated on part associated with the Operation need to be published.

      Supported API: true
      Returns:
      boolean
    • isBomPart

      protected boolean isBomPart()
      Gets the value of the attribute: bomPart.

      Supported API: true
      Returns:
      boolean
    • isComponentParts

      protected boolean isComponentParts()
      Gets the value of the attribute: componentParts; Whether the BOM components associated with the Operation need to be published.

      Supported API: true
      Returns:
      boolean
    • isAlternates

      protected boolean isAlternates()
      Gets the value of the attribute: alternates.

      Supported API: true
      Returns:
      boolean
    • isSubstitutes

      protected boolean isSubstitutes()
      Gets the value of the attribute: substitutes.

      Supported API: true
      Returns:
      boolean
    • isReferenceDesignators

      protected boolean isReferenceDesignators()
      Gets the value of the attribute: referenceDesignators.

      Supported API: true
      Returns:
      boolean
    • isLineNumbers

      protected boolean isLineNumbers()
      Gets the value of the attribute: lineNumbers.

      Supported API: true
      Returns:
      boolean
    • getBomMultilevel

      protected int getBomMultilevel()
      Gets the value of the attribute: bomMultilevel; Upto what depth the BOM associated with the Process plan should be published.

      Supported API: true
      Returns:
      int
    • isDocuments

      protected boolean isDocuments()
      Gets the value of the attribute: documents; Whether the documents associated with the Operation need to be published.

      Supported API: true
      Returns:
      boolean
    • getConfigspec

      protected String getConfigspec()
      Gets the value of the attribute: configspec.

      Supported API: true
      Returns:
      String
    • getAuthentication

      protected String getAuthentication()
      Deprecated.
      : Use BasicESIRenderer.getAuth() instead of this.

      Supported API: true
      Gets the value of the attribute: authentication.
      Returns:
      String
    • getTransactionID

      protected int getTransactionID()
      Gets the value of the attribute: transactionID.

      Supported API: true
      Returns:
      int
    • getNcServerHolder

      protected NCServerHolder getNcServerHolder()
      Gets the value of the attribute: ncServerHolder.

      Supported API: true
      Returns:
      int
    • buildGroups

      public void buildGroups() throws ESIRendererException
      Populates the associated VdbBuilder instance with the response data for a process plan by invoking buildProcessPlan(). If parts associated with the process plan are requested, it fetches the parts in allRenderedPartsSet (a collection populated by buildProcessPlan()) and renders each of them using an appropriate renderer instance.

      Supported API: true
      Specified by:
      buildGroups in class BasicESIRenderer
      Throws:
      ESIRendererException - , if the preference "Enforce Changes" is set to "Yes" and the process plan being published is found to be an already published one, or if some other error was encountered while generating the response data.
    • getProcessPlan

      public com.infoengine.object.IeCollection getProcessPlan(String objectID, boolean delta, boolean processPlanPart, boolean resource, boolean sequence, boolean standardProcedure, String suboperationDepth, boolean operatedOnPart, boolean bomPart, boolean componentParts, boolean alternates, boolean substitutes, boolean referenceDesignators, boolean lineNumber, String bomMultiLevel, boolean documents, boolean workInstructions, String configSpec, String auth, String wcAdapter, String transactionID) throws WTException
      Deprecated.
      Use getProcessPlan(String, ESITransaction, Collection<ESITarget>, String, String, boolean) instead.
      GetProcessPlan RPC processor.

      Supported API: true
      Parameters:
      objectID - - Object ID of the process plan being rendered.
      delta - - If "true", returns only the changes since the last successful export. Default is "true".
      processPlanPart - - If true, return the parts associated with this ProcessPlan.
      resource - - If true, return the resource for ProcessPlan.
      sequence - - If true, return the sequences associated with the ProcessPlan.
      standardProcedure - - Indicates whether the associated Standard Procedures need to be rendered.
      suboperationDepth - - The number of levels of Operation, default is 1.
      operatedOnPart - - If true, return the Operated On Part of Operations.
      bomPart - - If true, return part information for the BOM header associated with the process plan.
      componentParts - - Indicated whether parts be created for the BOM's components.
      alternates - - If "true", returns alternate part information.
      substitutes - - If "true", returns substitute part information.
      referenceDesignators - - If "true", returns Reference Designator information.
      lineNumber - - If "true", returns line numbers info, no line numbers info otherwise.
      bomMultiLevel - - Up to what depth the BOM associated with the Process plan should be published.
      documents - - If "true", returns associated documents information.
      workInstructions - - Whether the work instructions associated with the Operation need to be published.
      configSpec - - The Config Spec. value to use when navigating the BOM. See the Query-Tree Webject documentation for acceptable and default values.
      auth - - This parameter contains authentication information from I*E.
      wcAdapter - - This parameter contains the name of the Windchill adapter.
      transactionID - - The TransactionID for this ObjectID.
      Returns:
      IeCollection - Response data in the form IeCollection.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • getProcessPlan

      public void getProcessPlan(Releasable mpmProcessPlan, boolean delta, boolean processPlanPart, boolean resource, boolean sequence, boolean standardProcedure, String suboperationDepth, boolean operatedOnPart, boolean bomPart, boolean componentParts, boolean alternates, boolean substitutes, boolean referenceDesignators, boolean lineNumber, String bomMultiLevel, boolean documents, boolean workInstructions, String configSpec, String auth, String wcAdapter, VdbBuilder builder) throws WTException


      Supported API: true
      Parameters:
      mpmProcessPlan - - Process Plan being rendered.
      delta - - If "true", returns only the changes since the last successful export. Default is "true".
      processPlanPart - - If true, return the parts associated with this ProcessPlan.
      resource - - If true, return the resource for ProcessPlan.
      sequence - - If true, return the sequences associated with the ProcessPlan.
      standardProcedure - - Indicates whether the associated Standard Procedures need to be rendered.
      suboperationDepth - - The number of levels of Operation, default is 1.
      operatedOnPart - - If true, return the Operated On Part of Operations.
      bomPart - - If true, return part information for the BOM header associated with the process plan.
      componentParts - - Indicated whether parts be created for the BOM's components.
      alternates - - If "true", returns alternate part information.
      substitutes - - If "true", returns substitute part information.
      referenceDesignators - - If "true", returns Reference Designator information.
      lineNumber - - If "true", returns line numbers info, no line numbers info otherwise.
      bomMultiLevel - - Up to what depth the BOM associated with the Process plan should be published.
      documents - - If "true", returns associated documents information.
      workInstructions - - Whether the work instructions associated with the Operation need to be published.
      configSpec - - The Config Spec. value to use when navigating the BOM. See the Query-Tree Webject documentation for acceptable and default values.
      auth - - This parameter contains authentication information from I*E.
      wcAdapter - - This parameter contains the name of the Windchill adapter.
      builder - The VdbBuilder to use when creating output.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • getProcessPlan

      public void getProcessPlan(MPMProcessPlan mpmProcessPlan, MPMProcessPlan root, Collection<ESITargetAssociation> processPlanTargets, boolean delta, boolean processPlanPart, boolean resource, boolean sequence, boolean standardProcedure, String suboperationDepth, boolean operatedOnPart, boolean bomPart, boolean componentParts, boolean alternates, boolean substitutes, boolean referenceDesignators, boolean lineNumber, String bomMultiLevel, boolean documents, boolean workInstructions, String configSpec, String auth, String wcAdapter, VdbBuilder builder, ViewReference defaultView) throws WTException
      For Standard Procedure

      Supported API: true
      Parameters:
      mpmProcessPlan - - Process Plan being rendered.
      root - - Root process plan of this process plan object.
      processPlanTargets - - Collection of ESITargetAssociation objects associated with the root process plan
      delta - - If "true", returns only the changes since the last successful export. Default is "true".
      processPlanPart - - If true, return the parts associated with this ProcessPlan.
      resource - - If true, return the resource for ProcessPlan.
      sequence - - If true, return the sequences associated with the ProcessPlan.
      standardProcedure - - Indicates whether the associated Standard Procedures need to be rendered.
      suboperationDepth - - The number of levels of Operation, default is 1.
      operatedOnPart - - If true, return the Operated On Part of Operations.
      bomPart - - If true, return part information for the BOM header associated with the process plan.
      componentParts - - Indicated whether parts be created for the BOM's components.
      alternates - - If "true", returns alternate part information.
      substitutes - - If "true", returns substitute part information.
      referenceDesignators - - If "true", returns Reference Designator information.
      lineNumber - - If "true", returns line numbers info, no line numbers info otherwise.
      bomMultiLevel - - Up to what depth the BOM associated with the Process plan should be published.
      documents - - If "true", returns associated documents information.
      workInstructions - - Whether the work instructions associated with the Operation need to be published.
      configSpec - - The Config Spec. value to use when navigating the BOM. See the Query-Tree Webject documentation for acceptable and default values.
      auth - - This parameter contains authentication information from I*E.
      wcAdapter - - This parameter contains the name of the Windchill adapter.
      builder - - The VdbBuilder to use when creating output.
      defaultView - - View reference of the root process plan.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • setData

      public void setData(String obid, boolean provideDelta, boolean buildProcessPlanPart, boolean resources, boolean sequences, boolean standardProcedures, String suboperationDepth, boolean operatedOnPart, boolean buildBOMPart, boolean buildComponentParts, boolean buildAlternates, boolean buildSubs, boolean buildRefDes, boolean useLineNumbers, String multiLevel, boolean buildDocs, boolean workInstructions, String configSpec, String auth, String wcAdapter, String transactionID, ViewReference viewRef) throws WTException
      Initializes this renderer instance appropriately.

      Supported API: true
      Parameters:
      obid - - Object ID of the process plan.
      provideDelta - - If false, renders the entire process plan as new; else renders the difference between the current and previously published iterations.
      buildProcessPlanPart - - Specifies whether the part associated with the process plan needs to be published.
      resources - - Specifies whether the resources associated with an operation need to be published.
      sequences - - Specifies whether the sequences associated with the process plan need to be published.
      standardProcedures - - Indicates if the associated Standard Procedures are to be rendered.
      suboperationDepth - - Specifies the depth up to which sub-operations in an operation should be published.
      operatedOnPart - - Specifies whether the operated on parts associated with an operation need to be published.
      buildBOMPart - - If true, returns part information for the BOM header associated with the process plan.
      buildComponentParts - - If true, returns part information for the components in the BOM associated with the process plan.
      buildAlternates - - If true, returns alternate parts info, default is "false". Only operative if buildBOMPart is true.
      buildSubs - - If true, returns substitutes data.
      buildRefDes - - If true, returns Reference Designator data.
      useLineNumbers - - If true, returns line numbers info; no line numbers info otherwise.
      multiLevel - - Specifies the number of levels of the BOM associated with the process plan to be published.
      buildDocs - - Specifies whether the documents associated with an operation need to be published.
      workInstructions - - Specifies whether the work-instructions associated with an operation need to be published.
      configSpec - - The Config Spec. value to use when navigating the BOM. See the Query-Tree Webject documentation for acceptable and default values.
      auth - - I*E authentication information to use when executing a query task.
      wcAdapter - - Name of the Windchill adapter instance to use when executing a webject.
      transactionID - - The ID of the underlying ESI transaction.
      viewRef - - ViewReference object representing the Windchill view that the process plan resides in.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • setData

      public void setData(String obid, boolean provideDelta, boolean buildProcessPlanPart, boolean resources, boolean sequences, boolean standardProcedures, String suboperationDepth, boolean operatedOnPart, boolean buildBOMPart, boolean buildComponentParts, boolean buildAlternates, boolean buildSubs, boolean buildRefDes, boolean useLineNumbers, String multiLevel, boolean buildDocs, boolean workInstructions, String configSpec, String auth, String wcAdapter, String transactionID, ViewReference viewRef, boolean useSavedFilterForPPPartLinks) throws WTException
      Initializes this renderer instance appropriately.

      Supported API: true
      Parameters:
      obid - - Object ID of the process plan.
      provideDelta - - If false, renders the entire process plan as new; else renders the difference between the current and previously published iterations.
      buildProcessPlanPart - - Specifies whether the part associated with the process plan needs to be published.
      resources - - Specifies whether the resources associated with an operation need to be published.
      sequences - - Specifies whether the sequences associated with the process plan need to be published.
      standardProcedures - - Indicates if the associated Standard Procedures are to be rendered.
      suboperationDepth - - Specifies the depth up to which sub-operations in an operation should be published.
      operatedOnPart - - Specifies whether the operated on parts associated with an operation need to be published.
      buildBOMPart - - If true, returns part information for the BOM header associated with the process plan.
      buildComponentParts - - If true, returns part information for the components in the BOM associated with the process plan.
      buildAlternates - - If true, returns alternate parts info, default is "false". Only operative if buildBOMPart is true.
      buildSubs - - If true, returns substitutes data.
      buildRefDes - - If true, returns Reference Designator data.
      useLineNumbers - - If true, returns line numbers info; no line numbers info otherwise.
      multiLevel - - Specifies the number of levels of the BOM associated with the process plan to be published.
      buildDocs - - Specifies whether the documents associated with an operation need to be published.
      workInstructions - - Specifies whether the work-instructions associated with an operation need to be published.
      configSpec - - The Config Spec. value to use when navigating the BOM. See the Query-Tree Webject documentation for acceptable and default values.
      auth - - I*E authentication information to use when executing a query task.
      wcAdapter - - Name of the Windchill adapter instance to use when executing a webject.
      transactionID - - The ID of the underlying ESI transaction.
      viewRef - - ViewReference object representing the Windchill view that the process plan resides in.
      useSavedFilterForPPPartLinks - - Specifies whether or not the Saved Filter should be applied while fetching part to process plan links.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • validate

      protected void validate() throws ESIRendererException
      Throws an exception if the attribute obid is null or is an empty string.

      Supported API: true
      Specified by:
      validate in class BasicESIRenderer
      Throws:
      ESIRendererException - if obid is either null or is an empty string.
    • getPreviousExportedIterationTgtAssociations

      protected Map<ESIProcessPlanRenderer.PreviousExportedIterationKey,Collection<ESITargetAssociation>> getPreviousExportedIterationTgtAssociations(MPMProcessPlan processPlan, Collection<ESITargetAssociation> currentProcessPlanTgtAssociations, boolean delta) throws WTException
      Computes the previous exported iteration for the input target associations. Invokes the API ESITransactionUtility.latestObjectExport(Collection, ESIPropertyRequest)

      Computing a previous exported iteration is target sensitive because each target is not guaranteed to have the same previously exported iteration. For example, a process plan could be associated with target 1, then exported, then associated with target 2, and exported a second time. In the case of the second export, target 1 has a previous exported iteration, while target 2 does not. Therefore, the output map contains a previous exported iteration mapped to collection of targets.

      Supported API: true

      Parameters:
      processPlan - - Current process plan being rendered.
      currentProcessPlanTgtAssociations - - Collection of distribution target associations. Typically the target association between the input process plan and current distribution target being processed.
      delta - - If false, previous exported iteration would be null for each target association.
      Returns:
      a map whose key is a previous Exported Iteration and the value is a collection of distribution target associations.
      Throws:
      WTException - if any of the invoked methods throws this exception.
    • getProcessPlan

      public com.infoengine.object.IeCollection getProcessPlan(String objectID, ESITransaction txn, Collection<ESITarget> tgts, String auth, String wcAdapter, boolean useECNDTAttrs) throws WTException
      Creates a VdbBuilder instance for the input transaction, renders the input process plan and creates release activities as appropriate for each of the distribution targets in tgts. The settings pertaining to ESI response generation for a given distribution target are fetched from the target itself. Returns the rendered output as an Info*Engine collection to the caller. Additionally this method renders the children of the assembly which is added as a related assembly to the input process plan, if they are associated with any additional targets than their parent.

      Supported API: true
      Parameters:
      objectID - UFID of the process plan to be rendered.
      txn - ESITransaction object that represents the delivery of data to the distribution targets in tgts; will be null when the method is invoked for the Preview functionality.
      tgts - Collection of distribution targets that represent a given destination, such as an ERP instance.
      auth - This parameter contains authentication information required for executing certain Windchill adapter webjects as part of the rendering process.
      wcAdapter - This parameter contains the name of the Windchill adapter instance.
      useECNDTAttrs - If true, distribution target attributes that figure in the ECN Settings section will be used for the response generation; otherwise, attributes that figure in the Process Plan Settings section will be used. For example, a true will be passed for this parameter when the method is invoked for the Preview functionality and the preference "Automatically Generate Change Notice" has a value "Yes".
      Returns:
      IeCollection The Info*Engine collection that holds the ESI response.
      Throws:
      WTException - - if any of the invoked methods throws this exception.
    • getRootToFetchOpionSetInfo

      protected Persistable getRootToFetchOpionSetInfo(MPMProcessPlan root) throws WTException
      Returns the root object to be used for fetching the option set information. This method is intended to be overridden by a customizer if they want to use a different root other than the input process plan. It returns the input process plan by default. The renderer "com.ptc.windchill.esi.ov.ChoiceMappableChoiceLinkRenderer" uses this object to find the appropriate option set for the current process plan being rendered. Check the java doc of this renderer for more information.

      Supported API: true
      Parameters:
      root - - process plan.
      Returns:
      the root object.
      Throws:
      WTException - throws wtexception, if any.