Skip to content

Function: executeSyncFormula()

executeSyncFormula(packDef, syncFormulaName, params, context?, __namedParameters?, __namedParameters?): Promise<GenericSyncFormulaResult>

Defined in: testing/execution.ts:702

Executes multiple iterations of a sync formula in a loop until there is no longer a continuation returned, aggregating each page of results and returning an array with results of all iterations combined and flattened.

NOTE: This currently runs all the iterations in a simple loop, which does not adequately simulate the fact that in a real execution environment each iteration will be run in a completely isolated environment, with absolutely no sharing of state or global variables between iterations.

For now, use coda execute --vm to simulate that level of isolation.

Parameters

Parameter Type
packDef BasicPackDefinition
syncFormulaName string
params ParamValues<ParamDefs>
context? SyncExecutionContext<Continuation, Continuation, Continuation>
__namedParameters? ExecuteOptions
__namedParameters? ContextOptions

Returns

Promise<GenericSyncFormulaResult>