BUSINESS ACTIONS

The BUSINESS ACTIONS tab of the Component Showcase application demonstrates the use of the <bpm-business-actions-drop-down> business component.

To view or edit the source files for this example, open the Component Showcase application and browse to the componentDemos/bizActions folder.

BusinessActions.html

The page:
  • displays the bpm-business-actions-drop-down business component, which lists the available business actions in an accordion control. You can use the control to select and start a business action.
        <!-- Left Navigation Content --> 
        <md-sidenav md-is-locked-open="$mdMedia('gt-sm')" class="appTraySideNav md-whiteframe-z2" md-component-id="left" layout="row">
            <business-actions-drop-down actions-count="currActionsCount" set-main-content="setMainContent" form-div="formDiv" action-groups="actionGroups" expand-actions="expandActions"></business-actions-drop-down>
        </md-sidenav>
  • defines an element to be used to display a started business action form.
        <!-- MAIN CONTENT -->
        <md-content flex id="content" layout="row">
            <div class="mainContent" flex>
                <div ng-show="isMainContentShowingForm()" id="{{formDiv}}"></div>
            </div>
        </md-content>

js/BizActionSample.js

The BizActionSampleCtrl controller defines the parameters that need to be passed to the bpm-business-actions-drop-down business component on the $scope object:

$scope.currActionsCount = 0;
$scope.actionGroups = [];
$scope.expandActions = true;
$scope.setMainContent = function(content) {
    $scope.main_content = content;
};
$scope.isMainContentShowingForm = function() {
    return ($scope.main_content == "form");
};

$scope.formDiv = "formAddDiv";