Skip to Content

Persistent And Runtime Object References in Workflow

Have you heard about persistent and runtime references? What do they mean? Why do SAP requires both persistent and runtime reference? How do they affect the way we program the workflow? If you have these questions in your mind then you should continue reading this blog.   *What is persistent and runtime object references?*   In workflow runtime, BOR objects are represented by SWC_OBJECT variables. However, in order to save object references in the database and transport them beyond session limits, persistent object reference variables of the ABAP type SWOTOBJID are used.image  *Why do SAP requires both persistent and runtime reference?*   The workflow system stores object references in the container. These object references must be saved in the database whenever there is a context change (switch from one step to the next). This mechanism ensures the workflow can be restarted in case of server down or system crash using transaction SWPC. For this purpose, the workflow system converts the object references in the container from the runtime representation (blue areas) to the persistent representation (green areas) and back again, as required.image
You must be Logged on to comment or reply to a post.
    • Appreciate your comment. Persistence Profile. However for downward compatibility, SAP also stores container values in SWW_CONT and SWW_CONTOB.

      • Hi Chang,

        Thanks For replying..

        1 – I am OK with the first point which you made.

        2 – I am using SWW_WI_START_SIMPLE for triggering and its working fine without changing the container to persistent, but if I do then also it’s working fine. The differences I have observed in runtime are as following,

        If I will not convert container to persistent then the value which is exist into the container is the value of handler, which is generating while the execution of SWC_CREATE_OBJECT OBJECT ‘FORMABSENC’ Number.

        But if I convert then it’s replaced to concatenation of (Logical System Name, Object Type, and Object Key).

        But in both the cases it is triggering WF so how does it have making a difference?

        3- Can we check XML form of container, I mean XML persistence?

        Devraj Singh
        Patni Computer systems

        • Hi,

          2. Yes, you are right too. It looks like FM SWW_WI_START, the function module called inside FM SWW_WI_START_SIMPLE might have been enhanced by SAP to to handle this scenario. However, for programmed binding, it will not work without conversion.

          3. You can read the XML persistence using FM SAP_WAPI_READ_CONTAINER where one of the exporting value is XML persistent container.