Hi Everyone,
I would like to share a few examples demonstrating how almost anything is possible with “MI Script”. MI Script is a powerful feature of Apriso MI but several use cases are less explored, some of these are not the commonly used ones but it’s worth knowing the far reaches of the product. Through this series of posts, I will try to browse through some of them.
Here is the list of what to expect from this series:
- How to execute “Business Components” directly through MI Script
- I have also included the execution of a SQL “select” statement via MI Script
- How to execute “Stored Procedures” directly through MI Script
- How to create a custom assembly (.dll) and use it in MI Script
- How to create a custom assembly (.dll), which in-turn is referencing several others, and then use that assembly in the MI Script
- It includes integration of Apriso with an open source database, PostgreSQL
As part of the 1st post i.e. BC execution via MI Script, we are going to do the following:
- Execution of BC – “CheckEmployeeRole” via MI Script
- This BC has 2 inputs, EmployeeID and Role
- We will get “EmployeeID” by querying the “Employee” table in MI Script itself
- And the “Role” field will be passed as a hard coded value (“Production Supervisor” in this case)
- This BC has 2 inputs, EmployeeID and Role
- “EmployeeNo” to the above query (in the “where” clause) will be passed as a user input
- In this case, we will provide it from an OPC client
- Eventually, we will set the output of the BC to an OPC tag
- “HasRole” tag value, 0 or 1, will tell us whether the user has the specified role or not
Please see the attached video against the 1st post.
