Skip to content

Commit

Permalink
fix:add withTemplate query to claimTask-humanTaskService (#68)
Browse files Browse the repository at this point in the history
* fix:add withTemplate query to claimTask-humanTaskService

* fix:add withTemplate query to assignAndClaim-humanTaskService
  • Loading branch information
najeebkp authored Aug 7, 2024
1 parent e9175d8 commit 0c07a54
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/common/open-api/services/HumanTaskService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export class HumanTaskService {
public claimTask(
taskId: string,
overrideAssignment: boolean = false,
withTemplate: boolean = false,
): CancelablePromise<HumanTaskEntry> {
return this.httpRequest.request({
method: 'POST',
Expand All @@ -134,6 +135,7 @@ export class HumanTaskService {
},
query: {
'overrideAssignment': overrideAssignment,
'withTemplate':withTemplate,
},
});
}
Expand All @@ -150,6 +152,7 @@ export class HumanTaskService {
taskId: string,
userId: string,
overrideAssignment: boolean = false,
withTemplate: boolean = false,
): CancelablePromise<HumanTaskEntry> {
return this.httpRequest.request({
method: 'POST',
Expand All @@ -160,6 +163,7 @@ export class HumanTaskService {
},
query: {
'overrideAssignment': overrideAssignment,
'withTemplate':withTemplate,
},
});
}
Expand Down
10 changes: 6 additions & 4 deletions src/core/human.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,11 @@ export class HumanExecutor {
*/
public async claimTaskAsExternalUser(
taskId: string,
assignee: string
assignee: string,
options?:Record<string,boolean>
): Promise<HumanTaskEntry> {
return tryCatchReThrow(() =>
this._client.humanTask.assignAndClaim(taskId, assignee)
this._client.humanTask.assignAndClaim(taskId, assignee,options?.overrideAssignment,options?.withTemplate)
);
}

Expand All @@ -166,9 +167,10 @@ export class HumanExecutor {
* @returns
*/
public async claimTaskAsConductorUser(
taskId: string
taskId: string,
options?:Record<string,boolean>
): Promise<HumanTaskEntry> {
return tryCatchReThrow(() => this._client.humanTask.claimTask(taskId));
return tryCatchReThrow(() => this._client.humanTask.claimTask(taskId,options?.overrideAssignment,options?.withTemplate));
}

/**
Expand Down

0 comments on commit 0c07a54

Please sign in to comment.