@rytass/bpm-core-nestjs-module 0.17.4 → 0.17.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +10 -0
- package/package.json +2 -2
- package/src/lib/bpm-auth/bpm-resolver-metadata.d.ts +9 -1
- package/src/lib/bpm-auth/bpm-resolver-metadata.js.map +1 -1
- package/src/lib/migrations/0000000029000-activity-log-seq.d.ts +48 -0
- package/src/lib/migrations/0000000029000-activity-log-seq.js +101 -0
- package/src/lib/migrations/0000000029000-activity-log-seq.js.map +1 -0
- package/src/lib/migrations/index.d.ts +1 -0
- package/src/lib/migrations/index.js +3 -0
- package/src/lib/migrations/index.js.map +1 -1
- package/src/lib/notification/notification.service.js +1 -1
- package/src/lib/notification/notification.service.js.map +1 -1
- package/src/lib/organization/index.d.ts +1 -0
- package/src/lib/organization/index.js +1 -0
- package/src/lib/organization/index.js.map +1 -1
- package/src/lib/organization/organization-directory.queries.d.ts +23 -0
- package/src/lib/organization/organization-directory.queries.js +94 -0
- package/src/lib/organization/organization-directory.queries.js.map +1 -0
- package/src/lib/organization/organization.module.js +2 -0
- package/src/lib/organization/organization.module.js.map +1 -1
- package/src/lib/organization/organization.queries.d.ts +9 -5
- package/src/lib/organization/organization.queries.js +9 -62
- package/src/lib/organization/organization.queries.js.map +1 -1
- package/src/lib/workflow-engine/activity-log.entity.d.ts +7 -0
- package/src/lib/workflow-engine/activity-log.entity.js +10 -0
- package/src/lib/workflow-engine/activity-log.entity.js.map +1 -1
- package/src/lib/workflow-engine/workflow-engine.service.js +2 -2
- package/src/lib/workflow-engine/workflow-engine.service.js.map +1 -1
|
@@ -7,6 +7,7 @@ const typeorm_1 = require("@nestjs/typeorm");
|
|
|
7
7
|
const manager_resolution_entity_1 = require("./manager-resolution.entity");
|
|
8
8
|
const membership_entity_1 = require("./membership.entity");
|
|
9
9
|
const org_unit_entity_1 = require("./org-unit.entity");
|
|
10
|
+
const organization_directory_queries_1 = require("./organization-directory.queries");
|
|
10
11
|
const organization_mutations_1 = require("./organization.mutations");
|
|
11
12
|
const organization_queries_1 = require("./organization.queries");
|
|
12
13
|
const organization_service_1 = require("./organization.service");
|
|
@@ -25,6 +26,7 @@ exports.OrganizationModule = OrganizationModule = tslib_1.__decorate([
|
|
|
25
26
|
]),
|
|
26
27
|
],
|
|
27
28
|
providers: [
|
|
29
|
+
organization_directory_queries_1.OrganizationDirectoryQueries,
|
|
28
30
|
organization_mutations_1.OrganizationMutations,
|
|
29
31
|
organization_queries_1.OrganizationQueries,
|
|
30
32
|
organization_service_1.OrganizationService,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.module.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/organization/organization.module.ts"],"names":[],"mappings":";;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,2EAAsE;AACtE,2DAAuD;AACvD,uDAAkD;AAClD,qEAAiE;AACjE,iEAA6D;AAC7D,iEAA6D;AAC7D,uDAAmD;
|
|
1
|
+
{"version":3,"file":"organization.module.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/organization/organization.module.ts"],"names":[],"mappings":";;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,2EAAsE;AACtE,2DAAuD;AACvD,uDAAkD;AAClD,qFAAgF;AAChF,qEAAiE;AACjE,iEAA6D;AAC7D,iEAA6D;AAC7D,uDAAmD;AAmB5C,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAAG,CAAA;AAArB,gDAAkB;6BAAlB,kBAAkB;IAjB9B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC;gBACvB,mDAAuB;gBACvB,oCAAgB;gBAChB,+BAAa;gBACb,gCAAc;aACf,CAAC;SACH;QACD,SAAS,EAAE;YACT,6DAA4B;YAC5B,8CAAqB;YACrB,0CAAmB;YACnB,0CAAmB;SACpB;QACD,OAAO,EAAE,CAAC,0CAAmB,CAAC;KAC/B,CAAC;GACW,kBAAkB,CAAG"}
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import { ManagerResolutionEntity } from './manager-resolution.entity';
|
|
2
|
-
import { MembershipEntity } from './membership.entity';
|
|
3
2
|
import { OrgUnitEntity } from './org-unit.entity';
|
|
4
3
|
import { ManagerResolutionScopeTypeEnum, OrgUnitTypeEnum } from './organization.enums';
|
|
5
4
|
import { OrgUnitRetirementImpactObject } from './org-unit-retirement-impact.object';
|
|
6
5
|
import { OrganizationSummaryObject } from './organization-summary.object';
|
|
7
6
|
import { OrganizationService } from './organization.service';
|
|
8
|
-
import { PositionEntity } from './position.entity';
|
|
9
7
|
import { ResolvedManagerObject } from './resolved-manager.object';
|
|
8
|
+
/**
|
|
9
|
+
* Read-only organization queries for the organization admin pages.
|
|
10
|
+
*
|
|
11
|
+
* Administrator-only as a whole class, so a query added here is closed to
|
|
12
|
+
* designers unless it is moved on purpose. The three reads the template
|
|
13
|
+
* designer needs live in `OrganizationDirectoryQueries` instead: Nest runs
|
|
14
|
+
* class-level and method-level guards together, so a method here cannot be
|
|
15
|
+
* opened wider than this class.
|
|
16
|
+
*/
|
|
10
17
|
export declare class OrganizationQueries {
|
|
11
18
|
private readonly organizationService;
|
|
12
19
|
constructor(organizationService: OrganizationService);
|
|
13
20
|
orgUnit(id: string): Promise<OrgUnitEntity>;
|
|
14
21
|
orgUnitRetirementImpact(id: string): Promise<OrgUnitRetirementImpactObject>;
|
|
15
|
-
orgUnits(all?: boolean | null, page?: number | null, pageSize?: number | null, parentId?: string | null, searchText?: string | null, type?: OrgUnitTypeEnum | null): Promise<readonly OrgUnitEntity[]>;
|
|
16
22
|
orgUnitCount(parentId?: string | null, searchText?: string | null, type?: OrgUnitTypeEnum | null): Promise<number>;
|
|
17
|
-
positions(page?: number | null, pageSize?: number | null, searchText?: string | null): Promise<readonly PositionEntity[]>;
|
|
18
23
|
positionCount(searchText?: string | null): Promise<number>;
|
|
19
|
-
memberships(page?: number | null, pageSize?: number | null, memberId?: string, orgUnitId?: string, positionId?: string, activeOnly?: boolean | null): Promise<readonly MembershipEntity[]>;
|
|
20
24
|
membershipCount(memberId?: string, orgUnitId?: string, positionId?: string, activeOnly?: boolean | null): Promise<number>;
|
|
21
25
|
managerResolutions(page?: number | null, pageSize?: number | null, scopeType?: ManagerResolutionScopeTypeEnum | null, scopeId?: string | null, activeOnly?: boolean | null): Promise<readonly ManagerResolutionEntity[]>;
|
|
22
26
|
managerResolutionCount(scopeType?: ManagerResolutionScopeTypeEnum | null, scopeId?: string | null, activeOnly?: boolean | null): Promise<number>;
|
|
@@ -5,14 +5,21 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const graphql_1 = require("@nestjs/graphql");
|
|
6
6
|
const bpm_auth_1 = require("../bpm-auth");
|
|
7
7
|
const manager_resolution_entity_1 = require("./manager-resolution.entity");
|
|
8
|
-
const membership_entity_1 = require("./membership.entity");
|
|
9
8
|
const org_unit_entity_1 = require("./org-unit.entity");
|
|
10
9
|
const organization_enums_1 = require("./organization.enums");
|
|
11
10
|
const org_unit_retirement_impact_object_1 = require("./org-unit-retirement-impact.object");
|
|
12
11
|
const organization_summary_object_1 = require("./organization-summary.object");
|
|
13
12
|
const organization_service_1 = require("./organization.service");
|
|
14
|
-
const position_entity_1 = require("./position.entity");
|
|
15
13
|
const resolved_manager_object_1 = require("./resolved-manager.object");
|
|
14
|
+
/**
|
|
15
|
+
* Read-only organization queries for the organization admin pages.
|
|
16
|
+
*
|
|
17
|
+
* Administrator-only as a whole class, so a query added here is closed to
|
|
18
|
+
* designers unless it is moved on purpose. The three reads the template
|
|
19
|
+
* designer needs live in `OrganizationDirectoryQueries` instead: Nest runs
|
|
20
|
+
* class-level and method-level guards together, so a method here cannot be
|
|
21
|
+
* opened wider than this class.
|
|
22
|
+
*/
|
|
16
23
|
let OrganizationQueries = class OrganizationQueries {
|
|
17
24
|
constructor(organizationService) {
|
|
18
25
|
this.organizationService = organizationService;
|
|
@@ -23,16 +30,6 @@ let OrganizationQueries = class OrganizationQueries {
|
|
|
23
30
|
async orgUnitRetirementImpact(id) {
|
|
24
31
|
return this.organizationService.readOrgUnitRetirementImpact(id);
|
|
25
32
|
}
|
|
26
|
-
async orgUnits(all, page, pageSize, parentId, searchText, type) {
|
|
27
|
-
return this.organizationService.listOrgUnits({
|
|
28
|
-
all,
|
|
29
|
-
page,
|
|
30
|
-
pageSize,
|
|
31
|
-
parentId,
|
|
32
|
-
searchText,
|
|
33
|
-
type,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
33
|
async orgUnitCount(parentId, searchText, type) {
|
|
37
34
|
return this.organizationService.countOrgUnits({
|
|
38
35
|
parentId,
|
|
@@ -40,26 +37,9 @@ let OrganizationQueries = class OrganizationQueries {
|
|
|
40
37
|
type,
|
|
41
38
|
});
|
|
42
39
|
}
|
|
43
|
-
async positions(page, pageSize, searchText) {
|
|
44
|
-
return this.organizationService.listPositions({
|
|
45
|
-
page,
|
|
46
|
-
pageSize,
|
|
47
|
-
searchText,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
40
|
async positionCount(searchText) {
|
|
51
41
|
return this.organizationService.countPositions({ searchText });
|
|
52
42
|
}
|
|
53
|
-
async memberships(page, pageSize, memberId, orgUnitId, positionId, activeOnly) {
|
|
54
|
-
return this.organizationService.listMemberships({
|
|
55
|
-
activeOnly: activeOnly ?? false,
|
|
56
|
-
memberId,
|
|
57
|
-
orgUnitId,
|
|
58
|
-
page,
|
|
59
|
-
pageSize,
|
|
60
|
-
positionId,
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
43
|
async membershipCount(memberId, orgUnitId, positionId, activeOnly) {
|
|
64
44
|
return this.organizationService.countMemberships({
|
|
65
45
|
activeOnly: activeOnly ?? false,
|
|
@@ -111,18 +91,6 @@ tslib_1.__decorate([
|
|
|
111
91
|
tslib_1.__metadata("design:paramtypes", [String]),
|
|
112
92
|
tslib_1.__metadata("design:returntype", Promise)
|
|
113
93
|
], OrganizationQueries.prototype, "orgUnitRetirementImpact", null);
|
|
114
|
-
tslib_1.__decorate([
|
|
115
|
-
(0, graphql_1.Query)(() => [org_unit_entity_1.OrgUnitEntity]),
|
|
116
|
-
tslib_1.__param(0, (0, graphql_1.Args)('all', { nullable: true, type: () => Boolean })),
|
|
117
|
-
tslib_1.__param(1, (0, graphql_1.Args)('page', { nullable: true, type: () => graphql_1.Int })),
|
|
118
|
-
tslib_1.__param(2, (0, graphql_1.Args)('pageSize', { nullable: true, type: () => graphql_1.Int })),
|
|
119
|
-
tslib_1.__param(3, (0, graphql_1.Args)('parentId', { nullable: true, type: () => String })),
|
|
120
|
-
tslib_1.__param(4, (0, graphql_1.Args)('searchText', { nullable: true, type: () => String })),
|
|
121
|
-
tslib_1.__param(5, (0, graphql_1.Args)('type', { nullable: true, type: () => organization_enums_1.OrgUnitTypeEnum })),
|
|
122
|
-
tslib_1.__metadata("design:type", Function),
|
|
123
|
-
tslib_1.__metadata("design:paramtypes", [Object, Object, Object, Object, Object, Object]),
|
|
124
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
125
|
-
], OrganizationQueries.prototype, "orgUnits", null);
|
|
126
94
|
tslib_1.__decorate([
|
|
127
95
|
(0, graphql_1.Query)(() => graphql_1.Int),
|
|
128
96
|
tslib_1.__param(0, (0, graphql_1.Args)('parentId', { nullable: true, type: () => String })),
|
|
@@ -132,15 +100,6 @@ tslib_1.__decorate([
|
|
|
132
100
|
tslib_1.__metadata("design:paramtypes", [Object, Object, Object]),
|
|
133
101
|
tslib_1.__metadata("design:returntype", Promise)
|
|
134
102
|
], OrganizationQueries.prototype, "orgUnitCount", null);
|
|
135
|
-
tslib_1.__decorate([
|
|
136
|
-
(0, graphql_1.Query)(() => [position_entity_1.PositionEntity]),
|
|
137
|
-
tslib_1.__param(0, (0, graphql_1.Args)('page', { nullable: true, type: () => graphql_1.Int })),
|
|
138
|
-
tslib_1.__param(1, (0, graphql_1.Args)('pageSize', { nullable: true, type: () => graphql_1.Int })),
|
|
139
|
-
tslib_1.__param(2, (0, graphql_1.Args)('searchText', { nullable: true, type: () => String })),
|
|
140
|
-
tslib_1.__metadata("design:type", Function),
|
|
141
|
-
tslib_1.__metadata("design:paramtypes", [Object, Object, Object]),
|
|
142
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
143
|
-
], OrganizationQueries.prototype, "positions", null);
|
|
144
103
|
tslib_1.__decorate([
|
|
145
104
|
(0, graphql_1.Query)(() => graphql_1.Int),
|
|
146
105
|
tslib_1.__param(0, (0, graphql_1.Args)('searchText', { nullable: true, type: () => String })),
|
|
@@ -148,18 +107,6 @@ tslib_1.__decorate([
|
|
|
148
107
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
149
108
|
tslib_1.__metadata("design:returntype", Promise)
|
|
150
109
|
], OrganizationQueries.prototype, "positionCount", null);
|
|
151
|
-
tslib_1.__decorate([
|
|
152
|
-
(0, graphql_1.Query)(() => [membership_entity_1.MembershipEntity]),
|
|
153
|
-
tslib_1.__param(0, (0, graphql_1.Args)('page', { nullable: true, type: () => graphql_1.Int })),
|
|
154
|
-
tslib_1.__param(1, (0, graphql_1.Args)('pageSize', { nullable: true, type: () => graphql_1.Int })),
|
|
155
|
-
tslib_1.__param(2, (0, graphql_1.Args)('memberId', { nullable: true, type: () => String })),
|
|
156
|
-
tslib_1.__param(3, (0, graphql_1.Args)('orgUnitId', { nullable: true, type: () => String })),
|
|
157
|
-
tslib_1.__param(4, (0, graphql_1.Args)('positionId', { nullable: true, type: () => String })),
|
|
158
|
-
tslib_1.__param(5, (0, graphql_1.Args)('activeOnly', { nullable: true, type: () => Boolean })),
|
|
159
|
-
tslib_1.__metadata("design:type", Function),
|
|
160
|
-
tslib_1.__metadata("design:paramtypes", [Object, Object, String, String, String, Object]),
|
|
161
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
162
|
-
], OrganizationQueries.prototype, "memberships", null);
|
|
163
110
|
tslib_1.__decorate([
|
|
164
111
|
(0, graphql_1.Query)(() => graphql_1.Int),
|
|
165
112
|
tslib_1.__param(0, (0, graphql_1.Args)('memberId', { nullable: true, type: () => String })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.queries.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/organization/organization.queries.ts"],"names":[],"mappings":";;;;AAAA,6CAA6D;AAC7D,0CAA2C;AAC3C,2EAAsE;AACtE,
|
|
1
|
+
{"version":3,"file":"organization.queries.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/organization/organization.queries.ts"],"names":[],"mappings":";;;;AAAA,6CAA6D;AAC7D,0CAA2C;AAC3C,2EAAsE;AACtE,uDAAkD;AAClD,6DAG8B;AAC9B,2FAAoF;AACpF,+EAA0E;AAC1E,iEAA6D;AAC7D,uEAAkE;AAElE;;;;;;;;GAQG;AAGI,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YAA6B,mBAAwC;QAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;IAAG,CAAC;IAGnE,AAAN,KAAK,CAAC,OAAO,CACyB,EAAU;QAE9C,OAAO,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IACjD,CAAC;IAMK,AAAN,KAAK,CAAC,uBAAuB,CACS,EAAU;QAE9C,OAAO,IAAI,CAAC,mBAAmB,CAAC,2BAA2B,CAAC,EAAE,CAAC,CAAC;IAClE,CAAC;IAGK,AAAN,KAAK,CAAC,YAAY,CAEhB,QAAwB,EAExB,UAA0B,EAE1B,IAA6B;QAE7B,OAAO,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC;YAC5C,QAAQ;YACR,UAAU;YACV,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAGK,AAAN,KAAK,CAAC,aAAa,CAEjB,UAA0B;QAE1B,OAAO,IAAI,CAAC,mBAAmB,CAAC,cAAc,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;IACjE,CAAC;I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,MAAM,EAAE,CAAC,CAAA;IAEvD,mBAAA,IAAA,cAAI,EAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAA;;;;iEAQ7D;AAGK;IADL,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,uDAAyB,CAAC;;;;8DAGtC;AAGK;IADL,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,+CAAqB,CAAC;IAEhC,mBAAA,IAAA,cAAI,EAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAA;;;;0DAO1C;8BAxHU,mBAAmB;IAF/B,IAAA,kBAAQ,GAAE;IACV,IAAA,uBAAY,GAAE;6CAEqC,0CAAmB;GAD1D,mBAAmB,CAyH/B"}
|
|
@@ -8,5 +8,12 @@ export declare class ActivityLogEntity {
|
|
|
8
8
|
taskId: string | null;
|
|
9
9
|
payload: Readonly<Record<string, unknown>>;
|
|
10
10
|
createdAt: Date;
|
|
11
|
+
/**
|
|
12
|
+
* Write order, assigned by the database (migration `ActivityLogSeq0000000029000`).
|
|
13
|
+
* `created_at` is the transaction start time and `id` is random, so neither
|
|
14
|
+
* orders the rows one transaction writes; sort by this. `bigint`, so the
|
|
15
|
+
* driver returns a string. Not in GraphQL: readers return rows sorted by it.
|
|
16
|
+
*/
|
|
17
|
+
seq: string;
|
|
11
18
|
get payloadJson(): string;
|
|
12
19
|
}
|
|
@@ -50,6 +50,16 @@ tslib_1.__decorate([
|
|
|
50
50
|
(0, graphql_1.Field)(),
|
|
51
51
|
tslib_1.__metadata("design:type", Date)
|
|
52
52
|
], ActivityLogEntity.prototype, "createdAt", void 0);
|
|
53
|
+
tslib_1.__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({
|
|
55
|
+
generated: 'identity',
|
|
56
|
+
generatedIdentity: 'ALWAYS',
|
|
57
|
+
name: 'seq',
|
|
58
|
+
type: 'bigint',
|
|
59
|
+
update: false,
|
|
60
|
+
}),
|
|
61
|
+
tslib_1.__metadata("design:type", String)
|
|
62
|
+
], ActivityLogEntity.prototype, "seq", void 0);
|
|
53
63
|
tslib_1.__decorate([
|
|
54
64
|
(0, graphql_1.Field)(() => String),
|
|
55
65
|
tslib_1.__metadata("design:type", String),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-log.entity.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/workflow-engine/activity-log.entity.ts"],"names":[],"mappings":";;;;AAAA,6CAAwD;AACxD,qCAKiB;AACjB,mEAAmE;AAI5D,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;
|
|
1
|
+
{"version":3,"file":"activity-log.entity.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/workflow-engine/activity-log.entity.ts"],"names":[],"mappings":";;;;AAAA,6CAAwD;AACxD,qCAKiB;AACjB,mEAAmE;AAI5D,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IA+C5B,IACI,WAAW;QACb,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;CACF,CAAA;AAnDY,8CAAiB;AAG5B;IAFC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;6CACJ;AAIZ;IAFC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IACvC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;qDACI;AAIpB;IAFC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;IACtC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,gDAAwB,CAAC;;oDACD;AAIrC;IAFC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3D,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACV;AAI9B;IAFC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACnD,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACjB;AAIvB;IAFC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACnD,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACb;AAGvB;IADC,IAAA,gBAAM,EAAC,OAAO,CAAC;;kDAC4B;AAI5C;IAFC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAC7D,IAAA,eAAK,GAAE;sCACI,IAAI;oDAAC;AAejB;IAPC,IAAA,gBAAM,EAAC;QACN,SAAS,EAAE,UAAU;QACrB,iBAAiB,EAAE,QAAQ;QAC3B,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,KAAK;KACd,CAAC;;8CACW;AAEb;IAAC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;;oDAGnB;4BAlDU,iBAAiB;IAF7B,IAAA,gBAAM,EAAC,eAAe,CAAC;IACvB,IAAA,oBAAU,EAAC,aAAa,CAAC;GACb,iBAAiB,CAmD7B"}
|
|
@@ -2228,7 +2228,7 @@ let WorkflowEngineService = WorkflowEngineService_1 = class WorkflowEngineServic
|
|
|
2228
2228
|
async listActivityLogs(instanceId, scope) {
|
|
2229
2229
|
await this.getApprovalInstance(instanceId, scope);
|
|
2230
2230
|
return this.activityLogRepository.find({
|
|
2231
|
-
order: {
|
|
2231
|
+
order: { seq: 'ASC' },
|
|
2232
2232
|
where: { instanceId },
|
|
2233
2233
|
});
|
|
2234
2234
|
}
|
|
@@ -4259,7 +4259,7 @@ let WorkflowEngineService = WorkflowEngineService_1 = class WorkflowEngineServic
|
|
|
4259
4259
|
}
|
|
4260
4260
|
async readLatestReturnedInstanceContext(manager, instanceId) {
|
|
4261
4261
|
const activity = await manager.getRepository(activity_log_entity_1.ActivityLogEntity).findOne({
|
|
4262
|
-
order: {
|
|
4262
|
+
order: { seq: 'DESC' },
|
|
4263
4263
|
where: {
|
|
4264
4264
|
eventType: workflow_engine_enums_1.ActivityLogEventTypeEnum.INSTANCE_RETURNED,
|
|
4265
4265
|
instanceId,
|