validate_process/validate_process.rs
1//! Validates and compiles a JSON definition without integration features or a database.
2
3use fluxpro_engine::models::process_def::ProcessDefinition;
4
5fn main() -> anyhow::Result<()> {
6 let definition: ProcessDefinition =
7 serde_json::from_str(include_str!("definitions/minimal.json"))?;
8 let compiled = definition
9 .compile()
10 .map_err(|error| anyhow::anyhow!("{error}"))?;
11 println!("{}", serde_json::to_string_pretty(&compiled)?);
12 Ok(())
13}