Skip to main content

Monitor a Wrkflow

Monitor a Wrkflow watches a child Wrkflow that is already running and tells the parent Wrkflow when something new appears in the child's Launch Console. Use it with Launch an async Wrkflow, which starts a child Wrkflow in the background and returns a Launch ID.

Use this Wrk Action when a parent Wrkflow needs to wait for updates, handle questions, or know when a child Wrkflow finishes, without waiting for the entire child run to finish first.

When to use it

Use Monitor a Wrkflow when you are running one Wrkflow inside another:

  1. The parent Wrkflow starts a child with Launch an async Wrkflow and gets a Wrkflow launch ID.
  2. The child Wrkflow runs on its own and sends updates to its Launch Console (for example with Send to Launch Console or Send user form to Launch Console).
  3. The parent uses Monitor a Wrkflow with that launch ID to wait for the next message or for the child to finish.

Monitor a Wrkflow is a good fit when:

  • The child Wrkflow may take a while and the parent needs to respond to progress or questions as they come in.
  • The child sends info or question messages that the parent needs to handle.
  • You are okay waiting roughly 15 to 60 seconds after a message is sent or the child finishes.

Monitor a Wrkflow is not for instant updates. If the parent needs to react right away when the child finishes or sends a message, use Launch a sync Wrkflow instead.

You also do not need Monitor a Wrkflow if you only want to read the Launch Console yourself in the platform.

How it works

Every 15 seconds, Monitor a Wrkflow checks the child Launch for new Launch Console messages and for completion.

In most cases, you can expect a result within 15 to 60 seconds after:

  • The child sends a message to the Launch Console, or
  • The child Launch finishes.

This Wrk Action is not instant. If you need immediate notification, use Launch a sync Wrkflow.

In the background, the Wrk Action keeps checking for up to 250 seconds, pauses for 60 seconds, then checks again. This repeats until there is a new message or the child finishes. From the parent Wrkflow, it looks like one step that keeps waiting until something happens.

It watches three types of Launch Console activity:

Activity typeWhat it means
infoA progress or update message.
questionThe child is asking for input.
answerA question was answered.

Monitor a Wrkflow remembers the last info message it already reported, so you will not get the same update twice. Run Monitor a Wrkflow again after each Info outcome to pick up the next one.

Typical setup

  1. Launch an async Wrkflow — use the Wrkflow launch ID from the output.
  2. Monitor a Wrkflow — pass that launch ID.
  3. Branch on the result:
    • Info — handle the message, then go back to step 2.
    • Question — get a reply, answer the question, then go back to step 2.
    • Success — the child Wrkflow finished.

Outcomes and outputs

Monitor a Wrkflow has three outcomes. Each one sets Message status and fills in the other outputs as needed.

OutcomeMessage statusWhen you get it
SuccessCOMPLETEDThe child Launch finished.
InfoINFORMThe child is still running and sent a new info message.
QuestionQUESTIONThe child is still running and is waiting for an answer to a Launch Console question.

If both Question and Info could apply, you get Question.

Success

You get Success when the child Launch finishes.

  • Message contains the latest console message, or No messages. if none were recorded.
  • Message status is COMPLETED.
  • Activities array contains a list of everything seen during this check.

If the child finished but messages have not shown up yet, Monitor a Wrkflow keeps checking a little longer before returning Success.

Info

You get Info when the child is still running and sends a new info message (usually from Send to Launch Console in the child Wrkflow).

  • Message contains the latest info text.
  • Message status is INFORM.
  • Activities array contains everything collected during this check.

After you handle the update (log it, store it, notify someone, and so on), run Monitor a Wrkflow again with the same launch ID to wait for the next message.

Question

You get Question when the child is still running and is waiting for an answer in the Launch Console.

  • Message contains the question text.
  • Message status is QUESTION.
  • Question ID is the ID you need to send your reply.
  • Activities array contains everything collected during this check.

After you submit an answer, run Monitor a Wrkflow again so the parent can keep watching the child Launch.

Connect Info and Question back to Monitor

For this pattern to work, always connect the Info and Question outcomes back to Monitor a Wrkflow in the parent Wrkflow.

When the child uses Send to Launch Console, the parent picks that up on the next check. If you handle the message somewhere else and never return to Monitor a Wrkflow, the parent stops watching the child and will miss later messages and completion.

Recommended wiring:

  • Info → your steps → Monitor a Wrkflow (same launch ID).
  • Question → your reply steps → Monitor a Wrkflow (same launch ID).
  • Success → your completion steps.

You can add other Wrk Actions along those paths (send email, write to Datastore, call an API) as long as the path eventually reaches Monitor a Wrkflow again before the child finishes.

Optional extra steps

You can also connect Info or Question to other Wrk Actions when you want something else to happen when the child sends a message (for example send a notification or log an entry).

If you do, still connect a path back to Monitor a Wrkflow so the parent keeps watching the child.

Inputs and outputs

Application

  • Wrk

Inputs (what you have)

NameDescriptionData TypeRequired?Example
Wrk API keyYour Wrk API key from https://account.wrk.com/api-keyConnected AccountYes
Wrkflow launch IDThe Launch ID to monitor (from Launch an async Wrkflow)NumberYes

Outputs (what you get)

NameDescriptionData TypeRequired?Example
MessageLatest message from the monitored Launch ConsoleText (Long)No
Message statusCOMPLETED, INFORM, or QUESTIONText (Short)No
Question IDID of the question to reply to (Question only)Text (Short)No
Activities arrayList of everything seen during this checkText (Long)No