BPMN Explorer is a Jaggery-based lightweight web application, which provides the user interface for the end users to interact with deployed BPMN applications.
Basic structure of UI components
Each page of the web app is constructed by a set of Jaggery scripts as shown below.
The file structure of the BPMN Explorer is as follows:
|Contains resource files that are used for general purposes such as form generation and encoding.|
|Contains files to support i18n of the web app.|
|Contains the controllers of the web app.|
|css||Contains CSS files of the web app. It includes the bootstrap-theme.min.css and bootstrap.min.css files by default. Also, includes the style.css file for customizations.|
|The HTML file that is displayed when an HTTP 404 error occurs.|
|The HTML file that is displayed when an HTTP 500 error occurs.|
|Contains fonts and bootstrap related resources.|
|Stores resources (such as images) of the web app.|
|Contains all the models of the web app.|
Contains Jaggery scripts that construct the HTML main body content. Also, this contains a subdirectory named
|Includes all Jaggery configurations.|
The architecture of the BPMN Explorer consists of the following main Model View Controller (MVC) components.
Following model Jaggery scripts located in the
<BPS_HOME>/repository/deployemnt/server/jaggeryapps/bpmn-explorer/controller/ directory retrieve data from the BPMN REST API to display. It sends AdminServices requests to the back-end and retrieves data to render data in the HTML page.
|Relates to all the controllers. It retrieves and updates data that are common to all the pages and all the actions performed by the back-end implementation of the BPMN Explorer.|
|Creates a login failure message if previous logging activity failed.|
|Retrieves all the tasks assigned to the logged-in user.|
|Retrieves task details of a specific task using the task ID.|
|Generates the UI form for viewing claimable tasks.|
|Retrieves the list of tasks that the logged-in user can claim.|
|Retrieves information (including attachments) of a selected completed task instance.|
|Lists the completed tasks list in the Completed Tasks tab.|
|Retrieves all deployed BPMN processes.|
|Retrieves necessary information(i.e., tasks list, users list etc.) to generate reports.|
|Retrieves instances based on search queries.|
|Retrieves information on deployed BPMN tasks (e.g., attachments, meta data etc.)|
|Generates statistical charts for reports.|
View Jaggery files with respect to each page of the web app are located in the
<BPS_HOME>/repository/deployemnt/server/jaggeryapps/bpmn-explorer/template/ directory. They contain information on rendering the HTML body of the information retrieved in the associated Model.
Controller files are used to connect the Jaggery scripts that generate subparts of each page. Controller Jaggery files with respect to each page of the web app are located in the
<BPS_HOME>/repository/deployemnt/server/jaggeryapps/bpmn-explorer/controller/ directory. When the server receives a request, it maps it to a particular controller via URL mappings as follows.
Following controllers are special purpose controllers that do not provide HTML pages. Instead, they perform actions on behalf of the user.
taskController- performs control actions related to tasks.
authenticator- performs authentication of the user by logging in to the server through the AuthenticationAdmin service.
logout- performs logging out from the back-end server on behalf of the user.
communication- performs control actions related to communication among components.
startProcessController- performs control actions related to the starting process of tasks.
statsController- performs control actions related to statistics.
|URL||Mapping||Corresponding HTML Page|
|Claimable task view|
|Completed task view|
Loading the process diagram
wsRequest.js file loads the BPMN process diagram for the corresponding process instance in the BPMN Explorer. This avoids the need to authenticate again when viewing the process diagram. It contains following methods.
|Creates a SOAP request to the backend server.|
|Creates the SOAP payload to retrieve the process diagram.|
Deploying in an external server
You can deploy the BPMN Explorer in an external server other than WSO2 EI. Herein, you need to configure the WSO2 EI server location in the config.json file located in the
<BPS_HOME>/repository/deployment/server/jaggeryapps/bpmn-explorer/config/config.json file. Also, you need to configure the tenant domain in this file if you use the tenant mode of the server.