A Model Class is used to describe what a Model Object will look like in the UI, which logics it uses, what are their calculations, etc.
Fields
uniqueName* – Name of the Model Class, used in Model Object to reference the Model Class they instantiate. It can be modified but the references won’t be updated automatically.
label – Human readable name of the Model Class, displayed to the user, when they select which Model Class they want to use for creating a new Model Object.
definition – JSON definition of what a Model Object using this Model Class should look like and how it should behave, see below.
workflowFormulaName - Name of the /wiki/spaces/UDEV/pages/2675736583 (with workflowType = “model”) which is responsible to initialize the Approval Workflow when the user clicks on “Submit”. If not set, when the user submit the model, it is auto approved and is marked as “No Approval Required”.
Model Class Definition
In a Model Class, the definition
field is a JSON document that contains three main root elements: calculations
, steps
and evaluations
.
Calculations
A list of calculation as defined by the following fields.
Common Fields
name* – Name of the calculation, unique in the Model Class.
type* – Accepted values:
formula
,sequence
,parallel
.
Formula Calculation Fields
formulaName* – Unique name of an existing Formula of nature
model_calculation
, see also Model Logics.
Sequence Calculation Fields
sequence* – List of calculation names defined in this Model Class.
Parallel Calculation Fields
formulaName* – Unique name of an existing Formula of nature
model_parallel_calculation
, see also Model Logics.
Example
{ "definition": { "calculations": [ { "name": "calc1", "type": "formula", "formulaName": "POAI_Test_Calc1" }, { "name": "seq", "type": "sequence", "calculations": [ "calc2", "calc3" ] }, { "name": "calc2", "type": "formula", "formulaName": "POAI_Test_Calc2" }, { "name": "calc3", "type": "formula", "formulaName": "POAI_Test_Calc3" }, { "name": "calc4", "type": "parallel", "formulaName": "POAI_Test_ParallelCalc" } ] } }
Steps
A list of steps as defined by the following fields.
Fields
name* – Name of the step, unique in the Model Class.
label – Human readable name of the step, shown in the UI, it defaults to
name
if not specified.description – Description of the step, shown in the UI.
calculation – Name of the calculation associated to this step, optional.
tabs – List of tabs as defined below.
Tabs
A list of tabs as defined by the following fields.
Common Fields
name* – Name of the tab, unique in the step.
label – Human readable name of the tab, shown in the UI, it defaults to
name
if not specified.type* – Accepted values:
dashboard
,configurator
.
Dashboard Tab Fields
formulaName* – Unique name of an existing Formula of nature
model_evaluation
, see also Model Logics.
Configurator Tab Fields
formulaName* – Unique name of an existing Configurator Formula of nature
model_evaluation
, see also Model Logics and Interactive Forms - Configurators
Example
{ "definition": { "steps": [ { "name": "step1", "label": "First Step", "description": "This step has 1 calculation and 1 tab.", "calculation": "calc1", "tabs": [ { "name": "tab1", "label": "First Tab", "type": "dashboard", "formulaName": "POAI_Test_Dashboard1" } ] }, { "name": "step2", "label": "Second Step", "description": "This step has 1 calculation and 2 tab.", "calculation": "seq", "tabs": [ { "name": "tab1", "label": "First Tab", "type": "dashboard", "formulaName": "POAI_Test_Dashboard2" }, { "name": "tab2", "label": "Configurator Tab", "type": "configurator", "formulaName": "POAI_Test_Configurator" }, ] } ] } }
Evaluations
A list of evaluations as defined by the following fields.
See Query Optimization Engine Results to execute an evaluation from another logic.
Fields
name* – Name of the evaluation, unique in the Model Class.
formulaName* – Unique name of an existing Formula of nature
model_evaluation
, see also Model Logics.
Example
{ "definition": { "evaluations": [ { "name": "query_results", "formulaName": "POAI_Test_QueryResults" } ] } }