Using the Propagate Execution Behavior  

In the scenario detailed below, the expert user subscribes to the update of a part: If the part is updated, a hole is created, if not, no hole is created. 
To do so, the expert user uses the Propagate execution behavior that triggers the update of the part if Action Delayed is not selected.

The scenario is divided into the following steps:

Remember to save your .CATfct file in the directory corresponding to the CATGraphicPath environment variable and the VBScript files in the \CATStartupPath\automation directory.

Create a Technological Type

  1. From the Start>Knowledgeware menu, access the Business Process Knowledge Template workbench.

  2. Create the PropagateUseCase technological type.

    • Click the Create Technological Type icon () to create a type. The Create technological type dialog box is displayed.

    • Enter the name of the type: Propagate.

    • Click OK to validate.

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

Add Behaviors to the Type

  1. Click The Propagate type and click the Sequential Combination behavior () to create a combination of behaviors. 

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

 

  1. Double-click SequentialCombination in the Behaviors View and Propagate in the Behaviors tab to access the sequential combination.

  2. Double-click the SequentialCombination node that is displayed in the Behaviors tab. (Expand the Propagate node if need be.)

  3. Enter the name of the combination, Generate pad with a hole in this scenario, in Name field of the opening dialog box and click OK to validate.

  4. Select the  Generate pad with a hole combination in the Behaviors tree and click the VB Script Behavior icon ().

  5. Double-click VBScript and enter Create a Pad in the Name field and select BktCreatePad.CATScript in the VB Name field.

  6. Select the  Generate pad with a hole combination in the Behaviors tree and click the Bind Object Behavior icon ().

  7. Double-click the BindObject behavior. The Bind Object window is displayed. In the Name field, enter Retrieve the part and enter ../../.. in the Relative Name field. Click OK to validate.

  8. Click the Generate pad with a hole combination and click the Propagate Execution icon (). A PropagateExecution behavior is displayed in the Behaviors tab.

  9. Double-click this behavior and enter Update the part in the Name field of the opening dialog box.

  10. Select the Target field, expand the BindObject variables node and select the output link. =BindObject\Link is displayed in the Target field.

  11. Select the  Generate pad with a hole combination in the Behaviors tree and click the VB Script Behavior icon ().

  12. Double-click VBScript and enter Create a Pad in the Name field and select BktCreateHole.CATScript in the VB Name field.

At this stage of the scenario, the Behaviors tab is similar to the graphic opposite.

The definition of the behaviors is now over.  Save your file and generate your workbench. (Click here to display the generated .CATfct file).

Generate the Workbench

  1. Click the Applicative Workbench Generation icon () to generate a user workbench. Enter the name of the workbench in the Workbench name field, Propagate Update in this example, an select the workbench type, Part  here.

Test 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. Open the BktPart_with_Sketch.CATPart part and access the Propagate Update workbench from the Start menu.

  3. Select Part1 in the specification tree and select the Propagate check box to type the root part. Its name is now Propagate(Part1).

  4. Right-click Propagate(part1) and select Propagate(Part1) object>Generate pad with a hole

The combination is executed and the following message is displayed.

  1. Click OK. The hole is created (see picture below.)

  1. Close your file and go back to your CATfct file.

  2. In the Behaviors tab, double-click the Propagate Execution behavior (Update the part) and select the Action Delayed check box. This way, the update of the part will not be launched. Save your file.

  3. Open the BktPart_with_Sketch.CATPart part and access the Propagate Update workbench from the Start menu.

  4. Select Part1 in the specification tree and select the Propagate check box to type the root part. Its name is now Propagate(Part1).

  5. Right-click Propagate(part1) and select Propagate(Part1) object>Generate pad with a hole. The following message is displayed.

  1. Click OK. The hole is created (see picture below.)

For more information about: