Skip Navigation

Custom Workflows Side Panel

The most commonly used side panel is the Custom Workflows Side Panel. The business purpose of this side panel is to aggregate custom workflows.

custom workflows

Contributing

Red Apps can contribute to Custom Workflows Side Panel via ExtensionPointService. The first step is to add all required imports:

import {RedAppSidePanelButton} from 'sabre-ngv-redAppSidePanel/models/RedAppSidePanelButton';
import {RedAppSidePanelConfig} from 'sabre-ngv-xp/configs/RedAppSidePanelConfig';
import {ExtensionPointService} from 'sabre-ngv-xp/services/ExtensionPointService';

Then Red Apps can contribute under redAppSidePanel key as follows:

// Creating Config
const config = new RedAppSidePanelConfig(
    // Buttons List
    [
        new RedAppSidePanelButton(
            // Label
            'Test Workflow',
            // Class Names
            'btn btn-secondary',
            // Callback Function
            onClick
        )
    ],
    // Priority
    10
);

// Adding Config
getService(ExtensionPointService).addConfig('redAppSidePanel', config);

Config Properties

The following properties can be defined for config:

Property Description

buttons

List of buttons that will be added with this config.

priority (optional)

Optional priority value that will be applied to all buttons in config. The lower the priority, the higher in the side panel the button will be. Buttons with the same priority are sorted alphabetically. If not defined defaults to 999.

Sabre Workflows Priorities

Workflows added to Custom Workflows Side Panel by Sabre have strictly defined priorities with values in 1000 increments. These values can be changed in Agency Admin Tool.

Button Properties

The following properties can be defined for button:

Property Description

label

Label of the button visible in the side panel that triggers defined onClick action.

className

String containing class names that will be added to button in the side panel.

onClick

Action that will be triggered once button in the side panel is clicked. This is a function that takes no arguments and returns void. It can be async.