From 0245bb6ff0b97b2640ffe8a5ffb5674b052603e6 Mon Sep 17 00:00:00 2001 From: Yannis Moser Date: Thu, 30 Apr 2026 15:22:57 +0200 Subject: [PATCH 1/5] removed bussineskey warning --- lib/build/constants.ts | 7 ------- lib/build/validations.ts | 5 ----- .../integration/build-validation/processStart.test.ts | 10 +++------- 3 files changed, 3 insertions(+), 19 deletions(-) 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/tests/integration/build-validation/processStart.test.ts b/tests/integration/build-validation/processStart.test.ts index e93287b3..972b9653 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,11 @@ 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'), + (w) => w.msg.includes(BUSINESS_KEY) && w.msg.includes('not found for process start'), ), - ).toBe(true); + ).toBe(false); expect(result.buildSucceeded).toBe(true); }); From d200d77eadab80c7934d65c295dc24bf0c42653f Mon Sep 17 00:00:00 2001 From: Yannis Moser Date: Thu, 30 Apr 2026 15:45:01 +0200 Subject: [PATCH 2/5] added started process after the send --- lib/handlers/processService.ts | 2 +- srv/BTPProcessService.ts | 1 + srv/localProcessService.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) 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; }); From 545fe96ab9417b085c0af9adc1c0e250d31f6840 Mon Sep 17 00:00:00 2001 From: I569192 Date: Mon, 4 May 2026 19:14:58 +0200 Subject: [PATCH 3/5] changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) 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 From a2d1e1edbc80b038c0c4fdf9a723892c6572e5ef Mon Sep 17 00:00:00 2001 From: Yannis Moser Date: Tue, 5 May 2026 11:08:39 +0200 Subject: [PATCH 4/5] fix: remove stale warning message string from business key test assertion --- tests/integration/build-validation/processStart.test.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/integration/build-validation/processStart.test.ts b/tests/integration/build-validation/processStart.test.ts index 972b9653..9bb162e4 100644 --- a/tests/integration/build-validation/processStart.test.ts +++ b/tests/integration/build-validation/processStart.test.ts @@ -817,9 +817,7 @@ describe(`Build Validation: @bpm.process.start annotations`, () => { const result = await validateModel(cdsSource); expect( - result.warnings.some( - (w) => w.msg.includes(BUSINESS_KEY) && w.msg.includes('not found for process start'), - ), + result.warnings.some((w) => w.msg.includes(BUSINESS_KEY)), ).toBe(false); expect(result.buildSucceeded).toBe(true); }); From ea09b648ab69dda4ea2c1c6e57a8d4f8c5e6839e Mon Sep 17 00:00:00 2001 From: Yannis Moser Date: Tue, 5 May 2026 11:12:26 +0200 Subject: [PATCH 5/5] fix: prettier formatting --- tests/integration/build-validation/processStart.test.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/integration/build-validation/processStart.test.ts b/tests/integration/build-validation/processStart.test.ts index 9bb162e4..e2158d9c 100644 --- a/tests/integration/build-validation/processStart.test.ts +++ b/tests/integration/build-validation/processStart.test.ts @@ -816,9 +816,7 @@ describe(`Build Validation: @bpm.process.start annotations`, () => { const result = await validateModel(cdsSource); - expect( - result.warnings.some((w) => w.msg.includes(BUSINESS_KEY)), - ).toBe(false); + expect(result.warnings.some((w) => w.msg.includes(BUSINESS_KEY))).toBe(false); expect(result.buildSucceeded).toBe(true); });