Fix process time (#9900)

This commit is contained in:
Denis Bykhov
2025-09-21 18:47:25 +07:00
committed by GitHub
parent 046db133f6
commit fa56d381f4
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -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<string, any>
messageContext: Record<string, any>
workspace: WorkspaceUuid
}
export type RollbackFunc = (context: Record<string, any>, control: ProcessControl) => Tx
+3 -2
View File
@@ -67,7 +67,8 @@ export async function messageHandler (record: ProcessMessage, ws: WorkspaceUuid,
ctx,
client,
cache: new Map<string, any>(),
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: {