Using the Call Behavior  

In the scenario detailed below, you are going to generate a workbench that enables end-users to open a Part containing a car and then instantiate a driver into this car. To do so, you are going to re-use a sequence stored in a .CATfct previously created and declared in the Knowledgeware Index. The scenario is broken down into the following steps:
This behavior enables you to reuse existing patterns of behaviors without duplicating data. For more information about the Call behavior, see Call Behavior: Data Sheet.
Remember to save 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 BktBehaviorCallLibrary1.CATfct file. This file contains the sequence that you are going to re-use.

Expose the Sequence to Be Re-used

  1. In the Behaviors tab, click the DefineComponent sequence and click the Expose Main Behavior icon (). The icon associated to the DefineComponent sequence turns to green () indicating that the sequence is now exposed in the Knowledge Dictionary. If the sequence is not correctly exposed, the icon turns to red (). For more information about this dictionary, see  Infrastructure User's Guide: Advanced Tasks: Managing Knowledgeware Resources.

Add the Call Behavior

  1. Open the BktUseCall.CATfct file. In the Behaviors View, double-click the IndirectVision behaviors node to open the Behaviors tab.

  2. In the Behaviors tab, expand the IndirectVision and the Define driver nodes. The Define driver sequence already contains a BindObject behavior that will enable you to access the root Product when working in the generated workbench.

  3. Click the Define driver sequence and click the Call behavior icon () in the Infrastructure toolbar. The Call behavior is created.

  4. Double-click it to open the Call behavior window, then select the sequence that you want to re-use and map the attributes:

    • Select the sequence to reference. To do so, in the Behavior Name field, click the ... button. Click the DefineComponent sequence in the browser and click OK.

    The browser lists the sequences exposed in the session and the ones exposed and referenced in the Knowledgeware index file.
    • Click Map Attributes. The required attributes are mapped.

    • Click OK when done to close the Call window.

  5. Expand the BindObject and the Call behavior nodes, right-click the FatherProduct input parameter located below the Call behavior node, select FatherProduct object>Link and click the Link output parameter located below the BindObject node.

    The picture above shows the Define driver sequence containing the Call behavior. The picture above shows the Define driver sequence and the behaviors that you would have used if you had not used the Call behavior.
  6. Valuate the Part_name variable. To do so, double-click it and enter a name in the dialog box. Click OK when done.

  7. Save your file.

Generate and Test the Workbench

  1. Click the Generate Applicative Workbench icon () to generate a user workbench. Enter the name of the workbench, Insert_Driver in this example, and select the workbench type (Product here).

  2. 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.

  3. 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.

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

  5. Select the BktVehicleData.CATPart file and click Open. The vehicle is inserted.

  6. Right-click the IndirectVision (Product1) object in the tree and select IndirectVision (Product1) object>Define driver.

  7. Select the BktDriver2D95Male.CATPart file and click Open. The driver is inserted.