(Automatically adding template at the end of the page.) |
No edit summary |
||
Line 2: | Line 2: | ||
Reasons for delegating to the server might be that you want a single performer - the server. This is the case when assigning numbers that must be unique, for example. | Reasons for delegating to the server might be that you want a single performer - the server. This is the case when assigning numbers that must be unique, for example. | ||
[[File:2017-02-06 12h39 29.png|thumb]] | [[File:2017-02-06 12h39 29.png|thumb|none]] | ||
On the ViewModel Root class, choose the action "Edit criterias for server side execute". | On the ViewModel Root class, choose the action "Edit criterias for server side execute". You will then see a different colour green edit area to edit serverside execution. | ||
[[File:Serverside editing area.png|none|thumb|414x414px]] | |||
Now you can set: | Now you can set: | ||
{| class="wikitable" | |||
Interval | |+ | ||
! | |||
Serialized Blocking | ! | ||
|- | |||
Max Answers | |Interval | ||
|how often is this checked by the server | |||
Pre EAL | |- | ||
|Serialized Blocking | |||
|when true, the job should be small and quick - it is done within the main loop of server actions. If the job is long-running/slow it is better to leave it as FALSE so that the server responds to admin events faster (evolve, check checksum, etc) | |||
|- | |||
|Max Answers | |||
|The PS Ocl expression will return this many at most - -1 is unlimited. | |||
|- | |||
|Pre EAL | |||
|Action language that will be executed before PS-OCL. One example of usage is: | |||
You do not need anthhing here but a good example is if you want to limit on a Time: | |||
vYesterday:=DateTime.Today.AddDays(-1) -- vYesterday must be a ViewModel variable | vYesterday:=DateTime.Today.AddDays(-1) -- vYesterday must be a ViewModel variable | ||
PS OCL | You can also use this to set something in your model that changes an Access Group that enables this viewmodel to be processed serverside. | ||
|- | |||
Example: | |PS OCL | ||
[[File:2017-02-06 12h58 38.png|thumb|860x860px]] | |The expression the server will run every "Interval"-seconds, just after the Pre EAL has executed. The result from the expression should be a list of objects of the same class that your ViewModel root has. | ||
For each item in the result, a ViewModel will be created and it's actions will be executed in order from top to bottom. Any changed data will be automatically saved to the database. | |||
|} | |||
Example: [[File:2017-02-06 12h58 38.png|thumb|860x860px|none]] | |||
[[Category:MDriven Server]] | [[Category:MDriven Server]] | ||
[[Category:Actions]] | [[Category:Actions]] | ||
{{Edited|July|12|2024}} | {{Edited|July|12|2024}} |
Revision as of 19:57, 25 April 2024
ServerSide actions are used when you want to delegate work to a server.
Reasons for delegating to the server might be that you want a single performer - the server. This is the case when assigning numbers that must be unique, for example.
On the ViewModel Root class, choose the action "Edit criterias for server side execute". You will then see a different colour green edit area to edit serverside execution.
Now you can set:
Interval | how often is this checked by the server |
Serialized Blocking | when true, the job should be small and quick - it is done within the main loop of server actions. If the job is long-running/slow it is better to leave it as FALSE so that the server responds to admin events faster (evolve, check checksum, etc) |
Max Answers | The PS Ocl expression will return this many at most - -1 is unlimited. |
Pre EAL | Action language that will be executed before PS-OCL. One example of usage is:
You do not need anthhing here but a good example is if you want to limit on a Time: vYesterday:=DateTime.Today.AddDays(-1) -- vYesterday must be a ViewModel variable You can also use this to set something in your model that changes an Access Group that enables this viewmodel to be processed serverside. |
PS OCL | The expression the server will run every "Interval"-seconds, just after the Pre EAL has executed. The result from the expression should be a list of objects of the same class that your ViewModel root has.
For each item in the result, a ViewModel will be created and it's actions will be executed in order from top to bottom. Any changed data will be automatically saved to the database. |
Example: