Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MSG

acts.core.msg is a one-way message activity that sends a notification to the client without pausing workflow execution.

steps:
    - id: step1
      uses: acts.core.msg
      params:
        key: notification

Parameters

ParameterDescription
keyMessage key identifier

Difference from IRQ

FeatureIRQMSG
Pauses executionYesNo
Waits for responseYesNo
Client must respondYes (Next/Error/…)No

Client Reception

On the client side, subscribe to msg type messages to receive notifications:

#![allow(unused)]
fn main() {
fn on_message(msg: &Message) {
    if msg.r#type == "msg" {
        match msg.key.as_str() {
            "notification" => {
                println!("Received notification: {:?}", msg);
                // No need to call do_action to respond
            }
            _ => {}
        }
    }
}
}