Empty array process function (#9977)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2025-09-30 21:05:59 +07:00
committed by GitHub
parent 80886e8201
commit 5fa0bb3c64
17 changed files with 147 additions and 13 deletions
@@ -375,4 +375,29 @@ export async function CurrentDate (): Promise<Timestamp> {
return Date.now()
}
export function EmptyArray (): any[] {
return []
}
export async function ExecutionInitiator (
value: null,
props: Record<string, any>,
control: ProcessControl,
execution: Execution
): Promise<Ref<Person> | undefined> {
const socialId = await control.client.findOne(contact.class.SocialIdentity, {
_id: (execution.createdBy ?? execution.modifiedBy) as any
})
return socialId?.attachedTo
}
export async function ExecutionStarted (
value: null,
props: Record<string, any>,
control: ProcessControl,
execution: Execution
): Promise<Timestamp> {
return execution.createdOn ?? execution.modifiedOn
}
// #endregion