pub fn process_message(workflows_json: &str, payload_json: &str) -> PromiseExpand description
Process a payload through a one-off engine (convenience function).
Creates an engine with the given workflows and processes a single payload. Use WasmEngine class for better performance when processing multiple payloads.
§Arguments
workflows_json- JSON string containing an array of workflow definitionspayload_json- JSON string of the payload to process
§Returns
A Promise that resolves to the processed message as a JSON string
§Example
const payload = JSON.stringify({ name: "John", email: "john@example.com" });
const result = await process_message(workflowsJson, payload);
console.log(JSON.parse(result));