Skip to main content
1-Visitor
February 21, 2017
Solved

Session parameters issue.

  • February 21, 2017
  • 2 replies
  • 5476 views

Hi. I got a problem with some session parameters that i'm sending to another mashup, the thing is , after I redirect from one mashup to another I have to refresh the page once more to get the updated parameters in the session. Does anyone know what could be the reason of this?

Thank You for your time.

    Best answer by PaiChung

    Please be aware that Setting a session value Server side doesn't show on the client side unless you 'refresh' the mashup.

    from your scenario it sounds like it should work properly, but to make sure you always have the most recent values, you can use GetGlobalSessionValues in the mashup.

    Something that I do, 1 service that fires and modifies the Session, but then on service invoke completes it retrieves the value from the session client side using the GetGlobalSessionValues and I bind from that service.

    This type of scenario prevents the usage of client side Session Value changed event though.

    2 replies

    20-Turquoise
    February 21, 2017

    Could you please provide the details on how your mashups are connected and how you are sending the parameter? I've just tested it in my system and did not need to refresh.

    My scenario:

    1. First mashup contains a textbox widget and a navigation widget:

         - textbox widget then feeds data to the session variable (of type String - for the textbox widget)

         - navigation widget opens a mashup 2 in a new window

    2. Second mashup contains a textbox widget that consumes data from the same session variable

    When viewing Mashup 1, I enter some value into the textbox , then navigate through the widget to Mashup 2. Mashup 2 shows the textbox with my session variable value.

    1-Visitor
    February 21, 2017

    Hi, Pollina.

    1) I have a combobox where i choose some options

    2) After i've chose the options i call a service which retrieve some information from another software and store that information in a session parameter.


    3) I use a navigation widget to navigate to the other mashup


    4) After the mashup is loaded I call a service to use the information of the session.

    20-Turquoise
    February 21, 2017

    For the step 4 -- is your service running on the "mashup loaded" event? When you load the mashup your session variable should already be set - as a test you may bind it to some display widget and see if it shows properly at runtime.

    1-Visitor
    February 22, 2017

    Hello Eddison,

    The solution to your problem is synchronization.

    For achieving this, you need to call the service before the redirect event  and set  the value returned by the service in the session parameter and and then link the redirect event (say 'navigate') with the "ServiceInvokeCompleted" event of that service(which is given for each service you register with a mashup).By this before you navigate to the new mashup you would always recieve the update session parameter value.

    Steps:-

    1. On select option event, call the service to retrieve the updated value. Set it in the session parameter.

    2. Link the "ServiceInvokeCompleted" of the service in step 1 to the navigation to other mashup.

    3. In the new mashup use the session parameter which will have updated value.