diff --git a/CHANGELOG.md b/CHANGELOG.md index de45ef46..0ccabe98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,18 @@ ## Version 0.2.1 - 2026-04-20 +### Added + +- Logs during process start + ### Fixed - Resolving of `impl` for `ProcessService` +### Removed + +- Build time warning if no business key is found + ## Version 0.2.0 - 2026-04-02 ### Added diff --git a/lib/build/constants.ts b/lib/build/constants.ts index 5eb44b7d..4ae04f5a 100644 --- a/lib/build/constants.ts +++ b/lib/build/constants.ts @@ -46,13 +46,6 @@ export const WARNING_BUSINESS_KEY_MUST_BE_EXPRESSION = ( return `${entityName}: ${annotationBKey} must be a valid expression. Length check will be skipped.`; }; -export const WARNING_BUSINESS_KEY_NOT_FOUND = ( - entityName: string, - annotationBKey: string, -): string => { - return `${entityName}: ${annotationBKey} not found for process start. Length check will be skipped.`; -}; - // ============================================================================= // Start Annotation Validation Messages // ============================================================================= diff --git a/lib/build/validations.ts b/lib/build/validations.ts index b1c05072..d89018f1 100644 --- a/lib/build/validations.ts +++ b/lib/build/validations.ts @@ -28,7 +28,6 @@ import { WARNING_INPUT_PATH_NOT_IN_ENTITY, ERROR_BUSINESS_KEY_MUST_BE_EXPRESSION, WARNING_BUSINESS_KEY_MUST_BE_EXPRESSION, - WARNING_BUSINESS_KEY_NOT_FOUND, } from './constants'; import { EntityContext, ParsedInputEntry } from '../shared/input-parser'; @@ -93,10 +92,6 @@ export function validateBusinessKeyForProcessStart( ) { const bKeyExpr = def[businessKeyAnnotation]; if (!bKeyExpr) { - buildPlugin.pushMessage( - WARNING_BUSINESS_KEY_NOT_FOUND(entityName, businessKeyAnnotation), - WARNING, - ); return; } if (!bKeyExpr['='] || (!bKeyExpr['xpr'] && !bKeyExpr['ref'])) { diff --git a/lib/handlers/processService.ts b/lib/handlers/processService.ts index 597659e4..2d340597 100644 --- a/lib/handlers/processService.ts +++ b/lib/handlers/processService.ts @@ -29,7 +29,7 @@ export function registerProcessServiceHandlers(service: cds.Service): void { function registerStartHandler(service: cds.Service, definitionId: string): void { service.on('start', async (req) => { - LOG.debug(`Starting process: ${definitionId}`); + LOG.debug(`Queuing process start: ${definitionId}`); if (!req.data) { return req.reject({ status: 400, message: 'Malformed request: missing request data' }); diff --git a/srv/BTPProcessService.ts b/srv/BTPProcessService.ts index e3f05af1..6d562ccf 100644 --- a/srv/BTPProcessService.ts +++ b/srv/BTPProcessService.ts @@ -24,6 +24,7 @@ class ProcessService extends cds.ApplicationService { const { definitionId, context } = request.data; LOG.info('Starting process', definitionId); await this.workflowInstanceClient.startWorkflow(definitionId, context); + LOG.info('Process started successfully', definitionId); }); this.on('cancel', async (request: cds.Request) => { diff --git a/srv/localProcessService.ts b/srv/localProcessService.ts index 7148dabe..40771a9a 100644 --- a/srv/localProcessService.ts +++ b/srv/localProcessService.ts @@ -24,6 +24,7 @@ class ProcessService extends cds.ApplicationService { businessKey, context, }); + LOG.info('Process started successfully', definitionId); return; }); diff --git a/tests/integration/build-validation/processStart.test.ts b/tests/integration/build-validation/processStart.test.ts index e93287b3..e2158d9c 100644 --- a/tests/integration/build-validation/processStart.test.ts +++ b/tests/integration/build-validation/processStart.test.ts @@ -808,7 +808,7 @@ describe(`Build Validation: @bpm.process.start annotations`, () => { }); describe('BusinessKey annotation for process start', () => { - it('should WARN when businessKey annotation is missing on process start entity', async () => { + it('should NOT warn when businessKey annotation is missing on process start entity', async () => { const cdsSource = wrapEntity(` ${PROCESS_START}: { id: 'someProcess', on: 'CREATE' } entity NoBusinessKeyEntity { key ID: UUID; } @@ -816,15 +816,7 @@ describe(`Build Validation: @bpm.process.start annotations`, () => { const result = await validateModel(cdsSource); - expect(result.warnings.length).toBeGreaterThan(0); - expect( - result.warnings.some( - (w) => - w.msg.includes(BUSINESS_KEY) && - w.msg.includes('not found for process start') && - w.msg.includes('Length check will be skipped'), - ), - ).toBe(true); + expect(result.warnings.some((w) => w.msg.includes(BUSINESS_KEY))).toBe(false); expect(result.buildSucceeded).toBe(true); });