Customizing Variant Baseline Members
This section covers the following customizations of variant baseline members:
Using customization hook to implement control over transition of member link attribute status from one state to another.
Customizing the transitioning of soft attributes on the member link in JCA and Template Processor.
Customizing APIs to add (or remove) members to (or from) a variant baseline and setting attribute values on the baseline member link including baseline object revision.
Using Customization Hook to Implement Control over Member Link Attribute Status
Pre-requisites: To customize the variant baseline member link status, you must have the knowledge of the following:
Basic JAVA.
Basic knowledge of Type and Attribute Management, Enumeration constraints, and Global Enumeration.
Customizations in Windchill.
Procedure: Implementing the Service
To customize the values in the Status drop-down menu, implement the getValidStatus method of the wt.productfamily.StatusTransitionInterface interface. By default, all the status enumeration values are valid values and Status drop-down menu will list all of them. While customizing, you can restrict the values. The getValidStatus method returns Map<String, Map<String, String >>, where the user is keeping the status key value pair map against the ObjectIdentifier string representation of the FloatingBaselineMember. For example, the mapping is done against wt.vc.baseline.FloatingBaselineMember:FloatingBaselineObjectId.
When customizing the getValidStatus method, you must put the status map against the null key as well. The StatusMap against the null key is treated as the default status map for FloatingBaselineMemberLink that is to be created for an action such as addToBaseline.
Implement the following signature of method:
Modify the service against the statusTransitionDelegate selector. The service is registered as displayed in the following code:
Sample Code
The following sample code assumes that the status enumeration has the following key value pairs:
status1, Status 1
status2, Status 2
status3, Status 3
status4, Status 4
status5, Status 5
This code restricts that if the floatingBaselineMembers has the status as status1, then you can move only to status2. If the floatingBaselineMembers has status2, then you can move only to status3, and so on.
Customizing Transitioning of Soft Attributes on the Member Link in JCA
Pre-requisites: To customize the transitioning of soft attributes, you must have the knowledge of the following:
Basic JAVA.
Customizations in Windchill.
Procedure: Using Data Utility for Attributes
Configure the data utility for columns that need to control. Current Data Utilities for the columns can be viewed in JCA by adding &jcaDebug=true to the URL of a Windchill UI.
Customizing Transitioning of Soft Attributes on the Member Link in TemplateProcessor (UpdateBaselineTable UI)
Pre-requisites: To customize the transitioning of soft attributes in TemplateProcessor, you must have the knowledge of the following:
Basic JAVA.
Customizations in Windchill.
Using JavaScript Customization
Customizing APIs for Adding or Removing Variant Baseline Members and setting attribute values on the baseline member link including baseline object revision
To customize APIs for adding (or removing) members to (or from) a variant baseline and setting attribute values on the baseline member link including baseline object revision, you must have the knowledge of the following:
Basic JAVA.
Customizations in Windchill.
Procedure: Using PersistentHelper’s APIs
These APIs can be implemented by using PersistenceHelper’s APIs such as PersistenceHelper.manager.delete(), PersistenceHelper.manager.save(), and so on. All these APIs are multi-object APIs.
Using Customization Hook to Implement Control over Part Revision Column in Update Baseline Objects UI
Pre-requisite: To customize the revision column, you must have the knowledge of the following:
Basic JAVA.
Customizations in Windchill.
Basic Knowledge of reading part attributes.
Procedure: Implementing the Service
To customize the part revision column header and the values in the drop-down menu, implement the getRevisionAttributesHeaders and getRevisionAttributesValues methods of the com.ptc.windchill.lotbaseline.updatebaseline.RevisionAttributesDelegateIfc interface.
getRevisionAttributesHeaders: User can return header labels string of one or more part attributes in the desired format (space or comma-separated). Returned labels string will be appended to the out—of—the—box revision label — New Revision.
getRevisionAttributesValues(Object): User can return one or more part attribute values corresponding to the customized header labels in the desired format (space or comma-separated). Returned string will be appended to the out—of—the—box revision value.
Implement the following signature of method:
Modify the service against the revisionAttributesDelegate selector. The service is registered as displayed in the following code:
From Windchill shell, run the xconfmanager -Fvp command and restart the Windchill Server after updating the xconf file with your custom interface to take effect.
Sample Code
The following example appends the Modifier Name and Modified Time values of the part revision to the New Revision column of the Update Baseline Objects UI.
Was this helpful?