Skip to content

Commit 9724e27

Browse files
authored
fix(orchestrator): decommission the ProcessInstance.lastUpdate field (#1230)
chore(orchestrator): decommission the ProcessInstance.lastUpdate field Addresses: - https://issues.redhat.com/browse/FLPATH-1017
1 parent 65a5fd1 commit 9724e27

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

plugins/orchestrator-backend/src/service/DataIndexService.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export class DataIndexService {
102102

103103
public async fetchProcessInstances(): Promise<ProcessInstance[] | undefined> {
104104
const graphQlQuery =
105-
'{ ProcessInstances ( orderBy: { start: ASC }, where: {processId: {isNull: false} } ) { id, processName, processId, businessKey, state, start, lastUpdate, end, nodes { id }, variables, parentProcessInstance {id, processName, businessKey} } }';
105+
'{ ProcessInstances ( orderBy: { start: ASC }, where: {processId: {isNull: false} } ) { id, processName, processId, businessKey, state, start, end, nodes { id }, variables, parentProcessInstance {id, processName, businessKey} } }';
106106

107107
const response = await this.client.query(graphQlQuery, {});
108108

@@ -163,7 +163,7 @@ export class DataIndexService {
163163
limit: number,
164164
offset: number,
165165
): Promise<ProcessInstance[]> {
166-
const graphQlQuery = `{ ProcessInstances(where: {processId: {equal: "${workflowId}" } }, pagination: {limit: ${limit}, offset: ${offset}}) { processName, state, start, lastUpdate, end } }`;
166+
const graphQlQuery = `{ ProcessInstances(where: {processId: {equal: "${workflowId}" } }, pagination: {limit: ${limit}, offset: ${offset}}) { processName, state, start, end } }`;
167167

168168
const result = await this.client.query(graphQlQuery, {});
169169

@@ -180,7 +180,7 @@ export class DataIndexService {
180180
public async fetchProcessInstanceJobs(
181181
instanceId: string,
182182
): Promise<Job[] | undefined> {
183-
const graphQlQuery = `{ Jobs (where: { processInstanceId: { equal: "${instanceId}" } }) { id, processId, processInstanceId, rootProcessId, status, expirationTime, priority, callbackEndpoint, repeatInterval, repeatLimit, scheduledId, retries, lastUpdate, endpoint, nodeInstanceId, executionCounter } }`;
183+
const graphQlQuery = `{ Jobs (where: { processInstanceId: { equal: "${instanceId}" } }) { id, processId, processInstanceId, rootProcessId, status, expirationTime, priority, callbackEndpoint, repeatInterval, repeatLimit, scheduledId, retries, endpoint, nodeInstanceId, executionCounter } }`;
184184

185185
const result = await this.client.query(graphQlQuery, {});
186186

@@ -214,7 +214,7 @@ export class DataIndexService {
214214
public async fetchProcessInstance(
215215
instanceId: string,
216216
): Promise<ProcessInstance | undefined> {
217-
const graphQlQuery = `{ ProcessInstances (where: { id: {equal: "${instanceId}" } } ) { id, processName, processId, businessKey, state, start, lastUpdate, end, nodes { id, nodeId, definitionId, type, name, enter, exit }, variables, parentProcessInstance {id, processName, businessKey}, error { nodeDefinitionId, message} } }`;
217+
const graphQlQuery = `{ ProcessInstances (where: { id: {equal: "${instanceId}" } } ) { id, processName, processId, businessKey, state, start, end, nodes { id, nodeId, definitionId, type, name, enter, exit }, variables, parentProcessInstance {id, processName, businessKey}, error { nodeDefinitionId, message} } }`;
218218

219219
const result = await this.client.query(graphQlQuery, {});
220220

plugins/orchestrator-common/src/models.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ export interface ProcessInstance {
7272
childProcessInstances?: ProcessInstance[];
7373
error?: ProcessInstanceError;
7474
addons?: string[];
75-
lastUpdate: Date;
7675
businessKey?: string;
7776
isSelected?: boolean;
7877
errorMessage?: string;
@@ -106,7 +105,6 @@ export interface Job {
106105
repeatLimit: number;
107106
scheduledId: string;
108107
retries: number;
109-
lastUpdate: Date;
110108
executionCounter?: number;
111109
endpoint?: string;
112110
nodeInstanceId?: string;

plugins/orchestrator/src/__fixtures__/fakeLongProcessInstanceList.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export const generateFakeProcessInstances = (
5151
state: randomState,
5252
endpoint: 'enpoint/foo',
5353
start: valuesGenerator.getNextDate(),
54-
lastUpdate: valuesGenerator.getNextDate(),
5554
nodes: [],
5655
variables: {},
5756
isOpen: false,

plugins/orchestrator/src/__fixtures__/fakeProcessInstance.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export const fakeProcessInstance1: ProcessInstance = {
1818
state: ProcessInstanceState.Error,
1919
start: baseDate,
2020
end: new Date(baseDate.getTime() + 13 * HOUR),
21-
lastUpdate: new Date(baseDate.getTime() + DAY),
2221
nodes: [],
2322
endpoint: 'enpoint/foo',
2423
serviceUrl: 'service/bar',
@@ -55,7 +54,6 @@ export const fakeCompletedInstance: ProcessInstance = {
5554
state: ProcessInstanceState.Completed,
5655
start: new Date(baseDate.getTime() + HOUR),
5756
end: new Date(baseDate.getTime() + DAY),
58-
lastUpdate: new Date(baseDate.getTime() + DAY),
5957
nodes: [],
6058
variables: {},
6159
endpoint: 'enpoint/foo',
@@ -71,7 +69,6 @@ export const fakeActiveInstance: ProcessInstance = {
7169
processId: fakeWorkflowOverviewList[2].workflowId,
7270
state: ProcessInstanceState.Active,
7371
start: new Date(baseDate.getTime() + 2 * HOUR),
74-
lastUpdate: new Date(baseDate.getTime() + DAY),
7572
nodes: [],
7673
variables: {},
7774
endpoint: 'enpoint/foo',
@@ -87,7 +84,6 @@ export const fakeProcessInstance4: ProcessInstance = {
8784
processId: fakeWorkflowOverviewList[3].workflowId,
8885
state: ProcessInstanceState.Suspended,
8986
start: baseDate,
90-
lastUpdate: new Date(baseDate.getTime() + 2 * DAY),
9187
nodes: [],
9288
variables: {},
9389
endpoint: 'enpoint/foo',

0 commit comments

Comments
 (0)