Policy Without Triggers

ClearTrigger allows you to get your organization up-and-running with policies in place with minimal development time and effort. In many cases organizations can quickly realize benefits such as the ones listed below:

Remember! The ClearBits_File Web Generator for ClearTriggerTM makes this even easier.

Clearbits web-generator for ClearTrigger...

This section describes brief scenarios that demonstrate how to use ClearTrigger to implement and enforce common development policies

Policy: Prevent Use of Certain Commands

Use ClearTrigger to prevent users from executing various commands. In the Enterprise Commands section of clearbits.txt add the commands or command groups you want to restrict:

Adding an entry like the ones above to the command inhibited field would produce a dialog box like below when a inhibited user attempts an inhibited command...

... or the policy maker could use the ClearTrigger command GUI options to get a more customized dialog without having to write code:

Adding an entry like the ones above to the command GUI dialog definition would produce a dialog box like below when a inhibited user attempts an inhibited command.

Remember! The ClearBits_File Web Generator for ClearTriggerTM makes this even easier.

Policy: Prevent particular users from using certain commands

Use ClearTrigger to prevent users from executing various commands. In the Commands section of clearbits.txt add to command inhibited users lists or add region inhibited users to the Enterprise Section of the clearbits.txt.

Restricting users by command(command section):

A similar command keys like the ones below to command section with the command inhibited user field poplated.

Adding an entry like the ones above to the command inhibited user field would produce a dialog box like below when a any user not in the list attempts the command...

Allowing only select users by command(command section):

A similar command keys like the ones below to command section with the command allowed user field poplated.

Adding an entry like the ones above to the command inhibited user field would produce a dialog box like below when a any user not in the list attempts the command...

... or the policy maker could use the ClearTrigger command GUI options to get a more customized dialog without having to write code:

Adding an entry like the ones above to the command GUI dialog definition would produce a dialog box like below when a inhibited user attempts an inhibited command.

Restricting users by region (enterprise section):

Populate the region inhibited users field like the one below in the enterprise section of the clearbits file:

Adding an entry like the one above to the region inhibited field would produce a dialog box like below for any data modifying action that might be attempted by "fred" or "jgardner".

Remember! The ClearBits_File Web Generator for ClearTriggerTM makes this even easier.

Policy: Require Comments for all Changes

Here you want all developers, but not SCM administrators, to add a 10-word comment to changes made to the source code.

Adding an entry like the ones above to the command required comment field would produce a dialog box like below when a inhibited user attempts an inhibited command.

Remember! The ClearBits_File Web Generator for ClearTriggerTM makes this even easier.

Policy: User Defined GUI Dialogs

With ClearTrigger you can create your own dialog windows that ask questions or ask for input without having to write code using clearprompt or worry about temporary file creation or cleanup. Three fields are added to each command key that allows you to define the dialog as a prompt or question, define the displayed prompt, and define the buttons displayed and the default button or string.

Consider a dialog definition below:

;{dialog_type};{dialog_prompt};{dialog_mask or dialog_string or dialog_choices}

Where the first field (dialog_type) is:

Value Defines this feature as...
'E' No dialog is requested
'Q' A Question dialog is requested
'P' A Prompt dialog is requested
'S' A Selection dialog is requested

Where the second field (dialog_prompt) is any string without semi-colons ';' in it.

If the requested dialog is a Question dialog then the third field is a Dialog_Mask that contains a mask string containing button characters in any order from the characters ('C','N','Y'):

Value Displays ths button...
'C' Cancel button
'N' No button
'Y' Yes button

Only buttons in the mask are displayed and always in this order Yes, No, Cancel when they exists. The first button requested is the default button and is pre-selected in the displayed dialog.

The command keys ending like the ones below:

;Q;I don't want you to do this...;C;     
    
;Q;This is a question?;YNC;

Produce dialogs like the ones below respectively:

or

Where the environmental variable CLEARTRIGGER_DIALOG_REPLY would be set to 0 for Yes or 1 for No and is available for use in triggers defined within the command key. When Cancel is selected it always stops the processing.

If the requested dialog is a Prompt dialog then the third field is a Dialog_String that contains a string (possibly empty) that constitutes the displayed default string in a text dialog box.

The command keys ending like the ones below:

;P;Please input a defect number...;;
    
;P;This is a question?;Default answer...;

Produce dialogs like the ones below respectively:

  

The OK and Cancel buttons are always displayed. The environmental variable CLEARTRIGGER_DIALOG_REPLY would be set to 0 for OK and is available for use in triggers defined within the command key. When Cancel is selected it always stops the processing. The environmental variable CLEARTRIGGER_REPLY_STRING would be set to the input string and is available for use in triggers defined within the command key.

If the requested dialog is a Selection dialog then the third field is a Selection_List that contains a string (must be populated) that constitutes the displayed values to select from (they must be comma ',' separated).

The command key ending:

;P;Please input a branch mode...;integration,system test, unit test, private;

Produce a dialog like the one below:

The Yes and Abort buttons are always displayed. Only single selection is supported. The environmental variable CLEARTRIGGER_DIALOG_REPLY would be set to 0 for Yes and is available for use in triggers defined within the command key. When Abort is selected it always stops the processing. The environmental variable CLEARTRIGGER_REPLY_STRING would be set to the selected choice and is available for use in triggers defined within the command key.

Remember! The ClearBits_File Web Generator for ClearTriggerTM makes this even easier.