What is a Hook?
Hooks are native operating system executables or scripts that accept specific data from the Windchill Workgroup Manager and generate feedback that the Windchill Workgroup Manager analyzes and applies to its internal data structures accordingly.
When the user triggers a Windchill Workgroup Manager action, it initiates a chain of sub-processes that occur in a specific order to make up the whole of the action. There exist points in the execution of these sub-processes that allow for an administrator to add to or replace Windchill’s default behavior.
For example, the Get Design Item List action has the following sub-processes:
• Find the design items inside the design data set.
• Create the list of items.
• Show the items inside the drop-down box in the Windchill Workgroup Manager’s interface.
The Create List of Design Files hook allows Windchill’s default way of creating the list of design items to be replaced by one written by the user or administrator.
Similarly, you might find it necessary to alter the way in which the data from your ECAD application is used to create a BOM. In this case, you could use the Create BOM or Create Variant BOMs hook to substitute a batch file or script that you have created which processes your BOM data in a way that differs from Windchill’s default behavior.
When a Windchill Workgroup Manager function is invoked, Windchill looks to see if a hook for that action has been enabled. If it has, Windchill looks for the referenced batch file or script, and run it. When the execution has completed, Windchill resumes its normal operation, using the data that has been fed back to it by the external file. The process is shown in the diagram below: