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
/*
* Orvanta API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 6.5.0
* Contact: contact@orvanta.cloud
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// CmmnCaseInstance : The pure engine's own state, embedded verbatim in `CmmnCaseStatus`. Owned by `orvanta-cmmn`, which depends on no I/O --- a change to this shape is a change in that crate.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CmmnCaseInstance {
/// The `<case id>` the deployed document declares.
#[serde(rename = "case_id")]
pub case_id: String,
#[serde(rename = "state")]
pub state: models::CmmnCaseState,
#[serde(rename = "instances")]
pub instances: Vec<models::CmmnPlanItemInstance>,
/// Case variables. Arbitrary JSON by definition.
#[serde(rename = "variables")]
pub variables: std::collections::HashMap<String, serde_json::Value>,
#[serde(rename = "history")]
pub history: Vec<models::CmmnTraceEvent>,
/// Case-level `completable`, feeding `${cmmn:isStageCompletable()}` at the case plan model.
#[serde(rename = "completable")]
pub completable: bool,
/// Criterion latches for the case plan model's own exit criteria, keyed by criterion id.
#[serde(rename = "satisfied_on_parts")]
pub satisfied_on_parts: std::collections::HashMap<String, Vec<String>>,
#[serde(rename = "satisfied_if_parts")]
pub satisfied_if_parts: Vec<String>,
}
impl CmmnCaseInstance {
/// The pure engine's own state, embedded verbatim in `CmmnCaseStatus`. Owned by `orvanta-cmmn`, which depends on no I/O --- a change to this shape is a change in that crate.
pub fn new(case_id: String, state: models::CmmnCaseState, instances: Vec<models::CmmnPlanItemInstance>, variables: std::collections::HashMap<String, serde_json::Value>, history: Vec<models::CmmnTraceEvent>, completable: bool, satisfied_on_parts: std::collections::HashMap<String, Vec<String>>, satisfied_if_parts: Vec<String>) -> CmmnCaseInstance {
CmmnCaseInstance {
case_id,
state,
instances,
variables,
history,
completable,
satisfied_on_parts,
satisfied_if_parts,
}
}
}