rez_core 5.0.299 → 5.0.300
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/dist/module/workflow-automation/service/schedule-handler.service.js +16 -1
- package/dist/module/workflow-automation/service/schedule-handler.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/workflow-automation/service/schedule-handler.service.ts +24 -1
package/package.json
CHANGED
|
@@ -133,11 +133,34 @@ export class ScheduleHandlerService {
|
|
|
133
133
|
// 🔁 Step 2A: Evaluate criteria for each record
|
|
134
134
|
for (const record of results) {
|
|
135
135
|
const entityIdToUse = record.id; // assuming 'id' column in the table
|
|
136
|
+
|
|
137
|
+
const executionUser = {
|
|
138
|
+
organization_id: jobData.organization_id,
|
|
139
|
+
level_id: record.level_id,
|
|
140
|
+
level_type: record.level_type,
|
|
141
|
+
appcode: jobData.appcode,
|
|
142
|
+
id: jobData.createdBy,
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
if (!record.level_id || !record.level_type) {
|
|
146
|
+
this.logger.warn(
|
|
147
|
+
`Skipping entity ${record.id}: missing school context`,
|
|
148
|
+
);
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
this.logger.debug(
|
|
153
|
+
`Evaluating filter for entity ${record.id} at ${record.level_type}:${record.level_id}`,
|
|
154
|
+
);
|
|
155
|
+
|
|
136
156
|
const criteriaMatched = await this.filterEvaluator.evaluateCriteria(
|
|
137
157
|
mappedEntityType,
|
|
138
158
|
filter,
|
|
139
159
|
entityIdToUse,
|
|
140
|
-
|
|
160
|
+
{
|
|
161
|
+
...jobData,
|
|
162
|
+
user: executionUser,
|
|
163
|
+
},
|
|
141
164
|
);
|
|
142
165
|
|
|
143
166
|
this.logger.debug(
|