task_handler

Attribute Macro task_handler 

Source
#[task_handler]
Expand description

Attribute macro to register an external task handler function with a name (activityId/topic). Usage in a binary or library depending on operaton-task-worker:

use operaton_task_worker_macros::task_handler;
use operaton_task_worker::types::{InputVariables, OutputVariables};

#[task_handler(name = "example_echo")]
fn echo(_input: &InputVariables) -> Result<OutputVariables, Box<dyn std::error::Error>> {
    Ok(std::collections::HashMap::new())
}