0

I am correlating values in the response header (scope=headers) and printing the value twice in the script, but it shows different values in different places in the script: Here is the log:

Action.c(548): Notify: Parameter Substitution: parameter "treatmentsId" =  "172415" 
Action.c(548): Notify: Parameter Substitution: parameter "treatmentsId" =  "172415"
Action.c(548): web_submit_data("considertakingadump_2") was successful, 3792 body bytes, 242 header bytes, 12 chunking overhead bytes    [MsgId: MMSG-26385]
Action.c(559): Registering web_reg_save_param_ex was successful          [MsgId: MMSG-26390]
Action.c(567): Notify: Parameter Substitution: parameter "corrID1" =  "3"
Action.c(568): corrID1 first: 3
Action.c(570): Notify: Parameter Substitution: parameter "treatmentsId" =  "172415"
Action.c(570): Notify: Parameter Substitution: parameter "treatmentsId" =  "172415"
Action.c(570): Redirecting "http://b34aps012376.heyhay.com:8080/takeit/treatment/172415/considertakingadump?6-1.IFormSubmitListener-considertakingadumpListe-considertakingadumpRepeater-4-considertakingadumpListItem-vilkarHoved-innerPanel-vilkarVurdering-vilkarForm" (redirection depth is 0)       [MsgId: MMSG-26694]
Action.c(570): To location "http://b34aps012376.heyhay.com:8080/takeit/treatment/172415/considertakingadump"     [MsgId: MMSG-26693]
Action.c(570): Redirecting "http://b34aps012376.heyhay.com:8080/takeit/treatment/172415/considertakingadump" (redirection depth is 1)    [MsgId: MMSG-26694]
Action.c(570): To location "http://b34aps012376.heyhay.com:8080/takeit/treatment/172415/considertakingadump?10"          [MsgId: MMSG-26693]
Action.c(570): Notify: Saving Parameter "corrID1 = 10\r\nContent-Length: 0\r\n\r\nHTTP/1.1 200 OK\r\nServer: Apache-Coyote/1.1\r\nDate: Mon, 11 Mar 2013 12:41:33 GMT\r\nExpires: Thu, 01 Jan 1970 00:00:00 GMT\r\nPragma: no-cache\r\nCache-Control: no-cache, no-store\r\nContent-Type: text/html;charset=UTF-8\r\nTransfer-Encoding: chunked\r\n\r\n".
Action.c(570): web_submit_data("considertakingadump_3") was successful, 10004 body bytes, 838 header bytes, 20 chunking overhead bytes   [MsgId: MMSG-26385]
Action.c(583): Notify: Transaction "Huk av for oppfyllt vilkår" ended with "Pass" status (Duration: 0,6252 Wasted Time: 0,0056).
Action.c(585): Registering web_reg_save_param_ex was successful          [MsgId: MMSG-26390]
Action.c(595): Notify: Parameter Substitution: parameter "corrID1" =  "10\r\nContent-Length: 0\r\n\r\nHTTP/1.1 200 OK\r\nServer: Apache-Coyote/1.1\r\nDate: Mon, 11 Mar 2013 12:41:33 GMT\r\nExpires: Thu, 01 Jan 1970 00:00:00 GMT\r\nPragma: no-cache\r\nCache-Control: no-cache, no-store\r\nContent-Type: text/html;charset=UTF-8\r\nTransfer-Encoding: chunked\r\n\r\n"
Action.c(596): corrID1 second: 10
Action.c(599): Notify: Transaction "Neste etter avhuking" started.
Action.c(601): Notify: Parameter Substitution: parameter "treatmentsId" =  "172415"
Action.c(601): Notify: Parameter Substitution: parameter "corrID1" =  "10\r\nContent-Length: 0\r\n\r\nHTTP/1.1 200 OK\r\nServer: Apache-Coyote/1.1\r\nDate: Mon, 11 Mar 2013 12:41:33 GMT\r\nExpires: Thu, 01 Jan 1970 00:00:00 GMT\r\nPragma: no-cache\r\nCache-Control: no-cache, no-store\r\nContent-Type: text/html;charset=UTF-8\r\nTransfer-Encoding: chunked\r\n\r\n"
Action.c(601): Notify: Parameter Substitution: parameter "treatmentsId" =  "172415"
Action.c(601): Redirecting "http://b34aps012376.heyhay.com:8080/takeit/treatment/172415/considertakingadump?10Content-Length: 0HTTP/1.1 200 OKServer: Apache-Coyote/1.1Date: Mon, 11 Mar 2013 12:41:33 GMTExpires: Thu, 01 Jan 1970 00:00:00 GMTPragma: no-cacheCache-Control: no-cache, no-storeContent-Type: text/html;charset=UTF-8Transfer-Encoding: chunked-1.ILinkListener-neste" (redirection depth is 0)         [MsgId: MMSG-26694]
Action.c(601): To location "http://b34aps012376.heyhay.com:8080/takeit/treatment/172415/considertakingadump?11&10Content-Length:+0HTTP/1.1+200+OKServer:+Apache-Coyote/1.1Date:+Mon,+11+Mar+2013+12:41:33+GMTExpires:+Thu,+01+Jan+1970+00:00:00+GMTPragma:+no-cacheCache-Control:+no-cache,+no-storeContent-Type:+text/html%3Bcharset=UTF-8Transfer-Encoding:+chunked-1.ILinkListener-neste"     [MsgId: MMSG-26693]
Action.c(601): Notify: Saving Parameter "corrID2 = 11&10Content-Length:+0HTTP/1.1+200+OKServer:+Apache-Coyote/1.1Date:+Mon,+11+Mar+2013+12:41:33+GMTExpires:+Thu,+01+Jan+1970+00:00:00+GMTPragma:+no-cacheCache-Control:+no-cache,+no-storeContent-Type:+text/html%3Bcharset=UTF-8Transfer-Encoding:+chunked-1.ILinkListener-neste\r\nContent-Length: 0\r\n\r\nHTTP/1.1 200 OK\r\nServer: Apache-Coyote/1.1\r\nDate: Mon, 11 Mar 2013 12:41:33 GMT\r\nExpires: Thu, 01 Jan 1970 00:00:00 GMT\r\nPragma: no-cache\r\nCache-Control: no-cache, no-store\r\nContent-Type: text/html;charset=UTF-8\r\nTransfer-Encoding: chunked\r\n\r\n".

Action.c(601): web_url("Neste") was successful, 12429 body bytes, 811 header bytes, 21 chunking overhead bytes   [MsgId: MMSG-26385]
Action.c(610): Notify: Parameter Substitution: parameter "treatmentsId" =  "172415"
Action.c(610): web_url("Navigasjon_topp_4_viseforslagtiltakeit.png") was successful, 32914 body bytes, 230 header bytes          [MsgId: MMSG-26386]
Action.c(618): Notify: Transaction "Neste etter avhuking" ended with "Pass" status (Duration: 0,3079 Wasted Time: 0,0053).
Action.c(620): Registering web_reg_save_param_ex was successful          [MsgId: MMSG-26390]
Action.c(628): Notify: Transaction "Send til beslutning" started.
Action.c(630): Notify: Parameter Substitution: parameter "treatmentsId" =  "172415"
Action.c(630): Notify: Parameter Substitution: parameter "corrID2" =  "11&10Content-Length:+0HTTP/1.1+200+OKServer:+Apache-Coyote/1.1Date:+Mon,+11+Mar+2013+12:41:33+GMTExpires:+Thu,+01+Jan+1970+00:00:00+GMTPragma:+no-cacheCache-Control:+no-cache,+no-storeContent-Type:+text/html%3Bcharset=UTF-8Transfer-Encoding:+chunked-1.ILinkListener-neste\r\nContent-Length: 0\r\n\r\nHTTP/1.1 200 OK\r\nServer: Apache-Coyote/1.1\r\nDate: Mon, 11 Mar 2013 12:41:33 GMT\r\nExpires: Thu, 01 Jan 1970 00:00:00 GMT\r\nPragma: no-cache\r\nCache-Control: no-cache, no-store\r\nContent-Type: text/html;charset=UTF-8\r\nTransfer-Encoding: chunked\r\n\r\n"
Action.c(630): Notify: Parameter Substitution: parameter "treatmentsId" =  "172415"
Action.c(630): Redirecting "http://b34aps012376.heyhay.com:8080/takeit/treatment/172415/forslagtakeit?11&10Content-Length:+0HTTP/1.1+200+OKServer:+Apache-Coyote/1.1Date:+Mon,+11+Mar+2013+12:41:33+GMTExpires:+Thu,+01+Jan+1970+00:00:00+GMTPragma:+no-cacheCache-Control:+no-cache,+no-storeContent-Type:+text/html%3Bcharset=UTF-8Transfer-Encoding:+chunked-1.ILinkListener-nesteContent-Length: 0HTTP/1.1 200 OKServer: Apache-Coyote/1.1Date: Mon, 11 Mar 2013 12:41:33 GMTExpires: Thu, 01 Jan 1970 00:00:00 GMTPragma: no-cacheCache-Control: no-cache, no-storeContent-Type: text/html;charset=UTF-8Transfer-Encoding: chunked-1.ILinkListener-neste" (redirection depth is 0)          [MsgId: MMSG-26694]

Action.c(630): To location "http://b34aps012376.heyhay.com:8080/takeit/treatment/172415/forslagtakeit?10Content-Length:+0HTTP/1.1+200+OKServer:+Apache-Coyote/1.1Date:+Mon,+11+Mar+2013+12:41:33+GMTExpires:+Thu,+01+Jan+1970+00:00:00+GMTPragma:+no-cacheCache-Control:+no-cache,+no-storeContent-Type:+text/html%3Bcharset=UTF-8Transfer-Encoding:+chunked-1.ILinkListener-nesteContent-Length:+0HTTP/1.1+200+OKServer:+Apache-Coyote/1.1Date:+Mon,+11+Mar+2013+12:41:33+GMTExpires:+Thu,+01+Jan+1970+00:00:00+GMTPragma:+no-cacheCache-Control:+no-cache,+no-storeContent-Type:+text/html%3Bcharset"          [MsgId: MMSG-26693]

Action.c(630): Redirecting "http://b34aps012376.heyhay.com:8080/takeit/treatment/172415/forslagtakeit?10Content-Length:+0HTTP/1.1+200+OKServer:+Apache-Coyote/1.1Date:+Mon,+11+Mar+2013+12:41:33+GMTExpires:+Thu,+01+Jan+1970+00:00:00+GMTPragma:+no-cacheCache-Control:+no-cache,+no-storeContent-Type:+text/html%3Bcharset=UTF-8Transfer-Encoding:+chunked-1.ILinkListener-nesteContent-Length:+0HTTP/1.1+200+OKServer:+Apache-Coyote/1.1Date:+Mon,+11+Mar+2013+12:41:33+GMTExpires:+Thu,+01+Jan+1970+00:00:00+GMTPragma:+no-cacheCache-Control:+no-cache,+no-storeContent-Type:+text/html%3Bcharset" (redirection depth is 1)         [MsgId: MMSG-26694]

Action.c(630): To location "http://b34aps012376.heyhay.com:8080/takeit/treatment/172415/forslagtakeit?12&10Content-Length:+0HTTP/1.1+200+OKServer:+Apache-Coyote/1.1Date:+Mon,+11+Mar+2013+12:41:33+GMTExpires:+Thu,+01+Jan+1970+00:00:00+GMTPragma:+no-cacheCache-Control:+no-cache,+no-storeContent-Type:+text/html%3Bcharset=UTF-8Transfer-Encoding:+chunked-1.ILinkListener-nesteContent-Length:+0HTTP/1.1+200+OKServer:+Apache-Coyote/1.1Date:+Mon,+11+Mar+2013+12:41:33+GMTExpires:+Thu,+01+Jan+1970+00:00:00+GMTPragma:+no-cacheCache-Control:+no-cache,+no-storeContent-Type:+text/html%3Bcharset"       [MsgId: MMSG-26693]

Action.c(630): Notify: Saving Parameter "corrID3 = 12&10Content-Length:+0HTTP/1.1+200+OKServer:+Apache-Coyote/1.1Date:+Mon,+11+Mar+2013+12:41:33+GMTExpires:+Thu,+01+Jan+1970+00:00:00+GMTPragma:+no-cacheCache-Control:+no-cache,+no-storeContent-Type:+text/html%3Bcharset=UTF-8Transfer-Encoding:+chunked-1.ILinkListener-nesteContent-Length:+0HTTP/1.1+200+OKServer:+Apache-Coyote/1.1Date:+Mon,+11+Mar+2013+12:41:33+GMTExpires:+Thu,+01+Jan+1970+00:00:00+GMTPragma:+no-cacheCache-Control:+no-cache,+no-storeContent-Type:+text/html%3Bcharset\r\nContent-Length: 0\r\n\r\nHTTP/1.1 200 OK\r\nServer: Apache-Coyote/1.1\r\nDate: Mon, 11 Mar 2013 12:41:34 GMT\r\nExpires: Thu, 01 Jan 1970 00:00:00 GMT\r\nPragma: no-cache\r\nCache-Control: no-cache, no-store\r\nContent-Type: text/html;charset=UTF-8\r\nTransfer-Encoding: chunked\r\n\r\n".
Action.c(630): web_url("Send til beslutning") was successful, 14273 body bytes, 1800 header bytes, 21 chunking overhead bytes    [MsgId: MMSG-26385]
Action.c(639): Notify: Parameter Substitution: parameter "treatmentsId" =  "172415"
Action.c(639): web_url("Navigasjon_topp_5_fattetakeit.png") was successful, 32305 body bytes, 230 header bytes   [MsgId: MMSG-26386]
Action.c(647): Notify: Transaction "Send til beslutning" ended with "Pass" status (Duration: 0,4477 Wasted Time: 0,0047).
Action.c(649): Registering web_reg_save_param_ex was successful          [MsgId: MMSG-26390]
Action.c(659): Notify: Transaction "huk av for at valgte er godkjent" started.

And here is the script:

web_submit_data("considertakingadump_2",                     "Action=http://b34aps012376.heyhay.com:8080/takeit/treatment/{treatmentsId}/considertakingadump?6-1.IBehaviorListener.0-considertakingadumpListe-considertakingadumpRepeater-4-considertakingadumpListItem-vilkarHoved-innerPanel-vilkarVurdering-vilkarForm-vilkarsregelValg",
            "Method=POST", 
                "RecContentType=text/xml",             

"Referer=http://b34aps012376.heyhay.com:8080/takeit/treatment/{treatmentsId}/considertakingadump?5", 

                "Snapshot=t57.inf", 

            "Mode=HTTP", 
            ITEMDATA, 
            "Name=vilkarsregelValg", "Value=OPPFYLT", ENDITEM, 
            LAST);


    web_reg_save_param_ex( 
            "ParamName=corrID1",
            "LB=considertakingadump?",        
            "RB=",
            SEARCH_FILTERS,
            "Scope=Headers",
            LAST);

    buffer1 = atoi(lr_eval_string("{corrID1}"));

    lr_output_message("corrID1 first: %d", buffer1);

    web_submit_data("considertakingadump_3", 

            "Action=http://b34aps012376.heyhay.com:8080/takeit/treatment/{treatmentsId}/considertakingadump?6-1.IFormSubmitListener-considertakingadumpListe-considertakingadumpRepeater-4-considertakingadumpListItem-vilkarHoved-innerPanel-vilkarVurdering-vilkarForm",

            "Method=POST", 
            "RecContentType=text/html",             "Referer=http://b34aps012376.heyhay.com:8080/takeit/treatment/{treatmentsId}/considertakingadump?5", 
            "Snapshot=t58.inf", 
            "Mode=HTTP", 

            ITEMDATA, 
            "Name=vilkarForm48_hf_0", "Value=", ENDITEM, 
            "Name=vilkarsregelValg", "Value=OPPFYLT", ENDITEM, 
            "Name=resultat.tilleggsbegrunnelse", "Value=", ENDITEM, 
            LAST);

    lr_end_transaction("Huk av for oppfyllt vilkår",LR_AUTO); 

    web_reg_save_param_ex(
            "ParamName=corrID2",
            "LB=considertakingadump?",
            "RB=",
            SEARCH_FILTERS,
            "Scope=Headers",
            LAST);

    //skriver ut variablen corrID1 rett før den brukes i en web_url
    buffer1 = atoi(lr_eval_string("{corrID1}"));

    lr_output_message("corrID1 second: %d", buffer1);

    lr_start_transaction("Neste etter avhuking");

    web_url("Neste",                "URL=http://b34aps012376.heyhay.com:8080/takeit/treatment/{treatmentsId}/considertakingadump?{corrID1}-1.ILinkListener-neste", 

            "Resource=0", 
            "RecContentType=text/html",               "Referer=http://b34aps012376.heyhay.com:8080/takeit/treatment/{treatmentsId}/considertakingadump?7", 
            "Snapshot=t59.inf", 
            "Mode=HTTP", 
            LAST);

Isn't that strange?

Koby Douek
  • 16,156
  • 19
  • 74
  • 103
Magnus Jensen
  • 905
  • 6
  • 36
  • 73
  • it appears that the 'corrID1 above changes its value when the script continous to execute and reffering the parameter further below actually results in it being another value, but it Works in that Scope. Strange... – Magnus Jensen Mar 11 '13 at 19:57

1 Answers1

1

Going by your output log it looks like the parameter corrID1 already exists with a value of "3" before the first POST you have mentioned in your code and then you call it again for the subsequent call which populates the same parameter with a new value. Are you sure you're not calling web_reg_save_param_ex for corrID1 earlier in the script?

Nathan
  • 341
  • 1
  • 4