AI – Execute Computer Logic

AI in the Otter Studio provides a means to execute services defined in Necessity. The studio presents two windows for AI. The left window shows socket and plug components and their service references for the selected domains. Sockets access local services where plugs access remote services.

Both windows have options to define the color scheme and the graph direction. All graphs are dynamically drawn by GraphViz.

In the “Domain Sockets & Plugs” window, one or more domains may be selected to show the domain components. Components are presented in the Service Component Architecture format. The service request data graph of a selected service reference in this window is shown in the “Class Expression” window.

The following shows an example of these options from the Pizza Stores Demo for the “PizzaStoresSCA” domain.

Domain Selection

The “PizzaStoresSCA” domain is selected showing the socket and plug components and their service references.

Service Reference Selection

Selecting a service reference from the left window will show in the right window the service request as a graph. In this example, the “refOrderFromMenu” service reference has been selected.

Service Request Values

After selecting a service reference, the service request graph can be edited to include specific values. In this example, each of the data property values has been updated to specify the store, customer type, and type of pizza.

Send Service Request

Clicking on “send” will send the request to the server to execute the “refOrderFromMenu” service. The service response will be presented in another window in the form of the service response graph. The response shows the menu item number, the pizza type, the quantity ordered, the price, and the financial account credited for the sale.