From 6bc332b2a26d125f70d82092666832459ee60f69 Mon Sep 17 00:00:00 2001 From: Esa Puttonen Date: Wed, 17 Mar 2021 14:42:39 +0200 Subject: [PATCH 1/6] Add 'executing'-status to workflow search form selection box --- nflow-explorer/src/app/components/constants.js | 3 ++- nflow-explorer/test/spec/search/searchForm.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nflow-explorer/src/app/components/constants.js b/nflow-explorer/src/app/components/constants.js index 65e0d76a6..3ea056c47 100644 --- a/nflow-explorer/src/app/components/constants.js +++ b/nflow-explorer/src/app/components/constants.js @@ -15,6 +15,7 @@ CREATED: 'created', IN_PROGRESS: 'inProgress', FINISHED: 'finished', - MANUAL: 'manual' + MANUAL: 'manual', + EXECUTING: 'executing' }); })(); diff --git a/nflow-explorer/test/spec/search/searchForm.js b/nflow-explorer/test/spec/search/searchForm.js index 66259f739..63f292eed 100644 --- a/nflow-explorer/test/spec/search/searchForm.js +++ b/nflow-explorer/test/spec/search/searchForm.js @@ -40,7 +40,7 @@ describe('Directive: searchForm', function () { }); it('sets instance statuses into view model', function () { - expect(getCtrl(WorkflowService).instanceStatuses).toEqual([ 'created', 'inProgress', 'finished', 'manual' ]); + expect(getCtrl(WorkflowService).instanceStatuses).toEqual([ 'created', 'inProgress', 'finished', 'manual', 'executing' ]); }); it('with empty criteria does not trigger search', function () { From 08f76cd781fa316d98d67c2ad98b6734f44743a1 Mon Sep 17 00:00:00 2001 From: Esa Puttonen Date: Wed, 17 Mar 2021 14:50:14 +0200 Subject: [PATCH 2/6] Make executor-table sortable by column --- .../src/app/executors/executorTable.html | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/nflow-explorer/src/app/executors/executorTable.html b/nflow-explorer/src/app/executors/executorTable.html index d3d232115..b849d52ef 100644 --- a/nflow-explorer/src/app/executors/executorTable.html +++ b/nflow-explorer/src/app/executors/executorTable.html @@ -1,30 +1,30 @@

Workflow executors

- +
- - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + +
IdHostProcess IDExecutor groupStartedStoppedActivity heartbeatHeartbeat expires
IdHostProcess IDExecutor groupStartedStoppedActivity heartbeatHeartbeat expires
{{executor.id}}{{executor.host}}{{executor.pid}}{{executor.executorGroup}}{{executor.started | fromNow}}{{executor.stopped | fromNow}}{{executor.active | fromNow}}{{executor.expires | fromNow}}
{{executor.id}}{{executor.host}}{{executor.pid}}{{executor.executorGroup}}{{executor.started | fromNow}}{{executor.stopped | fromNow}}{{executor.active | fromNow}}{{executor.expires | fromNow}}
From 8f2073adc8351c96c6339e90d1b804081259bb59 Mon Sep 17 00:00:00 2001 From: Esa Puttonen Date: Wed, 17 Mar 2021 15:22:02 +0200 Subject: [PATCH 3/6] Display child workflow status and state in parent action history (with details in tooltip) --- nflow-explorer/src/app/workflow/tabs/actionHistory.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nflow-explorer/src/app/workflow/tabs/actionHistory.html b/nflow-explorer/src/app/workflow/tabs/actionHistory.html index 2459eb915..13cdb3e81 100644 --- a/nflow-explorer/src/app/workflow/tabs/actionHistory.html +++ b/nflow-explorer/src/app/workflow/tabs/actionHistory.html @@ -28,7 +28,12 @@
Child workflows
From df32e3492e8d39903d0ba4f4cbbc40096d81a089 Mon Sep 17 00:00:00 2001 From: Esa Puttonen Date: Wed, 17 Mar 2021 15:36:48 +0200 Subject: [PATCH 4/6] Poll child workflows on workflow instance page, so that new child workflows (if any) are displayed with new actions --- nflow-explorer/src/app/workflow/workflow.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nflow-explorer/src/app/workflow/workflow.js b/nflow-explorer/src/app/workflow/workflow.js index def67d526..d017b6009 100644 --- a/nflow-explorer/src/app/workflow/workflow.js +++ b/nflow-explorer/src/app/workflow/workflow.js @@ -19,7 +19,10 @@ function reloadWorkflow(workflowId) { console.log('Fetching workflow id ' + workflowId); WorkflowService.get(workflowId).then(function(workflow) { - self.workflow = workflow; + WorkflowService.query({parentWorkflowId: workflow.id}).then(function(childWorkflows) { + self.workflow = workflow; + self.childWorkflows = childWorkflows; + }); }); } self.poller = $interval(function() { reloadWorkflow(self.workflow.id); }, From 33f56d542ec22052db7c0086d45d5d591fe88b05 Mon Sep 17 00:00:00 2001 From: Esa Puttonen Date: Wed, 17 Mar 2021 16:34:10 +0200 Subject: [PATCH 5/6] Added small usability improvements to CHANGELOG --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 877ff07ba..4d52859da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,14 @@ **Highlights** - `nflow-explorer` - - Sortable workflow definitions and instance search result table + - Sortable workflow definitions, workflow instance search result and executors tables - Persist workflow instance query parameters to URL **Details** - `nflow-explorer` + - Added missing `executing` status to workflow instance search criteria + - Included child workflows when auto-refreshing workflow instance actions table + - Added more child workflow details to workflow instance actions - Dependency updates: - urijs 1.19.6 From e7a16b57a91503f7fa35dc5d465d74d52ca25147 Mon Sep 17 00:00:00 2001 From: Esa Puttonen Date: Mon, 22 Mar 2021 18:05:19 +0200 Subject: [PATCH 6/6] Support SQL wildcards in workflow instance queries by business key or external id --- CHANGELOG.md | 3 +++ .../io/nflow/engine/internal/dao/WorkflowInstanceDao.java | 4 ++-- nflow-explorer/src/app/search/searchForm.html | 4 ++-- nflow-explorer/src/app/search/searchForm.js | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d52859da..c3db80682 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - `nflow-explorer` - Sortable workflow definitions, workflow instance search result and executors tables - Persist workflow instance query parameters to URL + - Support wildcard characters when searching workflow instances by business key or external id **Details** - `nflow-explorer` @@ -12,6 +13,8 @@ - Added more child workflow details to workflow instance actions - Dependency updates: - urijs 1.19.6 +- `nflow-engine` + - Support SQL wildcards in workflow instance queries by business key or external id ## 7.2.4 (2021-02-25) diff --git a/nflow-engine/src/main/java/io/nflow/engine/internal/dao/WorkflowInstanceDao.java b/nflow-engine/src/main/java/io/nflow/engine/internal/dao/WorkflowInstanceDao.java index cf63c78d9..d9f487144 100644 --- a/nflow-engine/src/main/java/io/nflow/engine/internal/dao/WorkflowInstanceDao.java +++ b/nflow-engine/src/main/java/io/nflow/engine/internal/dao/WorkflowInstanceDao.java @@ -659,11 +659,11 @@ public Stream queryWorkflowInstancesAsStream(QueryWorkflowInst params.addValue("statuses", convertedStatuses); } if (query.businessKey != null) { - conditions.add("business_key = :business_key"); + conditions.add("business_key like :business_key"); params.addValue("business_key", query.businessKey); } if (query.externalId != null) { - conditions.add("external_id = :external_id"); + conditions.add("external_id like :external_id"); params.addValue("external_id", query.externalId); } conditions.add("executor_group = :executor_group"); diff --git a/nflow-explorer/src/app/search/searchForm.html b/nflow-explorer/src/app/search/searchForm.html index 06fa2cd14..dddfdf693 100644 --- a/nflow-explorer/src/app/search/searchForm.html +++ b/nflow-explorer/src/app/search/searchForm.html @@ -22,11 +22,11 @@
-
+
-
+
diff --git a/nflow-explorer/src/app/search/searchForm.js b/nflow-explorer/src/app/search/searchForm.js index ca78631c1..f2e37e09c 100644 --- a/nflow-explorer/src/app/search/searchForm.js +++ b/nflow-explorer/src/app/search/searchForm.js @@ -30,6 +30,7 @@ self.search = navigateSearch; self.executeSearch = executeSearch; self.onTypeChange = CriteriaModel.onDefinitionChange; + self.wildCardTooltip = 'Use % to replace many characters and _ to replace a single character'; initialize();