Skip to content
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions lib/build/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
// =============================================================================
Expand Down
5 changes: 0 additions & 5 deletions lib/build/validations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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'])) {
Expand Down
2 changes: 1 addition & 1 deletion lib/handlers/processService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' });
Expand Down
1 change: 1 addition & 0 deletions srv/BTPProcessService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
1 change: 1 addition & 0 deletions srv/localProcessService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class ProcessService extends cds.ApplicationService {
businessKey,
context,
});
LOG.info('Process started successfully', definitionId);
return;
});

Expand Down
12 changes: 2 additions & 10 deletions tests/integration/build-validation/processStart.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -808,23 +808,15 @@ 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; }
`);

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);
});

Expand Down
Loading