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

Channel Client

The client channel is used by application services to connect to the workflow service, subscribe to messages, and execute workflow tasks.

Installation

Install the client library via cargo:

cargo add acts-channel

Supported Languages

LanguageLibrary
Rustacts-channel
Pythonacts-channel-py
Goacts-channel-go

Basic Usage

#![allow(unused)]
fn main() {
use acts_channel::{Client, ChannelOptions};

let mut client = Client::new("http://localhost:8080", &ChannelOptions::default());

// Connect to the service
client.connect().await?;

// Subscribe to messages
client.subscribe("client1", "act*", None, None).await?;

// Deploy a model
client.deploy(&model_str).await?;

// Start a workflow
let mut vars = Vars::new();
vars.set("input", 100);
client.start("model_id", vars).await?;
}