Skip to contents

Blocks until a running step finishes on the improve server. Optionally constrains completion to a specific runserver and tool combination.

Usage

finishRunResource(
  ident,
  from = pwd(),
  runserverName = NULL,
  runserverToolName = NULL
)

Arguments

ident

A step identifier. Can be the step's path, resource (version) id, full entity (version) id, or short entity (version) id.

from

Root path for resolving relative paths. Defaults to pwd().

runserverName

Optional runserver name. When set, completion is only acknowledged if the step finished on this runserver (must be paired with runserverToolName).

runserverToolName

Optional tool name. When set, completion is only acknowledged if the step finished with this tool (must be paired with runserverName).

Value

The step identifier, returned invisibly after the run completes.

Details

The function polls the step status every 5 seconds until the run status is FINISHED. If runserverName and runserverToolName are provided, the function checks the most recent main process run and only returns when the finished run matches the specified runserver tool.

This is typically used after runStepResource when orchestrating sequential workflows.

References

ics1140

See also

runStepResource to start a step, terminateStepResource to stop a running step

Examples

if (FALSE) { # \dontrun{
# Run a step and wait for completion
runStepResource(ident = "/improve-tutorial/Modeling/Step 1")
finishRunResource(ident = "/improve-tutorial/Modeling/Step 1")
} # }