Struct dmntk_workspace::Workspace
source · pub struct Workspace { /* private fields */ }
Expand description
Structure representing the container for DMN™ models.
Implementations§
source§impl Workspace
impl Workspace
sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Deletes all definitions and model evaluators,
switches a workspace to state STASHING
.
sourcepub fn add(&mut self, definitions: Definitions) -> Result<()>
pub fn add(&mut self, definitions: Definitions) -> Result<()>
Adds a definition to workspace, deletes all model evaluators,
switches a workspace to state STASHING
.
sourcepub fn remove(&mut self, namespace: &str, name: &str)
pub fn remove(&mut self, namespace: &str, name: &str)
Removes a definition from workspace, deletes all model evaluators,
switches a workspace to state STASHING
.
sourcepub fn replace(&mut self, definitions: Definitions) -> Result<()>
pub fn replace(&mut self, definitions: Definitions) -> Result<()>
Replaces a definition in workspace, deletes all model evaluators,
switches a workspace to state STASHING
.
sourcepub fn deploy(&mut self) -> Result<()>
pub fn deploy(&mut self) -> Result<()>
Creates model evaluators for all definitions in workspace,
switches a workspace to state DEPLOYED
.
sourcepub fn evaluate_invocable(
&self,
model_name: &str,
invocable_name: &str,
input_data: &FeelContext
) -> Result<Value>
pub fn evaluate_invocable(
&self,
model_name: &str,
invocable_name: &str,
input_data: &FeelContext
) -> Result<Value>
Evaluates invocable (decision, business knowledge model or decision service) deployed in workspace.