From 395a6dc683bcb687ad5fd1c5b1b63205ffd1af79 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Thu, 7 Aug 2025 22:53:00 -0700 Subject: [Rust] Add builder API for creating workflows `Workflow::new` is replaced by `Workflow::build` that returns a `Builder` type that supports the operations that mutate a workflow, such as registering activities. `Workflow::instance` is replaced by `Workflow::get` to make clear that it is intended to look up an existing workflow. `Workflow::cloned` is introduced to wrap the common pattern of retrieving an existing workflow and cloning it with the same name in order to modify it. `Builder::activity_before` / `Builder::activity_after` are introduced to wrap the common pattern of registering an activity then inserting it before or after a given activity. --- plugins/warp/src/plugin.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins/warp/src/plugin.rs') diff --git a/plugins/warp/src/plugin.rs b/plugins/warp/src/plugin.rs index 3306801d..ee778062 100644 --- a/plugins/warp/src/plugin.rs +++ b/plugins/warp/src/plugin.rs @@ -102,7 +102,10 @@ pub extern "C" fn CorePluginInit() -> bool { // Register our highlight render layer. HighlightRenderLayer::register(); - workflow::insert_workflow(); + if workflow::insert_workflow().is_err() { + log::error!("Failed to register WARP workflow"); + return false; + } // TODO: Make the retrieval of containers wait on this to be done. // TODO: We could also have a mechanism for lazily loading the files using the chunk header target. -- cgit v1.3.1