...
- use Camunda REST API, GET /process-defintion/{id}/xml
- Get the state of a process instance from the activity-instances
- Use Camunda REST API, get/process-instance/{id}/activity-instances
- Render the BPMN XML with bpmn.io and places markers on top of it, and provide Service instance detail views.
- Design
- This widget will be on the secondary/pop-up browser page.
- The Service List page will be the primiary primary page, so the user can open multiple Service Instance Rendering and Detail pages.The number of pages can be limited to the default 10, but it can be configured.
- The search criteria fields are for display only, and they cannot be changed.
- The Detail panel is scrollable and display contents with the tag: value formt.
- Query a process instance with the matched 'serviceInstanceId' process variable.
- get a process instande id: query bases on the process variable,
- GET /history/variable-instance/{variableValue}, where {variableValue} = 'serviceIntanceId' ;
- query BPML XML based on a process instance id
- GET /process-definition/{id}/xml
- query the process instance detail such as process variables
- GET /process-instance/{id}/variables
- Display the process variables on the Service Instance Detail panel
- query and activity instance (tree) for the process instance id
- GET /process-instance/{id}/activity-instances
- GET /history/activity-instance/{id}
- The response provides child activity instance info. By using this we can find the parent and child process instnce id and definition id.
- If the current process instance id has its parent, enable the Drill-Up button.
- When a user clicks on a task, display the task varables
- GET /task/{id}variables
- When the task activity type is call activity, it enables the Drill-Down button.
- get a process instande id: query bases on the process variable,
- Render the process instance diagram with the retrieved XML.
use bpmn.io javascript library for the XML rendering and event attachments for process instance tasks.
- This widget will be on the secondary/pop-up browser page.
...
- 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
- 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
- getServiceList(Map searchCriteria...) // invokes new getInfraRequest(Map searchCriteria...)
- getProcessInstanceId(String serviceInstanceId); // get the processInstanceId through GET /history/variable-instance/{id}
- getprocessDiagramXML(String processInstanceId); // get a process instance, get a process definition id, and get diagram
- getprocessInstanceDetail(String processInstanceId);
- getHistoryActivityInstance(String processInstanceId); // GET /history/activity-instance?processInstanceId={processInstanceId}
- getProcessInstanceParent (String processInstanceId);
- getProcessInstanceChildren(String processInstanceId);
- getProcessTaskDetail(String processInstanceId, String taskId);
- getProcessTaskType(String processInstanceId, String taskid); // query if this task type is "Call Activity" for drilling down
- Write REST APIs in the new mso-api-handlers/mso-api-handler-monitoring
- The following diagram depicts the API interaction.
- Capabilities
...
Priority | Component | Development Estimate | Comments |
---|---|---|---|
Priority | Component | Development Estimate | Comments |
1 | REST APIs for providing data to UIs | 40 60 hours / Java developer |
|
2 | SO Service List widget | 40 60 hours / UI developer |
|
3 | Service Instance Rendering and Detail Panel | 40 hours / UI developer |
|
4 | Statistic Dashboard (stretch goal) | 40 hours / UI developer |
|
5 |
|