Using the Onxxx Behaviors    

This scenario aims at providing the expert user with a use example of the Onxxx behaviors. 
In this scenario, the expert user tracks the insertion of a vehicle. When the vehicle is inserted, the Heel_pt_Line publication is checked. If Heel_pt_Line is published, a message is fired indicating that the publication is ok, if not, a message is fired indicating that the publication is missing.
Remember to save your .CATScript files in the startup\automation directory and your .CATfct file in the directory corresponding to the CATGraphicPath environment variable.
  1. From the Start>Knowledgeware menu, access the Business Process Knowledge Template workbench.

  2. Open the onxxx.CATfct file.

  3. In the Behaviors View, double-click the IndirectVision's Behaviors then  IndirectVision in the Behaviors tab.

  4. Expand the Define vehicle data combination. 

  5. Click the Define vehicle data combination and click the On Done Behavior icon ().

  6. Right-click the On Done behavior, select OnDone object>Reorder and click the Define vehicle data combination.

    At this stage of the scenario, your workbench is similar to the graphic opposite.

  7. Click the On Done behavior in the Behaviors tab and click the Information Behavior icon () to create the Information behavior that will display a message.

  8. Double-click the Information node and enter the following string in the Message field of the opening dialog box: Heel_Pt_Line published. Click OK to validate.

  9. Click the Define vehicle data and click the On Cancel Behavior icon ().

  10. Right-click the On Cancel behavior, select OnCancel object>Reorder and click the On Done behavior.

  11. Click the On Cancel behavior in the Behaviors tab and click the Information Behavior icon () to create the Information behavior that will display a message.

  12. Double-click the Information node and enter the following string in the Message field of the opening dialog box: Heel_Pt_Line publication missing . Click OK to validate.

  13. Click the Define vehicle data and click the On Done Behavior icon ().

  14. Double-click the On Done behavior. The On Done window is displayed.

  15. Enter When vehicle data is inserted... in the Name field and click OK to validate.

  16. Right-click the When vehicle data is inserted... behavior, select When vehicle data is inserted...object>Reorder, and click the OnCancel behavior. The When vehicle data is inserted... behavior is now located below the On Cancel behavior. (See picture below.)

  1. Click the When vehicle data is inserted... behavior and click the Bind Object behavior icon. BindObject is displayed in the Behaviors tab.

  2. Double-click the BindObject node. The BindObject editor is displayed.

    • In the Relative Name field, enter ../../../.. to bind the root product. For more information about the relative name syntax, see About the Bind Mechanism...

    • Click OK to validate

  3. Click the When vehicle data is inserted... behavior and click the Bind Publication behavior icon (). BindPublication is displayed in the Behaviors tab.

  4. Double-click the BindPublication behavior. The Bind Publication window is displayed.

  5. Click the Starting from: field, expand the BindObject node and click the output link. =BindObject\Link is displayed in the Starting from field.

  6. In the Relative Name field, enter Concept_Surfaces.1/Heel_Pt_Line.

  7. Double-click the OnDone behavior, click the Object to Survey field and click the When vehicle data is inserted behavior in the behaviors tree.

  8. From the Children Objects list, select BindPublication and click the right arrow. BindPublication is now is displayed from the Child Object to Survey list. Click OK to validate.

  9. Double-click the OnCancel behavior, click the Object to Survey field and click the When vehicle data is inserted behavior in the behaviors tree.

  10. From the Children Objects list, select BindPublication and click the right arrow. BindPublication is displayed from the Child Object to Survey list. Click OK to validate.

  11. Double-click the When vehicle data is inserted sequence, click the Object to Survey field and click the ComponentCreation behavior in the behaviors tree.

  12. From the Children Objects list, select Update and click the right arrow. Update is displayed from the Child Object to Survey list. Click OK to validate.

At this stage of the scenario, your workbench is similar to the graphic opposite.
  1. Save your .CATfct file in the Graphics directory. (Click here to open the created .CATfct.)

Generating the Workbench

  1. Click the Generate Applicative Workbench icon () to generate a user workbench. Enter the name of the workbench, Insert Vehicle in this example, as well as the workbench type (Product here).

Testing the Workbench

  1. From the Tools>Options>Knowledgeware>Business Knowledge Template menu, select All Users from the Access Rights scrolling list and click OK to work in a User environment.

  2. In the User Workbench, select Product1 in the specification tree and select the IndirectVision check box to type the root product. Its name is now IndirectVision:Product1.

  1. Right-click IndirectVision:Product1(Product1) and select IndirectVision (Product1) object>Define vehicle data

  2. Select the Vehicle_Data_with_Publication.CATPart file and click Open (Note that this vehicle contains a Heel_Pt_Line publication). The vehicle is inserted and a message is fired indicating that Heel_Pt_Line is published.

  3. Right-click IndirectVision:Product1 (Product1) and select IndirectVision (Product1) object>Control_Define vehicle data.

  4. Click Yes when prompted to withdraw the Define vehicle data combination.

  5. Right-click IndirectVision:Product1 (Product1) and select IndirectVision (Product1) object>Define vehicle data

  6. Select the Vehicle_Data_without_Publication.CATPart file and click Open (Note that the Heel_Pt_Line publication is missing in this part). The vehicle is inserted and a message is fired indicating that the Heel_Pt_Line publication is missing.