Record Processing (Magic xpa 3.x)
After the Task Prefix is executed, the data view records are processed as follows:
-
The first record in the data view is located and fetched.
Note: In Online and interactive Rich Client tasks, If there are no records in the data view, the task can either terminate or go into Create mode.
It can also display a screen without input.
This behavior is governed by the task properties called Allow Empty Dataview and Allow Create.
-
The Init expression is evaluated for all of the Virtual variables. The Init expressions for columns are evaluated only if the task is in Create mode.
-
All of the links to data sources are executed for all records displayed on the screen.
-
If the Evaluate condition option in the Task Properties is set to Before entering record, Magic xpa evaluates the End Task condition.
-
The Record Loop begins here. Therefore, from here on you can manipulate data source columns.
-
The Record Prefix logic unit operations are executed.
For each record, in interactive tasks, the accessed controls logic units are executed. The end user can access a control using the keyboard keys (Tab or Shift+Tab), or by clicking on the control using the mouse.
-
Control Prefix – For each control which is accessed by the end user, the Control Prefix logic unit operations are executed.
-
Control Verification – The Control Verification operations are executed whenever the end user moves from the control that the Control Verification logic unit is set for, or the control is skipped over (Fast mode). A control is skipped over in Fast mode when the end user skips over this control to get to a different control or a different record. In Rich Client tasks, the Control Verification logic unit is executed even if the value is not changed.
-
Control Suffix – The Control Suffix is performed whenever the insertion point is taken away from the control. This occurs when the end user moves to a different control, exits the record, or exits the task.
In Online tasks and Rich Client tasks, the Variable Change logic units are executed whenever a variable value is changed.
In Online, Rich Client and Browser tasks, the Record Suffix logic unit is executed for records that were modified.
In Batch tasks, the Record Suffix is always executed.
In Online, Rich Client and Browser tasks, the Record Suffix logic unit is executed when the end-user interaction with a record is terminated. This happens when:
-
The end user moves to another record using either the keyboard or the mouse.
-
The end user changes the Task mode (Modify, Create, Query) from the Options menu. The Options menu is not available for Rich Client tasks.
-
The end user deletes the record.
-
The task execution is terminated, such as a result of end-user interaction or if an End Task condition evaluates to True.
When Magic xpa terminates the task, the Record Loop must be terminated first.
Only if the record was modified, the record is saved and the record's Record Suffix logic unit is executed. If the record is not modified, neither of these steps happen.
The next step is Task Termination.
Note:
|
In Rich Client tasks, every time there is an access to the server, the server needs to reposition itself on the current data view record (since the server does not know if the user moved between the records). When this happens, the server once again accesses the cache/database to retrieve the current record and to reevaluate the links.
Virtual Variables
In Online tasks, when updating a virtual in a table, only the current record is updated with the new value.
In Rich Client tasks, all of the records are updated with the new value. This behavior is only relevant when there is no init value set for the virtual. If there is an init value, then the init value will be displayed for all of the other records.
In the following example, AAA is a virtual that is updated in the Record Prefix logic unit. Notice that in the Online task, only the record that we are currently parked on is updated.
|