Show TOC

Procedure documentationCreating a Function

 

With the newly created application in the Object Manager panel still open, we now proceed with adding elements to the application. The first object we need is a function that serves as an interface between the calling application and the internal business logic modeled with BRFplus.

Procedure

  1. Create a Function

    1. In the Object Manager panel of the application that you just have created, under the Detail section, choose the Contained Objects tab.

      The Contained Objects tab page appears.

    2. Choose Function from the Type field and choose Create Object.

    3. In the Object Creation dialog box that appears, enter Tax_Calculator in the Name field and choose Create and navigate to object.

      The function is created and opens in the Object Manager panel.

  2. Assign Top Expression to the Function

    1. Under the Detail section on the Properties tab of the new application, select Functional Mode as Mode.

      The Top Expression field appears.

    2. Choose (Graphical Access) next to the Top Expression field.

    3. In the context menu, choose Create ....

    4. In the Object Creation dialog box that appears, choose Decision Tree in the Type field and enter Tax_Calculation in the Name field.

    5. Choose Create.

      Top expression Tax_Calculation is now assigned to the Tax_Calculator function.

  3. Assign Context Data Object to the Function

    1. Under the Detail section, choose the Signature tab.

      The Signature tab page opens.

    2. Under Context, choose Start of the navigation path Add New Data Object Next navigation step Add New Data Object End of the navigation path.

    3. In the Object Creation dialog box that appears, enter Gross_Salary in the Name field.

    4. Choose Amount from the Element Type field.

    5. Choose Create.

      The data object is added as the context.

  4. Assign Result Data Object to the Function

    1. 1. Under the Detail section, choose the Signature tab.

    2. Under Result Data Object, choose (Graphical Access) next to the Result Data Object field.

    3. In the context menu, choose Create....

    4. In the Object Creation dialog box that appears, enter Payable_Tax_Amount in the Name field and Amount to be paid in the Text field.

    5. Choose Amount from the Element Type field.

    6. Choose Create.

      The data object is added as the result data object.

  5. Save the function.