Fix processes triggers (On card update, on subprocesses done) (#9841)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2025-09-12 15:12:05 +07:00
committed by GitHub
parent 6fcf58574e
commit fb95ad6ce7
12 changed files with 91 additions and 44 deletions
+2 -14
View File
@@ -88,13 +88,7 @@ export class ProcessMiddleware extends BasePresentationMiddleware implements Pre
from: execution.currentState,
trigger: process.trigger.OnCardUpdate
})
const transition = await pickTransition(
this.client.getModel(),
this.client.getHierarchy(),
execution,
transitions,
updated
)
const transition = await pickTransition(this.client, execution, transitions, updated)
if (transition === undefined) return
const context = await getNextStateUserInput(execution, transition, execution.context)
const txop = new TxOperations(this.client, getCurrentAccount().primarySocialId)
@@ -158,13 +152,7 @@ export class ProcessMiddleware extends BasePresentationMiddleware implements Pre
from: execution.currentState,
trigger: process.trigger.OnToDoClose
})
const transition = await pickTransition(
this.client.getModel(),
this.client.getHierarchy(),
execution,
transitions,
todo
)
const transition = await pickTransition(this.client, execution, transitions, todo)
if (transition === undefined) return
const context = await getNextStateUserInput(execution, transition, execution.context)
const txop = new TxOperations(this.client, getCurrentAccount().primarySocialId)