From 9036072b22114d4360c38248c0b56b7656108028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerrit=20Gr=C3=A4tz?= Date: Wed, 25 Mar 2026 10:08:51 +0100 Subject: [PATCH 1/2] adding log.info --- srv/BTPProcessService.ts | 7 +++++++ srv/localProcessService.ts | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/srv/BTPProcessService.ts b/srv/BTPProcessService.ts index 5d361f8..4bec138 100644 --- a/srv/BTPProcessService.ts +++ b/srv/BTPProcessService.ts @@ -22,11 +22,13 @@ class ProcessService extends cds.ApplicationService { this.on('start', async (request: cds.Request) => { const { definitionId, context } = request.data; + LOG.info('Starting process', definitionId); await this.workflowInstanceClient.startWorkflow(definitionId, context); }); this.on('cancel', async (request: cds.Request) => { const { businessKey, cascade } = request.data; + LOG.info('Cancelling process', businessKey); const instances = await this.workflowInstanceClient.getWorkflowsByBusinessKey(businessKey, [ WorkflowStatus.RUNNING, @@ -47,6 +49,7 @@ class ProcessService extends cds.ApplicationService { this.on('suspend', async (request: cds.Request) => { const { businessKey, cascade } = request.data; + LOG.info('Suspending process', businessKey); const instances = await this.workflowInstanceClient.getWorkflowsByBusinessKey(businessKey, [ WorkflowStatus.RUNNING, @@ -66,6 +69,7 @@ class ProcessService extends cds.ApplicationService { this.on('resume', async (request: cds.Request) => { const { businessKey, cascade } = request.data; + LOG.info('Resuming process', businessKey); const instances = await this.workflowInstanceClient.getWorkflowsByBusinessKey(businessKey, [ WorkflowStatus.SUSPENDED, @@ -86,6 +90,7 @@ class ProcessService extends cds.ApplicationService { this.on('getInstancesByBusinessKey', async (request: cds.Request) => { const { businessKey } = request.data; let { status } = request.data; + LOG.info('Getting instances for', businessKey); if (!businessKey) { return request.reject({ status: 400, message: 'Missing required parameter: businessKey' }); @@ -109,6 +114,7 @@ class ProcessService extends cds.ApplicationService { this.on('getAttributes', async (request: cds.Request) => { const { processInstanceId } = request.data; + LOG.info('Getting attributes for', processInstanceId); if (!processInstanceId) { return request.reject({ @@ -123,6 +129,7 @@ class ProcessService extends cds.ApplicationService { this.on('getOutputs', async (request: cds.Request) => { const { processInstanceId } = request.data; + LOG.info('Getting outputs for', processInstanceId); if (!processInstanceId) { return request.reject({ diff --git a/srv/localProcessService.ts b/srv/localProcessService.ts index a8e9251..22a5491 100644 --- a/srv/localProcessService.ts +++ b/srv/localProcessService.ts @@ -10,6 +10,7 @@ class ProcessService extends cds.ApplicationService { this.on('start', async (req: cds.Request) => { const { definitionId, context } = req.data; const businessKey = req.headers['businessKey'] as string | undefined; + LOG.info('Starting process', definitionId); LOG.debug( `==============================================================\n` + @@ -28,6 +29,7 @@ class ProcessService extends cds.ApplicationService { this.on('cancel', async (req: cds.Request) => { const { businessKey } = req.data; + LOG.info('Cancelling process', businessKey); LOG.debug( `==============================================================\n` + @@ -61,6 +63,7 @@ class ProcessService extends cds.ApplicationService { this.on('suspend', async (req: cds.Request) => { const { businessKey } = req.data; + LOG.info('Suspending process', businessKey); LOG.debug( `==============================================================\n` + @@ -93,6 +96,7 @@ class ProcessService extends cds.ApplicationService { this.on('resume', async (req: cds.Request) => { const { businessKey } = req.data; + LOG.info('Resuming process', businessKey); LOG.debug( `==============================================================\n` + @@ -126,6 +130,7 @@ class ProcessService extends cds.ApplicationService { this.on('getInstancesByBusinessKey', async (req: cds.Request) => { const { businessKey } = req.data; let { status } = req.data; + LOG.info('Getting instances for', businessKey); LOG.debug( `==============================================================\n` + @@ -154,6 +159,7 @@ class ProcessService extends cds.ApplicationService { this.on('getAttributes', async (req: cds.Request) => { const { processInstanceId } = req.data; + LOG.info('Getting attributes for', processInstanceId); LOG.debug( `==============================================================\n` + @@ -181,6 +187,7 @@ class ProcessService extends cds.ApplicationService { this.on('getOutputs', async (req: cds.Request) => { const { processInstanceId } = req.data; + LOG.info('Getting outputs for', processInstanceId); LOG.debug( `==============================================================\n` + From f8145b9f381636de0a51855bd6ffc045aff1668f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerrit=20Gr=C3=A4tz?= Date: Wed, 25 Mar 2026 10:23:50 +0100 Subject: [PATCH 2/2] improved log --- srv/BTPProcessService.ts | 6 +++--- srv/localProcessService.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/srv/BTPProcessService.ts b/srv/BTPProcessService.ts index 4bec138..e3f05af 100644 --- a/srv/BTPProcessService.ts +++ b/srv/BTPProcessService.ts @@ -28,7 +28,7 @@ class ProcessService extends cds.ApplicationService { this.on('cancel', async (request: cds.Request) => { const { businessKey, cascade } = request.data; - LOG.info('Cancelling process', businessKey); + LOG.info('Cancelling process(es)', businessKey); const instances = await this.workflowInstanceClient.getWorkflowsByBusinessKey(businessKey, [ WorkflowStatus.RUNNING, @@ -49,7 +49,7 @@ class ProcessService extends cds.ApplicationService { this.on('suspend', async (request: cds.Request) => { const { businessKey, cascade } = request.data; - LOG.info('Suspending process', businessKey); + LOG.info('Suspending process(es)', businessKey); const instances = await this.workflowInstanceClient.getWorkflowsByBusinessKey(businessKey, [ WorkflowStatus.RUNNING, @@ -69,7 +69,7 @@ class ProcessService extends cds.ApplicationService { this.on('resume', async (request: cds.Request) => { const { businessKey, cascade } = request.data; - LOG.info('Resuming process', businessKey); + LOG.info('Resuming process(es)', businessKey); const instances = await this.workflowInstanceClient.getWorkflowsByBusinessKey(businessKey, [ WorkflowStatus.SUSPENDED, diff --git a/srv/localProcessService.ts b/srv/localProcessService.ts index 22a5491..7148dab 100644 --- a/srv/localProcessService.ts +++ b/srv/localProcessService.ts @@ -29,7 +29,7 @@ class ProcessService extends cds.ApplicationService { this.on('cancel', async (req: cds.Request) => { const { businessKey } = req.data; - LOG.info('Cancelling process', businessKey); + LOG.info('Cancelling process(es)', businessKey); LOG.debug( `==============================================================\n` + @@ -63,7 +63,7 @@ class ProcessService extends cds.ApplicationService { this.on('suspend', async (req: cds.Request) => { const { businessKey } = req.data; - LOG.info('Suspending process', businessKey); + LOG.info('Suspending process(es)', businessKey); LOG.debug( `==============================================================\n` + @@ -96,7 +96,7 @@ class ProcessService extends cds.ApplicationService { this.on('resume', async (req: cds.Request) => { const { businessKey } = req.data; - LOG.info('Resuming process', businessKey); + LOG.info('Resuming process(es)', businessKey); LOG.debug( `==============================================================\n` +