Creating a workflow
You can create a workflow to update the model. Before creating a workflow, make sure that you have the service account credentials that are applied when executing the task. To acquire the service account, select User management > Manage > Service accounts and download the service account credentials.
- In ION, select Monitors & Workflows > Workflows.
- On the Overview page, click Add.
- Specify a name.
- Optionally, specify a description.
- To configure the AI task element, pull the ION API task block to the workflow diagram at the point where the task should be executed. You can apply one or multiple tasks into the flow.
- Click the ION API task block to configure the mandatory ION API Task properties by selecting the APIs.
- Click the ION API tab.
- Specify a name.
- Under Operation, click Select.
- From the Product list, select Infor Coleman AI Platform.
-
Search for the API that you want to configure. These APIs are available:
Option Description API Reload Datasets This action reloads data from Data Lake. /COLEMANAI/optimization/v1/quests/{name}/datasets/reloading Rerun Model This action runs the design quest. /COLEMANAI/optimization/v1/quests/{name}/training Update Production Quest This action updates the model from design to production and runs the production quest. /COLEMANAI/optimization/v1/quests/{name}/productionupdate Redeploy Endpoint This action deploys the endpoint with the latest model. /COLEMANAI/optimization/v1/quests/{name}/endpoint/redeploy Status This can be configured along with the above actions to get the respective statuses of the run – Success/Failed. Based on the statuses, the action for the next activity would be determined by the workflow. /COLEMANAI/optimization/v1/quests/{questname}/{statusQuery}/status - Click OK.
- Specify the API Gateway service account for the task execution by clicking Import and selecting the service account credentials file on the ION API tab.
- Click the Request Parameters tab.
- Specify the quest name in Value column by clicking the button in the cell.
- To check status activity, on the statusQuery row, specify the value as questStatus.
- Click the Request body tab.
-
Copy and paste this code into the tab:
{ "stepReference": "1", "dry": false }
This is not required for status activity configuration.
- Click the Output parameters tab.
-
Click the + icon and add these rows
to the top of the table:
Response Path Optional Workflow parameter Select Code Nil Nil Select Code Select Header Cache-control Nil Select Cache -
23. Add this row to the table as a placeholder for the Success/Failure status:
Response Path Optional Workflow parameter Body Status Nil status - Click Save.
- Click the Test tab.
- Execute a test which validates the configuration of the task, the quest name, and the service account.
- Click the Settings tab.
-
Specify how to handle errors by selecting one of these options:
Option Description Continue workflow without changing parameters Allows the workflow to continue to the next step in case of an execution error. The workflow fails Allows the workflow instance to fail in case of an execution error. This option is recommended. -
Add a new step to the workflow for each AI task
action. Repeat the process for every AI task
actions by adding a new ION API task block.
To have a complete orchestration of automatic model rerunning, you must use all four task types or actions for the same quest in this order:
- Reload Datasets to acquire the latest data from Data Lake.
- Apply Rerun Model to rerun the design quest including the latest data.
- Update the production quest.
- Redeploy the endpoint.
The workflow modeler allows you to use any number of ION API Task blocks. However, it does not validate the sequence of processes. Be attentive with step ordering and configuration. Make sure you apply the logic that is required for your use case.
- Save and activate the workflow.