Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(orchestrator): decommission the ProcessInstance.lastUpdate field #1230

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class DataIndexService {

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

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

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

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

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

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

Expand Down Expand Up @@ -214,7 +214,7 @@ export class DataIndexService {
public async fetchProcessInstance(
instanceId: string,
): Promise<ProcessInstance | undefined> {
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} } }`;
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} } }`;

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

Expand Down
2 changes: 0 additions & 2 deletions plugins/orchestrator-common/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export interface ProcessInstance {
childProcessInstances?: ProcessInstance[];
error?: ProcessInstanceError;
addons?: string[];
lastUpdate: Date;
businessKey?: string;
isSelected?: boolean;
errorMessage?: string;
Expand Down Expand Up @@ -106,7 +105,6 @@ export interface Job {
repeatLimit: number;
scheduledId: string;
retries: number;
lastUpdate: Date;
executionCounter?: number;
endpoint?: string;
nodeInstanceId?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export const generateFakeProcessInstances = (
state: randomState,
endpoint: 'enpoint/foo',
start: valuesGenerator.getNextDate(),
lastUpdate: valuesGenerator.getNextDate(),
nodes: [],
variables: {},
isOpen: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export const fakeProcessInstance1: ProcessInstance = {
state: ProcessInstanceState.Error,
start: baseDate,
end: new Date(baseDate.getTime() + 13 * HOUR),
lastUpdate: new Date(baseDate.getTime() + DAY),
nodes: [],
endpoint: 'enpoint/foo',
serviceUrl: 'service/bar',
Expand Down Expand Up @@ -55,7 +54,6 @@ export const fakeCompletedInstance: ProcessInstance = {
state: ProcessInstanceState.Completed,
start: new Date(baseDate.getTime() + HOUR),
end: new Date(baseDate.getTime() + DAY),
lastUpdate: new Date(baseDate.getTime() + DAY),
nodes: [],
variables: {},
endpoint: 'enpoint/foo',
Expand All @@ -71,7 +69,6 @@ export const fakeActiveInstance: ProcessInstance = {
processId: fakeWorkflowOverviewList[2].workflowId,
state: ProcessInstanceState.Active,
start: new Date(baseDate.getTime() + 2 * HOUR),
lastUpdate: new Date(baseDate.getTime() + DAY),
nodes: [],
variables: {},
endpoint: 'enpoint/foo',
Expand All @@ -87,7 +84,6 @@ export const fakeProcessInstance4: ProcessInstance = {
processId: fakeWorkflowOverviewList[3].workflowId,
state: ProcessInstanceState.Suspended,
start: baseDate,
lastUpdate: new Date(baseDate.getTime() + 2 * DAY),
nodes: [],
variables: {},
endpoint: 'enpoint/foo',
Expand Down
Loading