Skip to content

Commit

Permalink
Add process name to new API request body
Browse files Browse the repository at this point in the history
  • Loading branch information
DudaRobert committed Dec 2, 2024
1 parent 89429cb commit d6dae73
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export class TaskListRequestModel {
name?: string[];
description?: string[];
processDefinitionName?: string[];
processName?: string[];
priority?: string[];
status?: string[];
completedBy?: string[];
Expand Down Expand Up @@ -139,6 +140,7 @@ export class TaskListRequestModel {
this.name = obj.name;
this.description = obj.description;
this.processDefinitionName = obj.processDefinitionName;
this.processName = obj.processName;
this.priority = obj.priority;
this.status = obj.status;
this.completedBy = obj.completedBy;
Expand Down Expand Up @@ -175,6 +177,7 @@ export class TaskFilterCloudAdapter extends TaskListRequestModel {
onlyStandalone: filter.standalone,
name: filter.taskNames,
processDefinitionName: filter.processDefinitionNames,
processName: filter.processNames,
priority: filter.priorities?.map((priority) => priority.toString()),
status: filter.statuses,
completedBy: filter.completedByUsers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export class ProcessFilterCloudModel {
environmentId?: string;

processDefinitionNames: string[] | null;
processNames: string[] | null;
initiators: string[] | null;
appVersions: string[] | null;
statuses: string[] | null;
Expand Down Expand Up @@ -104,6 +105,7 @@ export class ProcessFilterCloudModel {
this._suspendedTo = obj._suspendedTo || null;

this.processDefinitionNames = obj.processDefinitionNames || null;
this.processNames = obj.processNames || null;
this.initiators = obj.initiators || null;
this.appVersions = obj.appVersions || null;
this.statuses = obj.statuses || null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,14 @@ export class ProcessListCloudComponent
* This input will be used only if PROCESS_SEARCH_API_METHOD_TOKEN is provided with 'POST' value.
*/
@Input()
names: string[] = [];
processNames: string[] = [];

/**
* Filter the processes. Display only processes with definition names matching any of the supplied strings.
* This input will be used only if PROCESS_SEARCH_API_METHOD_TOKEN is provided with 'POST' value.
*/
@Input()
processDefinitionNames: string[] = [];

/**
* Filter the processes. Display only processes started by any of the users whose usernames are present in the array.
Expand Down Expand Up @@ -536,7 +543,8 @@ export class ProcessListCloudComponent
skipCount: this.skipCount
},
sorting: this.getProcessListRequestSorting(),
name: this.names,
processName: this.processNames,
processDefinitionName: this.processDefinitionNames,
initiator: this.initiators,
appVersion: this.appVersions,
status: this.statuses,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ export class ProcessListRequestModel {
pagination?: Pagination;
sorting?: ProcessListRequestSortingModel;

name?: string[];
processName?: string[];
processDefinitionName?: string[];
initiator?: string[];
appVersion?: string[];
status?: string[];
Expand All @@ -110,7 +111,8 @@ export class ProcessListRequestModel {
this.pagination = obj.pagination;
this.sorting = obj.sorting;

this.name = obj.name;
this.processName = obj.processName;
this.processDefinitionName = obj.processDefinitionName;
this.initiator = obj.initiator;
this.appVersion = obj.appVersion;
this.status = obj.status;
Expand Down Expand Up @@ -138,7 +140,8 @@ export class ProcessFilterCloudAdapter extends ProcessListRequestModel {
isFieldProcessVariable: false
}),

name: filter.processDefinitionNames,
processDefinitionName: filter.processDefinitionNames,
processName: filter.processNames,
initiator: filter.initiators,
appVersion: filter.appVersions,
status: filter.statuses,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ export class ProcessListCloudService extends BaseCloudService {

protected buildQueryData(requestNode: ProcessListRequestModel) {
const queryData: any = {
name: requestNode.name,
name: requestNode.processName,
processDefinitionName: requestNode.processDefinitionName,
initiator: requestNode.initiator,
appVersion: requestNode.appVersion,
status: requestNode.status,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export class TaskFilterCloudModel {
taskNames: string[] | null;
statuses: TaskStatusFilter[] | null;
assignees: string[] | null;
processNames: string[] | null;
processDefinitionNames: string[] | null;
priorities: string[] | null;
completedByUsers: string[] | null;
Expand Down Expand Up @@ -121,6 +122,7 @@ export class TaskFilterCloudModel {
this.taskNames = obj.taskNames || null;
this.statuses = obj.statuses || null;
this.assignees = obj.assignees || null;
this.processNames = obj.processNames || null;
this.processDefinitionNames = obj.processDefinitionNames || null;
this.priorities = obj.priorities || null;
this.completedByUsers = obj.completedByUsers || null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,19 @@ export class TaskListCloudComponent extends BaseTaskListCloudComponent<ProcessLi
statuses: string[] = [];

/**
* Filter the tasks. Display only tasks under provided processes.
* Filter the tasks. Display only tasks under processes with provided definition names.
* This input will be used only if TASK_SEARCH_API_METHOD_TOKEN is provided with 'POST' value.
*/
@Input()
processDefinitionNames: string[] = [];

/**
* Filter the tasks. Display only tasks under processes with provided names.
* This input will be used only if TASK_SEARCH_API_METHOD_TOKEN is provided with 'POST' value.
*/
@Input()
processNames: string[] = [];

/**
* Filter the tasks. Display only tasks with provided priorities.
* This input will be used only if TASK_SEARCH_API_METHOD_TOKEN is provided with 'POST' value.
Expand Down Expand Up @@ -273,6 +280,7 @@ export class TaskListCloudComponent extends BaseTaskListCloudComponent<ProcessLi
onlyStandalone: this.standalone,
name: this.names,
processDefinitionName: this.processDefinitionNames,
processName: this.processNames,
processInstanceId: this.processInstanceId,
priority: this.priorities,
status: this.statuses,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export class TaskListCloudService extends BaseCloudService implements TaskListCl
const queryData: any = {
status: requestNode.status,
processDefinitionName: requestNode.processDefinitionName,
processName: requestNode.processName,
assignee: requestNode.assignee,
priority: requestNode.priority,
name: requestNode.name,
Expand Down

0 comments on commit d6dae73

Please sign in to comment.