Skip to content

Commit 0c07a54

Browse files
authored
fix:add withTemplate query to claimTask-humanTaskService (#68)
* fix:add withTemplate query to claimTask-humanTaskService * fix:add withTemplate query to assignAndClaim-humanTaskService
1 parent e9175d8 commit 0c07a54

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/common/open-api/services/HumanTaskService.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export class HumanTaskService {
125125
public claimTask(
126126
taskId: string,
127127
overrideAssignment: boolean = false,
128+
withTemplate: boolean = false,
128129
): CancelablePromise<HumanTaskEntry> {
129130
return this.httpRequest.request({
130131
method: 'POST',
@@ -134,6 +135,7 @@ export class HumanTaskService {
134135
},
135136
query: {
136137
'overrideAssignment': overrideAssignment,
138+
'withTemplate':withTemplate,
137139
},
138140
});
139141
}
@@ -150,6 +152,7 @@ export class HumanTaskService {
150152
taskId: string,
151153
userId: string,
152154
overrideAssignment: boolean = false,
155+
withTemplate: boolean = false,
153156
): CancelablePromise<HumanTaskEntry> {
154157
return this.httpRequest.request({
155158
method: 'POST',
@@ -160,6 +163,7 @@ export class HumanTaskService {
160163
},
161164
query: {
162165
'overrideAssignment': overrideAssignment,
166+
'withTemplate':withTemplate,
163167
},
164168
});
165169
}

src/core/human.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,11 @@ export class HumanExecutor {
153153
*/
154154
public async claimTaskAsExternalUser(
155155
taskId: string,
156-
assignee: string
156+
assignee: string,
157+
options?:Record<string,boolean>
157158
): Promise<HumanTaskEntry> {
158159
return tryCatchReThrow(() =>
159-
this._client.humanTask.assignAndClaim(taskId, assignee)
160+
this._client.humanTask.assignAndClaim(taskId, assignee,options?.overrideAssignment,options?.withTemplate)
160161
);
161162
}
162163

@@ -166,9 +167,10 @@ export class HumanExecutor {
166167
* @returns
167168
*/
168169
public async claimTaskAsConductorUser(
169-
taskId: string
170+
taskId: string,
171+
options?:Record<string,boolean>
170172
): Promise<HumanTaskEntry> {
171-
return tryCatchReThrow(() => this._client.humanTask.claimTask(taskId));
173+
return tryCatchReThrow(() => this._client.humanTask.claimTask(taskId,options?.overrideAssignment,options?.withTemplate));
172174
}
173175

174176
/**

0 commit comments

Comments
 (0)