AIS Stack

An AIS Form Service Request is a contained and final process. The form’s initialise events are executed followed by Form Actions and finally close events. The benefit is a simple all-or-nothing process that either fails or succeeds. This works well for inquiry and singular updates like PO approvals for example. Either the queried data is available or not and the PO can be approved or not. One way to test the suitability of Form Service Request is to ask if the process can be completed in a single form. For example most inquiries require the user to open a Find and Browse form, fill in some filtering parameters and clicking find. A simple PO approval requires the user to open up the approval form with the order details and click approve or reject.

When the process involves more than one form, like processing a header before details can be added for example, the Form Service Request can be inefficient, cumbersome and in some cases impossible to use.

The Oracle documentation has a simple Application Stack Service example that demonstrates how AIS can retain the form’s state. This is more in line with how users interact with E1. The form stays open until its required actions are completed – or it times-out.

The process in the example starts by opening the Work With Addresses form, find records with Search Type ‘E’ and select one of the resulting rows. It’s similar to my previous PO List exercise, only the Find on Entry flag can’t be used because of the Search Type restriction. The only way to populate the grid is to enter Search Type and press the find button. Due to the find button’s asynchronous nature, it can’t be immediately followed by SelectRow. A second request is therefore needed which deems a Form Service Request insufficient.

Oracle’s example has 4 steps:

  1. Open P01012_W01012B form, set the Search Type to ‘E’ and press find.
  2. Select row 3.
  3. Update the Alpha Name in W01012A and press save.
  4. Close W01012A.

ais-shell-stack-form

The above example replicates the first two steps.

Step 1.

$ sfm -c step1 d fr -fn p01012_w01012b -rc 54|1[19,20] -mp 5
$ d fr fa 54 SetControlValue E
$ d fr fa 15 DoAction
$ o

The result of grid row 3:

$ r -k rowset -gr 3

Is 2049, McLind, Rod.

Step 2.

$ sfm -c step2 d sa -fo w01012b -rc 28
$ d sa fa 1.3 SelectRow       
$ d sa fa 14 DoAction
$ e

And the result dump:

$ r

Is now P01012_W01012A with control 28 showing McLind, Rod.

The final command:

$ c

Closes the form.

This may not be the most practical of solutions, but gives a good idea of the principle.

Open a form, Execute one or more actions and Close it.

The aisShell utility is still under development, so there is no executable available yet. To build it from the source code, please note that it requires Visual Studio 2017 (C# 7).