Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • High-Level Requirements
    • Dashboard views of Service lists
      • Filtering capabilities based on search criteria
      • Configurable search criteria
    • Dashboard views of statistics (donuts, pie charts, etc.) for filtered request/service instances
    • Process / Service Instance Rendering and detail panel views
      • with sub-process/service instance drill-drown and drill-up capabilities
        • A process/service instance could be realized by multiple process instances
      • with process / task detail
      • Topology (workflow) views during/after orchestration
      • Provide process activity trails to identity the execution path and failure indication
    • Input/output data views for process/task/service task (messages, parameters)
      • Display on service / task detail panel
      • Provide message log views (could be on a pop-up widget)
    • Color coding/visual indication of statistic and task execution trails

...

  • Widget Requirements and Design
    • *** Note 1: actual screen layout and display can be changed based on implementation decisions. ***
    • *** Note 2: the service list panel columns can be changed based on the database table columns. The important fields would be the request id / service instance id, requester id, date/time for filtering.***
    • *** Note 3: we can add a new field, Proc_Inst-ID varchar(64) to the Infra_Active_Requests database table, to associate it (as a top-level process instance id) with the service instance id
    • Service List Widget 
      • Capabilities
        • Provides monitoring capabilities for processed services based on search criteria
          • Configurable Search Criteria filtering: Service ID, Operation Type, Status, User Id, Date/Time range
          • Actual filtering criteria fields could be changed based on configuration
        • The Service List panel will display the filtered Service list.
        • This widget can be triggered from other UIs (VID, UUI, external applications).
      • Design
        • The search criteria fields will be defined in a search criteria field configuration file (e.g., so-monitoring-config.yaml). So, they can be customized and support internationalization.
        • Based on the fields and buttons configuration, the Service List widget will render the corresponding fields and buttons.
        • The search criteria fields support the field validation based on the field type; e.g., length, date format, time format.
        • The Service List panel supports pagination, which will be controlled by the Navigation buttons.
        • Queries a service list from the SO Request DB through the Monitoring REST APIs.
        • Action buttons are enabled/disabled based on data population and/or context.
        • The wild characters are supported for the Search fields.
        • Note: for security (who, when and how access info), the requester info (User Id) is needed. It could be a future requirement.
          • The flexible filtering expression could be a stretch goal (it depends the BE Request DB query capabilities)

<implementation>

Image Added

        • Example of so-monitoring-config.yaml                   // note: the flexibility depends on the SO getServiceList(...) support

...

  • Service List Get Process / Service Instance Monitoring
    • Capabilities
      • Select a row and click the Monitor button. Then, it will open the process / Service instance (maps into process instance in Camunda) monitoring widget for the selected process / Service instance on the secondary/pop-up browser page.
    • Design
      • when a user clicks on a row, highlight the selected row and enable the Monitor button.
      • Once the Monitor button is clicked, go to the process / Service Instance Rendering and Deail widget, passing key fields such as process / service instance id, which will be mapped into the process instance id to find a matched process instance id in Camunda database in the Service Instance Rendering and Detail widget.

<Implementation>

Image Added


    • Service Statistic Widget (stretch goal)
      • When, the static button is clicked, the Service Statistic dashboard will be shown. 
      • Collect and display Request / Service Instance statistic per filtered service list, for the filtered service range.
      • Design
        • Query for service list data for a given search criteria. 
          • Use a REST API, getServiceList with search criteria parameters based on a new getServiceStatic(...) based on the  getInfraRequest(...)
        • Count the total number per status (Finished, Processing, Error)
        • Status Total / total number

...

        • The Close button is always enabled.

<Implementation>

Image Added

    • The following is a possible alternative process / service instance rendering based on the Camunda Cockpit screen. If we go this path, the Camunda Cockpit customized plugin would be used. 
    • Calling the process instance cockpit page
      • get the processInstanceId from the getProcessInstanceId(String serviceInstanceId).
      • call the process instance cockpit page, e.g., following a function like below:
      • $scope.getProcessInstanceUrl = function(processInstance, params) {
        var path = '#/process-instance/' + processInstance.id;
        var searches = angular.extend({}, ($location.search() || {}), (params || {}));

        var keepSearchParams = [ 'viewbox' ];
        for (var i in params) {
        keepSearchParams.push(i);
        }

        return routeUtil.redirectTo(path, searches, keepSearchParams);
        };

...

  • REST APIs for providing data to UIs
    • Capabilities
      • Provides REST services, by utilzing 1) Camunda REST APIs, such as BPMN XML string, process activity data, process variable, statistic, and 2) SO Request DB APIs for a service list.
      • Consolidate data responses from multple Camunda calls (both from process and history database) and feed them to UIs.
      • Use of HistoryService APIs, example, processEngine.getHistoryService().createHistoricProcessVariableQuery().xyz
      • Set a History level to ACTIVITY as a minimum; AUDIT (default) level for process variable tracing; currently, it is set to FULL
        • ProcessEngine processEngine = ProcessEngineConfiguration.createProcessEngineConfigurationFromResourceDefault().setHistory(ProcessEngineConfiguration.HISTORY_FULL).buildProcessEngine()
      • Provides workflow tracing (between parent-child workflows, interaction with other services; service task in and out); example,
        • processEngine.getRuntimeService().createExecutionQuery().processVariableValueEquals("serviceInstanceId", serviceInstanceId).singleResult();
      • Custom Query
        • Custom Query against History ACT_HI_DETAIL database table, as needed
      • Create a REST API, getServiceList with search criteria
        • Enhance MsoRequestsDbAdapter and MsoRequestsDbAdapterImpl to implement getInfraRequest(...) with additional parameters
        • invoke getInfraRequest(...) to collect service list data based on search criteria.
        • or use the RequestDB adapter directly.
    • Design
      • Write REST APIs in the new mso-api-handlers/mso-api-handler-monitoring
      • The following APIs are out-dated. Look at the SO-Monitor-APIs for Implementation detail, SO Monitoring API
  1. getServiceList(Map searchCriteria...)                                                 // invokes new getInfraRequest(Map searchCriteria...)
    1. getServiceStatistic(Map searchCriteria, String status);            // get the statistic percentage for the status
  2. getProcessInstanceId(String serviceInstanceId);                               // get the processInstanceId through GET /history/variable-instance/{id}
  3. getprocessDiagramXML(String processInstanceId);                          // get a process instance, get a process definition id, and get diagram
  4. getprocessInstanceDetail(String processInstanceId); 
  5. getHistoryActivityInstance(String processInstanceId);                       // GET /history/activity-instance?processInstanceId={processInstanceId}
  6. getProcessInstanceParent (String processInstanceId);
  7. getProcessInstanceChildren(String processInstanceId);
  8. getProcessTaskDetail(String processInstanceId, String taskId);
  9. getProcessTaskType(String processInstanceId, String taskid);        // query if this task type is "Call Activity" for drilling down

    • The following diagram depicts the API interaction.

...