Version 3
When items fail

When items fail

Stop robots that are working on the wrong thing, fix, mark done, or delete the items a robot could not finish, then resume the work item. Each item goes through the runs as one item: never copied, and never run twice unless you ask.

Audience: builders and operators

Task Engine is in private preview. To get access, contact us (opens in a new tab).

Choose what a step does with failed items

Each task package step has a Failed items setting:

SettingWhat happens when an item fails
Continue (the default)The failed item is recorded and passes nothing on. The other items go to the next step, and the work item carries on.
Fail the stepThe work item stops at the step. Nothing after it runs until you resume.

Use Fail the step when a failed item needs a person before the work can go on, for example an order that must not be billed half done. If the robot run fails as a whole, for example because the robot crashed, the step always stops the work item.

Each item goes through the runs as one item

A work item can run more than once. Each time you resume it, it starts a new run at the step it stopped at. The items do not start over. Each one keeps its place and its result:

Six items going through two runs of the same step. Done items are not given to the second run. A person fixes one failed item's data and marks another done between the runs, and the second run is given only the two items still failed.
Six items going through two runs of the same step. Done items are not given to the second run. A person fixes one failed item's data and marks another done between the runs, and the second run is given only the two items still failed.
  • One item, never copied. An item keeps its place from the first run to the last. Each run that works on it adds an attempt to its history.
  • Never run twice. A run is given only the items that are failed or not finished. Done items keep their results and are not given again.
  • Under your control. Between runs, only you change items, and every change is recorded with who made it and when.

When a work item stops at a step

The work item says where it stopped and what needs you:

A work item stopped at its first step. The box says one of nine items still needs attention. How it got here lists run 1, a person's changes, run 2, and what Resume will run next.
A work item stopped at its first step. The box says one of nine items still needs attention. How it got here lists run 1, a person's changes, run 2, and what Resume will run next.
  • The box at the top names the step, counts the items that still need attention, and says what Resume will do. Review the items opens the step's task items.
  • The step's counts show where all its items stand now. Select a count, such as 1 failed, to see just those items. Why groups the failures by reason.
  • The run lines list every run of the step. Each says when it ran, how many items it was given, and how they ended. Its dot is green when every item went through and red when some failed. Select a run to open its logs.
  • The people line between runs says who changed items and how.
  • Next says what Resume will run.

Stop a robot step while it runs

Sometimes you need robots to stop before they finish: the input turned out to be wrong, or the target system is about to go down. You can stop one step and keep the work item, instead of cancelling it.

While robots work on a step, the work item's red button reads Stop…, and the step's run lines end with Stop. On the robot run page, the same choice is Stop step. Each opens one dialog with every way to stop, safest first:

ChoiceWhat happensCan you resume?
Let robots finish their current items (the default)Each robot finishes the item it is working on, then stops. No robot takes another item.Yes
Stop nowThe robots stop at once. The items they were working on fail, and a robot may have done part of their work.Yes
Cancel the work itemEnds the work item for good. The robots stop at once. Sema4.ai asks you to confirm.No, only run again from the start

Add a Reason if you like. It is kept with the work item's history.

When you stop a step, the items no robot started fail as not processed, and the work item stops at the step, whatever the step's Failed items setting. The work item then shows who stopped it and why, for example "Stopped by Ana Ruiz: The vendor list was wrong." From there it is like any stopped work item: settle the failed items and resume, as below.

Check the items a stop interrupted. After Stop now, the items the robots were working on may be half done. The Resume dialog counts them as interrupted. Check each one in the target system, and mark it done if its work went through, before you resume.

Stopping needs permission to operate the Project, the same as resuming. Every stop is recorded in the audit log.

Settle the failed items

Open Task items and pick the step. For each failed item, choose one:

What happens to one task item: queued, in progress, then done, failed, or not processed. While the work item is stopped, you can edit a failed item's data, mark it done, or delete it, and then resume.
What happens to one task item: queued, in progress, then done, failed, or not processed. While the work item is stopped, you can edit a failed item's data, mark it done, or delete it, and then resume.
ActionUse it whenWhat happens
Edit dataThe data was wrong, for example a missing fieldThe item stays failed. Resume gives the robot the new data.
Mark as doneYou finished the work by hand, or it turns out it was doneThe item is done. It is not run again and passes nothing to the next step.
DeleteThe item should not be processed at all, for example a duplicateThe item is not run again, and its output items no longer go to the next step.
NothingThe failure was temporary, for example a timeoutResume runs the item again with the same data.

To act on many items at once, select their rows and use Mark N items done or Delete N items above the list.

You can change items only while the work item is stopped at their step. Once it moves on, its items are read only.

Check the items that were not processed. An item is not processed when the robot run ended before the robot finished it, for example when the robot crashed. The robot may have done part of the work, such as creating the order, before it stopped. Resume runs these items again. If the work already went through, mark the item done first.

Resume the work item

Select Resume on the work item, or in its Next line. Before anything runs, a dialog says exactly what Resume will do: how many items the robot runs again and how many of them have edited data, which items are not run again, and which items were not processed. Select Resume in the dialog to start.

Resume starts a new run at the step the work item stopped at:

  • The robot is given only the items that are still failed or not processed, each with its current data.
  • Items that are done, marked done, or deleted are not given to the robot.
  • When every item is settled, Resume goes straight on to the next step.
  • The steps before the stopped step keep their results and do not run again.

The next step gets the output items of every item that is done, from whichever run finished it.

Resume or rerun

ResumeRerun
Starts atThe step the work item stopped atThe first step
Items the robot getsOnly the items still failed or not processedEvery item, read again from the work item's data
Items already doneKeep their resultsRun again
Your edits, marks, and deletionsKeptNot used. The items start over.

Rerun can run work twice. It gives the robot every item again, including items a robot already finished. Use it only when the work is safe to repeat. To finish a stopped work item, use Resume.

When a robot step has already worked on items, Rerun asks first. The dialog names each robot step and how many of its items a robot already finished, and says they run a second time.

See an item's history

Open an item's row to see its data now and what happened to it:

One item's history: run 1 failed with INVALID_ORDER on the data it was given, a person edited the data, and run 2 finished the item.
One item's history: run 1 failed with INVALID_ORDER on the data it was given, a person edited the data, and run 2 finished the item.
  • Data now is the item's data as the next attempt will get it.
  • What happened lists every attempt and every change, oldest first.
    • Each run says when it ran, how long it took, on which worker, and how the item ended. Select the run to open its logs.
    • Robot was given shows the data an attempt ran with, when it differs from the data now, for example before your edit.
    • Each edit names the fields it changed, with the old and the new value.
  • The item's output items, and the files for the next step, are listed below.

Do it from the API or an agent

Every action on this page is also available outside the web app:

  • The Project API has endpoints to stop a robot step, edit, mark done, and delete task items, read an item's history, and resume or rerun the work item.
  • Agents connected through MCP, and the Project's assistant in a conversation, can do the same.

Every change made this way is recorded in the item's history like any other, with who made it.