This documentation is for a version that is out of support.

You may want to view the same page for the latest version, or for any of the versions available in the drop-down menu in the top-right corner.

Create a process manager application

For Subscription editions only.

This page explains how to create your own custom process manager application.
This application functions like the Administrator application, but has a smaller scope, one that only controls processes, cases and tasks.
Creating such an application follows the same steps as the creation of any other custom application.

Process manager pages

The main menu of the application will require four pages.

  • Monitoring

  • Admin Process list

  • Admin Case list

  • Admin Task list

In addition to those, some orphan pages are required by the above ones :

  • Admin Process details

  • Process visualization

  • Admin Case details

  • Case visualization

  • Admin Task details

Process manager pages modifications

The above-mentioned menu pages are the same as the ones that are part of the Administrator application, but they only show the processes/cases/tasks that the user supervises.
In order to make the menu pages do so, you need to export them from the Administrator Resource List and edit them using the UI Designer. You don’t need to export and modify the orphan pages.

Currently, the Monitoring page is made using a different technology than UI Designer, and thus it needs to be updated differently.

Perform the following modifications to the 4 menu pages:

  1. Though not necessary, it is highly recommended to re-save your pages with a different name. This will prevent these pages from being over-written if you need to re-import the default pages.

  2. Add an api call to get current user session. Create a new "External API" variable called session with the value ../API/system/session/unusedId

  3. Since a process manager only supervises a subpart of all the processes/cases/tasks, some API calls must be updated to only retrieve the expected processes/cases/tasks. The filter supervisor_id has to be used with the current user ID in order to get the subpart of all elements that he manages.
    To do so, modify all the query parameters functions, inside the "Javascript expression" type variables, who’s names end with "Ctrl". Add ` + "&f=supervisor_id=" + $data.session.user_id` to the result of all such functions. To find such variables easier, you can just type "ctrl" in the variables search bar.
    For example: on the process list page, inside "enabledProcessCtrl" and "disabledProcessCtrl", add "&f=supervisor_id=" + $data.session.user_id string to the "queryParameters" variable. ==== Updating the Monitoring page

  4. To update the Monitoring page, unzip the monitoring page that we exported in the step above.

  5. Open the "index.html" file located inside the resources folder.

  6. Add the following lines of codes after the "getPortalUrl" function inside the "<script>" tag.

function getLoggedInUserIdAndDisplayPage() {
    var myHeaders = new Headers();
    var requestOptions = {
        method: 'GET',
        headers: myHeaders,
        credentials: 'include'
    };

    fetch(getPortalUrl() + "/API/system/session/unusedId", requestOptions)
        .then(response => {
            if (!response.ok) {
                throw Error(response.status);
            }
            response.json().then(function(json) {
                window.location.replace(getPortalUrl() + '/portal.js/' + window.location.search + '#/pm/monitoring?supervisor_id=' + json.user_id);
            });
        })
        .catch(error => {document.getElementById("error").innerHTML += "<br/> &#x26a0; Unable to retrieve authentication token from session. " + error;});
};
getLoggedInUserIdAndDisplayPage();
  1. Save the file and close it.

  2. Now, open the "page.properties" file located at the root folder, and change the displayname, name, and description to make it different than the Monitoring page of the Bonita Admin Application. For example: displayName= Bonita Process Manager Monitoring, name= custompage_processManagerMonitoringBonita, description= As per your requirement

  3. Save the file and close it.

  4. Select the "resources" folder and "page.properties" file and create a zip of the files.

Process manager application creation

After all the menu pages have been modified, the application can be created. To do so :

  1. Export the Bonita Administrator Application from the Application List and import it into the Bonita Studio

  2. Delete any orphan page that isn’t mentioned in the orphan pages list

  3. Delete all, but the BPM menu from the "Navigation" section

  4. Create application pages in the "Navigation" menu using the menu pages that we mentioned above. It is highly recommended to not modify the tokens of the pages, since the pages use of the specific tokens. If you modify the tokens, make sure to modify the pages to also use the correct urls.

  5. Rename your application and modify the application token

The "Process manager" application is now complete, ready to be deployed and used.