{#if flowModule.id === $selectedId} {#if flowModule.value.type === 'forloopflow'} {:else if flowModule.value.type === 'branchone' || flowModule.value.type === 'branchall'} {:else if flowModule.value.type === 'identity'} {#if $selectedId == 'failure'} If defined, the error handler will take as input, the result of the step that errored (which has its error in the 'error field').

Steps are retried until they succeed, or until the maximum number of retries defined for that spec is reached, at which point the error handler is called.
{:else}

Select a step kind Until being defined, this step acts as an identify function, returning as result its input and assigning it a key 'previous_result' if the input is not a json object

{/if} { const [module, state] = await createLoop(flowModule.id) flowModule = module $flowStateStore[module.id] = state }} on:branchone={async () => { const [module, state] = await createBranches(flowModule.id) flowModule = module $flowStateStore[module.id] = state }} on:branchall={async () => { const [module, state] = await createBranchAll(flowModule.id) flowModule = module $flowStateStore[module.id] = state }} on:pick={async ({ detail }) => { const { path, summary, kind } = detail const [module, state] = await pickScript(path, summary, flowModule.id) if (kind == Script.kind.APPROVAL) { module.suspend = { required_events: 1, timeout: 1800 } } flowModule = module $flowStateStore[module.id] = state }} on:new={async ({ detail }) => { const { language, kind, subkind } = detail const [module, state] = await createInlineScriptModule( language, kind, subkind, flowModule.id ) if (kind == Script.kind.APPROVAL) { module.suspend = { required_events: 1, timeout: 1800 } } flowModule = module $flowStateStore[module.id] = state }} failureModule={$selectedId === 'failure'} /> {:else if flowModule.value.type === 'rawscript' || flowModule.value.type === 'script'} {/if} {:else if flowModule.value.type === 'forloopflow'} {#each flowModule.value.modules as submodule, index (index)} {/each} {:else if flowModule.value.type === 'branchone'} {#if $selectedId === `${flowModule?.id}-branch-default`}
Default branch
{:else} {#each flowModule.value.default as submodule, index} {/each} {/if} {#each flowModule.value.branches as branch, branchIndex (branchIndex)} {#if $selectedId === `${flowModule?.id}-branch-${branchIndex}`} {:else} {#each branch.modules as submodule, index} {/each} {/if} {/each} {:else if flowModule.value.type === 'branchall'} {#each flowModule.value.branches as branch, branchIndex (branchIndex)} {#if $selectedId === `${flowModule?.id}-branch-${branchIndex}`} {:else} {#each branch.modules as submodule, index} {/each} {/if} {/each} {/if}