Specifying Boundary Decisions

Specify a boundary decision object if your application uses a method call to interface with a database, message queue, or other resource. Suppose the function f1f() in the following example writes to a queue named abc:

int f1f(char*)
    return 0;
int f2f()
    return f1f(“abc”);

As far as the parser is concerned, f1f(“abc”) is a method call like any other method call. There is no indication from the code that the called function is writing to a queue.

When you specify the boundary decisions for a workspace, you tell the parser to create a decision object of a given resource type for each such call. Here is the decision object for the write to the queue:

int f2f().InsertsQueue.int f1f(char*)

You can resolve the decision objects to the appropriate resources in the Decision Resolution tool.

  1. Choose Options > Workspace Options. The Workspace Options window opens. Click the Boundary Decisions tab.
  2. In the Decision Types pane, select the decision types associated with called procedures in your application. For the example, you would select the Queue decision type.
  3. In the righthand pane, select each signature of a given method type you want to associate with the selected decision type. For the example, the method type signature would be int f1f(char*). Add signatures as necessary. Do not insert a space between the parentheses in the signature. You can use wildcard patterns allowed in LIKE statements by Visual Basic for Applications (VBA).
    Note: Keep in mind that the signatures of C or C++ functions can contain an asterisk (*) character, as in the example. So if you specify a signature with a * character, you may receive results containing not only the intended signatures but all signatures matching the wildcard pattern. Delete the unwanted decision objects manually.
  4. Select the project, folder, or source files for the application and choose:
    • Prepare > Verify if the source files have not been verified.
    • Prepare > Apply Boundary Decisions if the source files have been verified, but boundary decisions have not been specified for the application, or the specification has changed.
    A decision object is added to the tree for the source files in the Repository Browser.