ErrorsBackground work · rule
type.batch_each_invalid
A batch's each: or finished: is not one call of an action in its domain, or a write's each: no inline function giving the row.
Area 12, Background work; not declinable; the next step is usually the agent's.
each: and finished: are one call of an action in the same domain,
whose arguments are the item, a field inside it, or a value saved with
the run. (A file helper's write's each: is one inline function giving
the item's row instead, refused when it is anything else.)
One that works something out of the item is refused:
action mark_code(code: ShelfCode) -> Unit { assert code == code}action sweep_shelf(page: ItemPage) -> BatchRun { return batches.each(from: items(page), each: item -> mark_code(ShelfCode(item.code)))}
error batches.each's each: isn't one call of an action
--> main.jadpo:6:68
|6 | return batches.each(from: items(page), each: item -> mark_code(ShelfCode(item.code))) | ^^^^^^^^^^^^^^^^^^^^ the item and more
- reason
- An argument reading
itemisitemitself or a field inside it, which the run reads from each item; one that reads nothing of it is worked out now and saved with the run. Work the rest out in the action it calls. - next
- Write
each: item -> <action>(...), calling an action in this domain (agent) - rule
- type.
batch_ each_ invalid - help
- https://jadpo.
dev/docs/errors/type. batch_ each_ invalid
Markdown for agents: /docs/errors/type.batch_each_invalid.md.Built from Jadpo main at aee2e8f.