Modeling tasks in Modeler (Ada code)
You model a task through a Class or Data Type and its Operations:
The Class or Data Type must be stereotyped by the «Ada Task» and «Ada Anonymous» stereotypes.
The task body code is modeled through an Operation:
The Operation is stereotyped by the «Ada Create» stereotype.
The Operation Body property specifies the task body code.
Each entry of the task is modeled through an Operation stereotyped by the «Ada Entry» stereotype. Entry parameters are modeled through Operation Parameters.
For example:
* 
This procedure applies only to the Ada 83 and Ada 95 Code Generator DLL.
To model a task in Modeler:
1. If you have not done so already, add the Ada Profile package to the Model. How?
2. Create a Class or Data Type to represent the task:
a. Create a Class or Data Type. If the Class or Data Type is a child of a Package, the Package must have Namespace mapping.
b. Name the Class or Data Type to that of the task.
c. Apply the «Ada Task» and «Ada Anonymous» stereotypes to the Class or Data Type. How?
3. Create an Operation for the task body code:
a. Create a child Operation of the Class or Data Type.
We recommend that you name the Operation to that of the Class or Data Type.
b. Apply the «Ada Create» stereotype to the Operation. How?
c. Specify the task body code in the Body property of the Operation.
4. For each entry in the task:
a. Create a child Operation of the Class or Data Type.
b. Name the Operation to that of the entry.
c. Apply the «Ada Entry» stereotype to the Operation. How?
d. If the entry uses an array of Ada entries, use the appropriate «Ada Entry» stereotype tag definitions to record the array:
For an array such as (1..6), use the Ada Entry Family Index tag definition.
For an array such as (T), where T is a type, use Ada Entry Family Index Type tag definition to reference the appropriate Type Definition.
e. Set the properties of the Operation as required.
f. Create Operation Parameters to model any entry parameters.
5. If you want to generate the task body as a separate:
a. Apply the «Ada Separate» stereotype to the Operation. How?
b. Through the Ada Parent Subprogram tag definition (applied by the «Ada Separate» stereotype), reference the Operation that is generated as the subprogram that owns the separate.
Was this helpful?