1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! # Task Module
//!
//! This module defines the `Task` structure, which represents a single
//! processing unit within a workflow. Tasks are the fundamental building
//! blocks of data processing pipelines.
use crateFunctionConfig;
use Deserialize;
use Value;
/// A single processing unit within a workflow.
///
/// Tasks execute functions with optional conditions and error handling.
/// They are processed sequentially within a workflow, allowing later tasks
/// to depend on results from earlier ones.
///
/// # Example JSON Definition
///
/// ```json
/// {
/// "id": "validate_user",
/// "name": "Validate User Data",
/// "description": "Ensures user data meets requirements",
/// "condition": {"==": [{"var": "metadata.type"}, "user"]},
/// "function": {
/// "name": "validation",
/// "input": { "rules": [...] }
/// },
/// "continue_on_error": false
/// }
/// ```
/// Returns the default condition value (always true).