We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b8cdbe commit fce3a30Copy full SHA for fce3a30
src/commands/process-instances.ts
@@ -13,6 +13,7 @@ export async function listProcessInstances(options: {
13
profile?: string;
14
processDefinitionId?: string;
15
state?: string;
16
+ all?: boolean;
17
}): Promise<void> {
18
const logger = getLogger();
19
const client = createClient(options.profile);
@@ -31,6 +32,9 @@ export async function listProcessInstances(options: {
31
32
33
if (options.state) {
34
filter.filter.state = options.state;
35
+ } else if (!options.all) {
36
+ // By default, exclude COMPLETED instances unless --all is specified
37
+ filter.filter.state = 'ACTIVE';
38
}
39
40
const result = await client.searchProcessInstances(filter, { consistency: { waitUpToMs: 0 } });
src/commands/user-tasks.ts
@@ -13,6 +13,7 @@ export async function listUserTasks(options: {
assignee?: string;
@@ -27,6 +28,9 @@ export async function listUserTasks(options: {
27
28
29
30
+ // By default, exclude COMPLETED tasks unless --all is specified
+ filter.filter.state = 'CREATED';
if (options.assignee) {
src/index.ts
@@ -58,6 +58,7 @@ function parseCliArgs() {
58
options: {
59
help: { type: 'boolean', short: 'h' },
60
version: { type: 'boolean', short: 'v' },
61
+ all: { type: 'boolean' },
62
profile: { type: 'string' },
63
bpmnProcessId: { type: 'string' },
64
processInstanceKey: { type: 'string' },
@@ -235,6 +236,7 @@ async function main() {
235
236
profile: values.profile as string | undefined,
237
bpmnProcessId: values.bpmnProcessId as string | undefined,
238
state: values.state as string | undefined,
239
+ all: values.all as boolean | undefined,
240
});
241
return;
242
@@ -277,6 +279,7 @@ async function main() {
277
279
278
280
281
assignee: values.assignee as string | undefined,
282
283
284
285
0 commit comments