cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Personas Snapshot Mode Documentation?

eedens
Participant
0 Kudos
689

Is there documentation on using Snapshot Mode from SP14? I've found the demo video, but can't really find anything else. I'm trying to find if snapshot mode can be used with RFC's as a bulk send option.

View Entire Topic

Hello,

1) About documentation: you can refer to built-in Scripting API documentation to find out about Snapshot Mode. In order to see built-in documentation:

Step 1: Open Personas UI through pressing 'P' button on top of your screen.

Step 2: Locate 'Show Help' dropdown button on top right corner of Personas UI and press it.

Step 3: Press 'Scripting API Documentation' option in dropdown under 'Show Help' button.

However you might notice that it is not that much written about Snapshot Mode there, only basic things, no use-case example or anything - just raw documentation entries.

[Note]: Snapshot mode is only available in Slipstream Engine. You will not find anything about Snapshot Mode if you open documentation when accessing it NOT from Slipstream Engine, but from WebGUI(SAP GUI FOR HTML) for example.

2) Now about Snapshot Mode itself.

Snapshot mode does not support RFC and you cannot use it to send multiple RFCs in single request.

While it is not directly mentioned in documentation (as documentation in general describes what feature CAN do and not what it CANNOT do, you can still make this conclusion based on what is written there. I am including as attachment related entries from documentation.

So, based on description of available methods for working with snapshot mode:

session.utils.startSnapshotMode, session.utils.stopSnapshotMode and session.utils.takeSnapshot,

it is clear that:

  • First goes session.utils.startSnapshotMode, which sets script execution to some so-called 'snapshot mode', and in that mode you get some limitations, e.g. you cannot READ values, only WRITE.
  • At the end there MUST be called session.utils.stopSnapshotMode which sets script execution back to normal mode AND performs some 'synchronization' with back-end which was disabled by use of startSnapshotMode method.
  • And last but not least - session.utils.takeSnapshot, which can only be used while so-called 'snapshot mode' is active, which means - in the middle between session.utils.startSnapshotMode and session.utils.stopSnapshotMode and this takeSnapshot method RETURNS some kind of 'GuiSnapshot' object, which as we can get from same documentation is representation of state of application in past and has only two methods available: findById and idExists, where findById returns normal scripting object, but with limitation: only for READING values (as this is just part of snapshot of state of application in past).

Main purpose and usage of snapshot mode is possibility to improve from performance point of view (by decreasing number of network requests) such thinks like:

a) scrolling through table to reading all rows (for tables with back-end scroll only available)

b) navigating through multiple screens/transaction and collecting data from all of them in single request

As you might see this snapshot mode works as special mode for modifying standard system lifecycle and allowing to skip application state sync between browser and server, but still get all the states between actions which were performed while synchronization was disabled.

And as RFCs are not part of standard application lifecycle, they are not supported by snapshot mode by design. RFC (Remote Function Call) is call of external function from standard application point of view and its result is not part of application state and cannot be represented in GuiSnapshot according to Scripting API documentation.

3) And now comments from me. Probably, for full in-depth understanding of need and value of such thing as snapshot mode, you might need to know that according to architecture pattern that is used there things work as follows:

3.1) Actual application is running on server-side.

3.2) Client (in your case, presumably, Slipstream Engine) only has two purposes:

3.2.1) visualize application state for user

3.2.2) handle user interaction and forward it to real application on server-side

3.3) Personas Scripting Engine allows to automate user interaction and is executed in browser (on client-side) and therefore require regular synchronization with back-end to get actual state of application to read values and use them in further parts of script.

3.4) Snapshot mode allows to adjust script and collect bunch of application state snapshots in single request for reading from them afterwards.

Hope this helps.

Best Regards,

Oskars.

eedens
Participant
0 Kudos

Great answer, I really appreciate how in-depth you went! Bummer that it won't work for my initial use case, but I think I may be able to apply it somewhere else.