waitForWorkItem: Wait for a Design Automation WorkItem to Complete.

View source: R/utils.R

waitForWorkItemR Documentation

Wait for a Design Automation WorkItem to Complete.

Description

Polls checkPdf at a fixed interval until the WorkItem reaches a terminal state (any status other than "inprogress" or "pending").

Usage

waitForWorkItem(id, token, interval = 5, timeout = 300, verbose = TRUE)

Arguments

id

A string. WorkItem ID from makePdf()$content$id.

token

A string or aps_token object with code:all scope.

interval

Seconds between polls. Defaults to 5.

timeout

Maximum seconds to wait before aborting. Defaults to 300.

verbose

If TRUE (default), prints a message after each poll.

Value

The final checkPdf response object.

Examples

## Not run: 
resp <- makePdf(source = mySource, destination = myDest, token = myToken)
done <- waitForWorkItem(id = resp$content$id, token = myToken)
done$content$status

## End(Not run)

AutoDeskR documentation built on May 28, 2026, 5:08 p.m.