|
-
From the Start>Knowledgeware menu, access the
Business Process Knowledge Template workbench.
-
Create the DominoesSet technological type.
- Click the Create Technological Type icon ()
to create the technological type. The Create technological type
dialog box is displayed. Enter DominoesSet.
|
|
-
Click the DominoesSet type and click the Sequential
Combination behavior ()
to create a combination of behaviors.
-
Double-click the SequentialCombination in the Behaviors
View and DominoesSet in the Behaviors tab to access the sequential
combination.
-
Double-click the SequentialCombination node that is
displayed in the Behaviors tab. (Expand the DominoesSet node if need be.)
-
Enter the name of the combination, Instantiation in
context in this scenario, in the Name field of the
opening dialog box and click OK to validate.
-
Select the Instantiation in context
combination in the Behaviors tree and click the Bind Object Behavior
icon ().
-
Double-click the BindObject behavior. The Bind Object
window is displayed.
- Enter Bind Part in the Name field.
|
- Enter ../../.. in the Relative Name field. Click OK
to validate.
|
-
Select the Instantiation in context
combination in the Behaviors tree and click the Bind Object Behavior
icon ().
- Enter Bind PartBody in the Name field.
|
- Click the Starting from field, expand the BindPart variables
node and select the Link. =BindPart\Link
is displayed in the Starting from field.
|
- Enter PartBody in the Relative Name field. Click OK
to validate.
|
-
Select the Instantiation in context
combination in the Behaviors tree and click the Bind Object Behavior
icon ().
-
Double-click the BindObject behavior. The Bind Object
window is displayed.
- Enter Sketch Support in the Relative Name field.
|
- Click the Starting from field, expand the Bind PartBody
variables node and select the Link. =Bind PartBody\Link
is displayed in the Starting from field. Click OK to
validate.
|
-
Select the Instantiation in context
combination in the Behaviors tree and click the Load Behavior
icon ().
-
Double-click the LoadDocument node. The Load Document
editor is displayed.
- Click the ... button and select the
BktUDFDomino.CATPart
in the File Selection dialog box and click Open when
done.
|
|
-
Select the Instantiation in context
combination in the Behaviors tree and click the Bind User Feature
icon ().
-
Double-click the BindUserFeature in the Behaviors tree.
The Bind User Feature editor is displayed.
- Select the From object: field, expand the LoadDocument
variables node and select the Document output. =LoadDocument\Document
is displayed in the From object: field.
|
|
-
Select the Instantiation in context
combination in the Behaviors tree and click the Loop icon ().
-
Double-click the Loop in the Behaviors tab. The Loop
editor is displayed.
- Enter the number of iterations: 15.
|
- Click the Attributes tab and add the following attribute:
Name |
Inst_Ratio |
Type |
Real |
Quality |
Input |
Value |
0.1 |
|
|
-
Select the Loop combination in the Behaviors
tree and click the Knowledge Relations Behavior icon ().
-
Double-click the KnowledgeRelations behavior. The
Knowledge Relations editor is displayed.
-
Click the Attributes tab and add the following
attributes:
Name |
TempRatio |
Type |
Real |
Quality |
Internal |
|
|
Name |
RatioforUDF |
Type |
Real |
Quality |
Output |
|
|
Name |
ratio |
Type |
Real |
Quality |
Input |
|
|
Name |
UDF_Act |
Type |
Boolean |
Quality |
Output |
Value |
False |
Name |
Info_Act |
Type |
Boolean |
Quality |
Output |
Value |
False |
-
In the Content tab, right-click the TempRatio attribute
and select Edit Formula. The Formula editor is displayed.
-
Enter the following formula: TempRatio=ratio + `DominoesSetMDL\Instantiation
in context\Loop\Iteration`
/ 2 * 0.1 . Click OK when done to close the editor.
-
Click the Content tab and click the Rule icon ().
Enter the following rule body into the rule editor, click OK
when done and OK to exit the Knowledge Relations editor.
if TempRatio <= 1
{
RatioforUDF = TempRatio
UDF_Act = TRUE
Info_Act = FALSE
}
else
{
RatioforUDF = TempRatio
`DominoesSetMDL\Instantiation
in context\Loop\NumberOfIterations`
= `DominoesSetMDL\Instantiation
in context\Loop\Iteration`
UDF_Act = FALSE
Info_Act = TRUE
} |
-
Expand the Knowledge Relations variables node as well as
the Loop variables node.
-
Right-click the ratio variable located below the
Knowledge Relations node, select ratio object>Link To, and
click the Inst_Ratio variable located below the Loop node. Both variables
are now linked.
-
Select the Loop combination in the Behaviors
tree and click the Instantiate Template Behavior icon ().
- Click the Template feature field, expand the BindUserFeature
node and select the UserFeature. =BindUserFeature\UserFeature
is displayed in the Template feature field.
|
- Click the Destination field, expand the Bind Part node and
select the Link. =Bind Part\Link
is displayed in the Destination field.
|
- Click Add in the Defined inputs and parameters
field and add the following attributes:
Name: ratio, Type: Real, Quality: Input, Value: 0.1
|
Name: Sketch.1, Type: Pointer, Quality: Input |
|
|
-
Expand the Instantiate Template variables node,
right-click the ratio variable located below the Knowledge Relations
node, select ratio object>Link To, and click the RatioforUDF
variable located below the Knowledge Relations node.
-
Right-click the Sketch.1 variable, select Sketch.1
object>Link To, expand the Bind Sketch Support variables node and
select the Link.
-
Right-click the Activity variable, select Activity
object>Link To, and click the UDF_Act variable located below the
Knowledge Relations node.
-
Select the Loop combination in the Behaviors
tree and click the Synchronize Parameters Behavior icon
().
-
Double-click the SynchronizeParameters behavior in the
Behaviors tree. The Synchronize Parameters editor opens:
- Click the From Parameter field, expand the Knowledge
Relations node and click the RatioforUDF variable. =KnowledgeRelations\RatioforUDF
is displayed in the From Parameter field.
|
- Click the To Parameter field, expand the Loop node and click
the Inst_Ratio variable. = Loop\Inst_Ratio
is displayed in the To Parameter field.
|
|
-
Expand the SynchronizeParameters behavior node in the
Behaviors tree. Right-click the Activity variable, select Activity
object>Link To and click the UDF_Act variable located below the
Knowledge Relations node.
-
Select the Loop combination in the Behaviors
tree and click the Add To List Behavior icon ().
-
Double-click the AddToList behavior. The AddToList editor
is displayed:
- Click the List field, expand the Loop variables node and
select the List feature. = Loop\List
is displayed in the List field.
|
- Click the Object: field, expand the BindUserFeature variables
node and select the UserFeature. =BindUserFeature\UserFeature
is displayed in the Object field.
|
|
-
Expand the AddToList behavior node. Right-click the
Activity variable, select Activity object>Link To and click
the UDF_Act variable located below the Knowledge Relations node.
-
Right-click the Index variable, select Index
object>Link To and click the Iteration variable located below the
Loop node.
-
Select the Loop combination in the
Behaviors tree and click the VB Script Behavior icon ().
-
Double-click the VBScript behavior in the behaviors tree.
The VBScript editor is displayed.
|
- Click Add in the Defined inputs and parameters
field and add the following attributes:
- Name: Iteration, Type: Integer, Quality: Input,
Value: 1
|
- Name: Ratio, Type: Real, Quality: Input, Value: 0.1
|
- Name: NextRatio, Type: Real, Quality: Input, Value:
0.15
|
|
|
-
Expand the VBScript behavior node. Right-click the
Iteration variable, select Iteration object>Link To and click
the Iteration variable located below the Loop node.
-
Right-click the Ratio variable, select Ratio
object>Link To and click the Inst_Ratio variable located below the
Loop node.
-
Right-click the NextRatio variable, select NextRatio
object>Link To and click the RatioforUDF variable located below the
Knowledge Relations node.
-
Right-click the Activity variable, select Activity
object>Link To and click the Info_Act variable located below the
Knowledge Relations node.
|
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).
-
Click the Applicative Workbench Generation
icon ()
to generate a user workbench. Enter the name of the workbench in the
Workbench name field, Dominoes in this example, and select the
workbench type, Part in this scenario.
-
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.
-
Open the
BktDominoSystem.CATPart file.
-
Click the root of the specification tree, the
icon, the root of the
specification tree, and click the DominoesSet icon to type the product.
-
Right-click DominoesSet (Part2) object and select
DominoesSet(Part2) object>Instantiation in Context. The Dominoes
are instantiated and a message is displayed indicating that the
instantiation will stop at iteration 6.
|