Back to the Research Workflow Engine journey

BrokeStop 2 of 8

Letting a research run outlast its browser sessions

In Research Workflow Engine, a finished browser session stays closed, while a run that is still going can add a new one. Resuming after a pause follows stricter rules, so the search can’t change.

What went wrong

In Research Workflow Engine, a research run collects observations from sources through browser sessions. For each source, the engine saves a Research Workflow Engine · The coreCheckpoint rulesDecide whether a checkpoint is a proper new session, or a true recovery of a paused one.See it in the Research Workflow Engine build. A checkpoint holds where the research on that source has got to. A run can need another observation from a source after its browser session has finished. But it couldn’t get one.

Each checkpoint has a state, such as “completed”. The engine has a table of the moves allowed from each state. In the first table, “completed” was a final state, with no moves out of it. So a run that was still going had no allowed next state.

What I changed

The fix closes the session, not the whole run. The finished session’s Research Workflow Engine · The coreVersion storeAdds each accepted version, and its record of the change, under the one checkpoint ID for that source.See it in the Research Workflow Engine build stays closed. A new session is added to the same run and source. Sessions are numbered in order, and the new one must have a higher number than the last. It must also use fresh fingerprints, the values that identify its search and its results.

The engine refuses three things. These are a repeated checkpoint ID, reused session details and writes to a finished run.

Resuming after a pause

Sometimes a session pauses for an access check. Resuming then needs a stricter rule. The browser tab may be missing afterwards, and a new tab should put the research back where it was. So recovery, which means resuming a paused session, keeps the search exactly as it was.

It keeps the search terms, the filters and the sort order. It keeps the place in the results, the counts and the fingerprints. It also keeps the limits and the expiry time. Only three things may change. These are fresh access details, a person’s confirmation and the version details.

The checkpoint holds the state of the research, not a browser session. It holds no cookies or browser profiles. And it can’t extend a pause that has run out of time.

How I know it works

Small tests of single parts cover fresh sessions, repeated session numbers and repeated fingerprints. They also cover finished runs, changed recovery checkpoints and pauses that ran out of time. A larger test, of the parts working together, follows one case. A completed checkpoint takes on new work while its run stays open.