From 7a5f961b2bbff62f525805d6302822a411024f7b Mon Sep 17 00:00:00 2001 From: burnettk Date: Mon, 27 Feb 2023 14:59:38 -0500 Subject: [PATCH] Squashed 'spiffworkflow-frontend/' changes from c22d22ba5..4fd946be4 4fd946be4 Merging main 453bdb246 run_pyl b5a8ff01b Needed an additional check for empty correlation keys - which on a RECEIVE message, should always match anything. b583f84cc lint w/ burnettk fd4d7d13b removed some unused code from task and fixed the logs table a bit w/ burnettk 6f17e71e6 avoid using task-data endpoint for task data and only use it to get tasks based on spiff step instead 669c29595 removed task-data endpoints since we no longer need them w/ burnettk 5f25fffe0 added api to get task data and do not return from task data list anymore w/ burnettk 373c4f184 Merge remote-tracking branch 'origin/main' into feature/message_fixes e40c12ac8 turn on sentry detailed tracing for task-data w/ burnettk d7861aae2 Merge branch 'main' into feature/message_fixes 0a9f2480d work in progress - * Link between message instance and correlations is now a link table and many-to-many relationships as recommended by SQLAlchemy * Use the correlation keys, not the process id when accepting api messages. git-subtree-dir: spiffworkflow-frontend git-subtree-split: 4fd946be4ff716bfd1664aca8d75cb6f709b53eb --- package-lock.json | 4 +- src/hooks/UriListForPermissions.tsx | 2 +- src/interfaces.ts | 3 +- src/routes/MessageInstanceList.tsx | 38 ++++---- src/routes/ProcessInstanceLogList.tsx | 127 +++++++++++++++++--------- src/routes/ProcessInstanceShow.tsx | 65 ++++++++++--- src/routes/TaskShow.tsx | 6 +- 7 files changed, 162 insertions(+), 83 deletions(-) diff --git a/package-lock.json b/package-lock.json index d3a2743d5..785967edf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8065,7 +8065,7 @@ }, "node_modules/bpmn-js-spiffworkflow": { "version": "0.0.8", - "resolved": "git+ssh://git@github.com/sartography/bpmn-js-spiffworkflow.git#aca23dc56e5d37aa1ed0a3cf11acb55f76a36da7", + "resolved": "git+ssh://git@github.com/sartography/bpmn-js-spiffworkflow.git#f1f008e3e39be43b016718fca6a38b248ab4ecf7", "license": "MIT", "dependencies": { "inherits": "^2.0.4", @@ -38214,7 +38214,7 @@ } }, "bpmn-js-spiffworkflow": { - "version": "git+ssh://git@github.com/sartography/bpmn-js-spiffworkflow.git#aca23dc56e5d37aa1ed0a3cf11acb55f76a36da7", + "version": "git+ssh://git@github.com/sartography/bpmn-js-spiffworkflow.git#f1f008e3e39be43b016718fca6a38b248ab4ecf7", "from": "bpmn-js-spiffworkflow@sartography/bpmn-js-spiffworkflow#main", "requires": { "inherits": "^2.0.4", diff --git a/src/hooks/UriListForPermissions.tsx b/src/hooks/UriListForPermissions.tsx index f8e5f07f8..92fe3639a 100644 --- a/src/hooks/UriListForPermissions.tsx +++ b/src/hooks/UriListForPermissions.tsx @@ -17,7 +17,7 @@ export const useUriListForPermissions = () => { processInstanceResumePath: `/v1.0/process-instance-resume/${params.process_model_id}/${params.process_instance_id}`, processInstanceSuspendPath: `/v1.0/process-instance-suspend/${params.process_model_id}/${params.process_instance_id}`, processInstanceResetPath: `/v1.0/process-instance-reset/${params.process_model_id}/${params.process_instance_id}`, - processInstanceTaskListDataPath: `/v1.0/task-data/${params.process_model_id}/${params.process_instance_id}`, + processInstanceTaskDataPath: `/v1.0/task-data/${params.process_model_id}/${params.process_instance_id}`, processInstanceSendEventPath: `/v1.0/send-event/${params.process_model_id}/${params.process_instance_id}`, processInstanceCompleteTaskPath: `/v1.0/complete-task/${params.process_model_id}/${params.process_instance_id}`, processInstanceTaskListPath: `/v1.0/process-instances/${params.process_model_id}/${params.process_instance_id}/task-info`, diff --git a/src/interfaces.ts b/src/interfaces.ts index f86a7bb5e..4c28376cf 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -112,12 +112,13 @@ export interface MessageInstance { process_model_identifier: string; process_model_display_name: string; process_instance_id: number; - message_identifier: string; + name: string; message_type: string; failure_cause: string; status: string; created_at_in_seconds: number; message_correlations?: MessageCorrelations; + correlation_keys: any; } export interface ReportFilter { diff --git a/src/routes/MessageInstanceList.tsx b/src/routes/MessageInstanceList.tsx index a9ec6b69f..67c47ff60 100644 --- a/src/routes/MessageInstanceList.tsx +++ b/src/routes/MessageInstanceList.tsx @@ -64,17 +64,13 @@ export default function MessageInstanceList() { open={!!messageInstanceForModal} passiveModal onRequestClose={handleCorrelationDisplayClose} - modalHeading={`Message ${messageInstanceForModal.id} (${messageInstanceForModal.message_identifier}) ${messageInstanceForModal.message_type} data:`} + modalHeading={`Message ${messageInstanceForModal.id} (${messageInstanceForModal.name}) ${messageInstanceForModal.message_type} data:`} modalLabel="Details" > {failureCausePre}

Correlations:

-            {JSON.stringify(
-              messageInstanceForModal.message_correlations,
-              null,
-              2
-            )}
+            {JSON.stringify(messageInstanceForModal.correlation_keys, null, 2)}
           
); @@ -95,21 +91,27 @@ export default function MessageInstanceList() { ); } + let processLink = External Call; + let instanceLink = ; + if (row.process_instance_id != null) { + processLink = FormatProcessModelDisplayName(row); + instanceLink = ( + + {row.process_instance_id} + + ); + } return ( {row.id} - {FormatProcessModelDisplayName(row)} - - - {row.process_instance_id} - - - {row.message_identifier} + {processLink} + {instanceLink} + {row.name} {row.message_type}