Loops, conditions and parallel work
Write loops and conditions the way you'd explain them to a colleague. When you prepare the workflow, Unstract Flow turns "for each", "if … otherwise" and "in parallel" into its loops, branches and parallel steps.
Loops
For each PDF attachment in the thread, extract the invoice number and total with @unstract.
While a run works through a loop whose length it knows, the run views count the items as it goes.
A failure on one item stops the run. To keep going instead, say so in the spec:
If an attachment can't be read, record it as failed and continue with the next one.
A run whose workflow reports that it carried on past failed items ends as Partial; otherwise it can end as Succeeded. Either way its log marks each step that failed with an error Failed (continued). A step that timed out isn't marked. Run details shows where.
While a loop runs, Blackboard Variables in the Run tab shows the item it's on and, for a loop over a list of known size, a row with its item count, how many items are done, and the values of the last 50 items. A loop over a source that is taken item by item, such as an inbox, has no item count to show: Blackboard Variables shows the item it's on.
Conditions
If the invoice total is over $10,000, send it to @hitl for review. Otherwise, post it to @quickbooks.
Give each condition its exact rule and say what happens in every case, including the "otherwise".
Parallel work
Extract the data from all attachments in parallel.
The items are processed at the same time, and the results keep the order of the items. Each connector action's hourly call limit applies to the calls a parallel step makes. A call turned away while the run is already waiting joins that wait and adds nothing to the count, but a parallel step over many items can be turned away again after each wait, and after six waits the next refusal fails the run. Before you run a parallel step over many items, raise the instance's Rate Limit for [instance] (calls/hour) above the number of calls all of the workflow's runs make in an hour, up to 5,000. Leave it empty when the placeholder already shows a higher inherited limit, as it does for Database, whose own limit is 500,000. For Platform Tools, such as file and table actions, raise Tool call rate limit (per hour) in the Settings tab.
To work through a large inbox, folder or table, have each run process one item and set a scheduled deployment's Parallelism above 1, so each scheduled time starts runs until that many are going at once. Pipelines explains how runs share the items.