From fa56d381f47d05b85fa78f0bef1a298bf3458e12 Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Sun, 21 Sep 2025 16:47:25 +0500 Subject: [PATCH] Fix process time (#9900) --- server-plugins/process/src/types.ts | 3 ++- services/process/src/main.ts | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/server-plugins/process/src/types.ts b/server-plugins/process/src/types.ts index 9c169d4781..65e392f581 100644 --- a/server-plugins/process/src/types.ts +++ b/server-plugins/process/src/types.ts @@ -1,5 +1,5 @@ import { Card } from '@hcengineering/card' -import { Doc, MeasureContext, PersonId, Ref, Tx, TxOperations } from '@hcengineering/core' +import { Doc, MeasureContext, PersonId, Ref, Tx, TxOperations, WorkspaceUuid } from '@hcengineering/core' import { Execution, ExecutionError, MethodParams, Trigger, UserResult } from '@hcengineering/process' export type ExecuteFunc = ( @@ -42,6 +42,7 @@ export interface ProcessControl { client: TxOperations cache: Map messageContext: Record + workspace: WorkspaceUuid } export type RollbackFunc = (context: Record, control: ProcessControl) => Tx diff --git a/services/process/src/main.ts b/services/process/src/main.ts index 5178cbd416..991c6390be 100644 --- a/services/process/src/main.ts +++ b/services/process/src/main.ts @@ -67,7 +67,8 @@ export async function messageHandler (record: ProcessMessage, ws: WorkspaceUuid, ctx, client, cache: new Map(), - messageContext: record.context + messageContext: record.context, + workspace: ws } ctx.info('Processing event', { event: record.event, ws, record }) if (record.execution !== undefined) { @@ -528,7 +529,7 @@ async function setTimer ( await temporalClient.workflow.signalWithStart('processTimeWorkflow', { taskQueue: 'process', signal: 'setDate', - args: [targetDate, 'workspace', execution._id], + args: [targetDate, control.workspace, execution._id], signalArgs: [targetDate], workflowId: `${execution._id}_${transition._id}`, searchAttributes: {