...
In a Model Class, the definition
field contains a JSON document that has three main root elements: calculations
, steps
and , evaluations
, actions
, tasks
.
Calculations (calculations
)
...
Info |
---|
See Query Optimization Engine Results to execute an evaluation from another logic. |
Actions (actions
)
When you need to run recalculation of certain Steps of a Model Object regularly, you can configure the list of available actions which could be scheduled. The end-user can set up the regular calculation schedule of those actions via UI page on model object detail page. The scheduling can be also done via SchedulesContext available via method schedulesContext() on the Model Context.
Example of actions definition:
Code Block | ||
---|---|---|
| ||
{
"actions": [
{
"name" : "scheduled-steps",
"label" : "Execute Both Steps",
"type" : "steps",
"fromStep": "schedule",
"toStep" : "summary"
},
{
"name" : "scheduled-task",
"label": "Execute the Scheduled Task",
"type" : "task",
"task" : "scheduled-task"
}
]
} |
Each action has the following fields:
name* - Name of the action, unique in the Model Class
label* - Description of the action, visible to end-user on the model object Schedule page.
type* - What type of action is performed. Available options are
steps - this action will perform calculations from range of Steps. It can be performed only if the model is editable (i.e. not submitted/approved)
task - this action will perform a specified task
fromStep - (Only for type steps. Optional.) Name of a Step. When specified, the action will process only Steps starting with this one.
toStep - (Only for type steps. Optional.) Name of a Step. When specified, the action will process only Steps until, and including, this one.
task* - (Only for type task) Name of the task to be performed. The task must be defined within the same Model Class.
Tasks (tasks
)
Info |
---|
Since version 11.0 |
When you need to run calculations regularly, but only once the model has been approved (i.e. locked for modifications), you can configure the list of available tasks, which could be scheduled.
Example of tasks definition:
Code Block | ||
---|---|---|
| ||
{
"tasks": [
{
"name" : "scheduled-task",
"label" : "Scheduled Task",
"type" : "post-approval-calculation",
"calculation": "scheduled-task"
}
]
} |
Each task has the following fields:
name* - Name of the task, unique in the Model Class
label* - Description of the task, visible to end-user on the model object Schedule page.
type* - What type of task is performed. Available options are
post-approval-calculation - for executing a Calculation after the Model Object has been approved. If the model is not yet approved, the task will be ignored.
calculation - (only for type post-approval-calculation) Reference to name of a Calculation defined in this Model Class.