About ALM Events

During an ALM user session, as the user initiates various actions, ALM triggers event procedures. You can place code in these procedures to customize the execution of the associated user actions.

The Script Editor lists the event procedures for each ALM module, and allows you to add your code to the appropriate procedure. For details, see Working with the Workflow Script Editor.

The code you add to the event procedures can access ALM objects. For details, see Workflow Object and Property Reference.

Event procedures can be functions or subroutines:

  • Event functions. These procedures are triggered by ALM to check whether the user's action should be performed. You can place code in these functions to determine whether ALM may execute the user's request. If your code returns a value of False, ALM does not proceed with the action.

    For example, when a user clicks the Submit button on the Add Defect dialog box, ALM invokes the function Bug_CanPost before posting the defect to the database on the server. You can add code to the Bug_CanPost function to control whether ALM posts the defect. For example, you can ensure that a user cannot reject a defect without adding a comment. For example, see Example: Object Validation.

  • Event subroutines. These procedures are triggered to perform actions when an event takes place.

    For example, when a user opens the Add Defect dialog box, ALM invokes the subroutine Bug_New. You can add code to the Bug_New subroutine to perform actions that should be performed when a user opens the dialog box. For example, you can change the value of the Detection Mode field to BTW if the user is not in the QA Tester user group. For example, see Example: Changing a Field Based on the User Group.

Version Control: After enabling version control for a project, you should review all its workflow scripts and make adjustments for each checked in entity. This includes the following entities: Req, Test, Resource, and Component. For each checked in entity that includes a Post function in its script, you must modify the script. To modify, add a Checkout function before every Post function. Making this modification prevents the Check Out dialog box from opening each time a call to a Post function is made. For details about the Post and Checkout functions, see the ALM Open Test Architecture Reference.

For details on version control, refer to the Micro Focus Application Lifecycle Management User Guide: Version control.