pub struct Activity { /* private fields */ }Expand description
An Activity represents a fundamental unit of work within a workflow. It encapsulates
a specific analysis step or action as a callback function, which is augmented by a configuration.
The configuration defines the activity’s metadata, eligibility criteria, and execution semantics,
allowing it to seamlessly integrate into the workflow system.
use binaryninja::workflow::{activity, Activity, AnalysisContext};
fn activity_callback(context: &AnalysisContext) {
// Perform custom analysis using data provided in the context.
}
let config = activity::Config::action(
"example.analysis.analyzeFunction",
"Analyze functions",
"This activity performs custom analysis on each function"
).eligibility(activity::Eligibility::auto());
let activity = Activity::new_with_action(config, activity_callback);
// Register the activity in a `Workflow`.See Activity Fundamentals for more information.