pub struct ErasedWorkflowView {
pub case_ref: CaseRef,
pub workflow_version: WorkflowVersion,
pub phase: Value,
pub phase_ownership: PhaseOwnership,
pub obligations: Vec<ErasedObligation>,
pub blocking_interaction: Option<InteractionRequirement>,
pub notices: Vec<WorkflowNotice>,
pub outcome: Option<Value>,
pub state: Vec<StateField>,
}Expand description
A WorkflowView with phase, obligations and
outcome as canonical JSON, plus the phase ownership the definition declared.
Fields§
§case_ref: CaseRefThe case and the revision it was projected at.
workflow_version: WorkflowVersionVersion of the definition.
phase: ValueThe phase, canonical JSON.
phase_ownership: PhaseOwnershipWho must act.
obligations: Vec<ErasedObligation>Open obligations.
blocking_interaction: Option<InteractionRequirement>Blocking requirement, if any.
notices: Vec<WorkflowNotice>Notices.
outcome: Option<Value>Outcome, canonical JSON, present only when complete.
state: Vec<StateField>What the case HOLDS, as the workflow says it may be stated.
The counterpart of Self::obligations, which say what it still needs.
Filled from
WorkflowDefinition::narratable_state
at projection, because that is the one place holding both the state and
the view. Empty for a workflow that declares none, which is the default.
Implementations§
Source§impl ErasedWorkflowView
impl ErasedWorkflowView
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Returns true when an outcome is present.
Sourcepub fn is_user_owned(&self) -> bool
pub fn is_user_owned(&self) -> bool
Returns true when the phase is user-owned.
Sourcepub fn obligation_ids(&self) -> Vec<&ObligationId>
pub fn obligation_ids(&self) -> Vec<&ObligationId>
Identifiers of the open obligations.
Trait Implementations§
Source§impl Clone for ErasedWorkflowView
impl Clone for ErasedWorkflowView
Source§impl Debug for ErasedWorkflowView
impl Debug for ErasedWorkflowView
Source§impl<'de> Deserialize<'de> for ErasedWorkflowView
impl<'de> Deserialize<'de> for ErasedWorkflowView
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ErasedWorkflowView
Source§impl PartialEq for ErasedWorkflowView
impl PartialEq for ErasedWorkflowView
Source§impl Serialize for ErasedWorkflowView
impl Serialize for ErasedWorkflowView
impl StructuralPartialEq for ErasedWorkflowView
Auto Trait Implementations§
impl Freeze for ErasedWorkflowView
impl RefUnwindSafe for ErasedWorkflowView
impl Send for ErasedWorkflowView
impl Sync for ErasedWorkflowView
impl Unpin for ErasedWorkflowView
impl UnsafeUnpin for ErasedWorkflowView
impl UnwindSafe for ErasedWorkflowView
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.