Share this Page URL

Chapter 6. Writing Tasks, Procedures, and Steps > Writing Procedures - Pg. 86

Writing Tasks, Procedures, and Steps Example 6-3. Task Written as Continuous Prose 86 8.4.1 Verifying the Result of an Asynchronous Operation To enable your application to perform different actions depending on whether an asynchronous operation succeeds, verify the result of the operation. For example, verify the result of an asyn- chronous operation to notify the user or to perform another recovery action if the operation fails. To verify the result of an asynchronous operation, call the get_except function of the Waiter class. The get_except function returns one of the following values: · If the operation failed, get_except returns a pointer to an instance of the ExceptionType class. This instance provides information on why the operation failed. · If the operation succeeded, get_except returns NULL. Example 6-4. Another Task Written as Continuous Prose 12.3.1 Activating Access Control Access control is set active or inactive during installation. If you want to enforce access control in your application, make sure that access control is active. To determine whether access control is active, call the get_access_control_switch function of the ACAccessControlRules class. To activate access control, call the set_access_control_switch function of the ACAccess- ControlRules class. In the call to set_access_control_switch, specify the access control switch status as emAccessControlOn. To deactivate access control, call the set_access_control_switch function of the ACAc- cessControlRules class, specifying the access control switch status as emAccessControl- Off. Writing Procedures A procedure is usually an ordered set of steps. However, a procedure can include only one step. A procedure can include prerequisites. A procedure can also be preceded by explanatory text or by cross-references to overview or supplementary information. A procedure can also be followed by one or more examples and pointers to the next procedure or next topic that needs to be addressed. To write effective procedures, follow these guidelines: · · · · Write procedures that are easy to follow. Place procedures appropriately. Use procedure headings appropriately. Use one method to describe how to perform steps in a single procedure. Write Procedures That Are Easy to Follow To help readers understand and follow procedural content, use these guidelines when writing pro- cedures: · Try to write no more than 10 steps for each procedure. If a procedure is a long, single series of steps, the procedure might be too complex. If a procedure is too long, review the user task analysis to see whether you can divide the task into two or more smaller procedures.