Problem with Automated Study Reload

LabKey Support Forum (Inactive)
Problem with Automated Study Reload jdutra  2013-06-13 13:55
Status: Closed
 
With some guidance from the labkey folks at last fall's user conference, I have been able to automate a number of tasks by sending POST requests to the correct labkey URLs. Between version 12.3 and 13.1, one of them stopped working and I can't figure out what I'm doing wrong. I'm hoping maybe you could give me some input.

I have a study set to manually reload, and I'm trying to trigger the reload from Java code by sending a POST to /labkey/study/MyProject/MyFolder/MyStudy/checkForReload.view?ui=0. Instead of triggering a reload, this now changes my study reload setting. It is set to manual before my code runs, and afterwards it's set to not reload. The reload pipeline is not triggered at all.

The request returns the following response:
HTTP/1.1 302 Found
Response content is: "'>--></script><script type="text/javascript">window.location = '/labkey/study/MyProject/MyFolder/MyStudy/manageStudy.view?';</script>

We can see that the ReloadTask code changed quite a bit between 12.3 and 13.1, but the url called by manually pressing the "Attempt Reload Now" button has not changed - it is still /labkey/study/MyProject/MyFolder/MyStudy/checkForReload.view?ui=1.

If anyone could help me to get this code working again, I'd really appreciate it.

Thanks,
Jen
 
 
jeckels responded:  2013-06-20 14:21
Hi Jen,

Can you try using a GET request instead of a POST? I didn't check extensively for what might have changed in the code, but it looks like it's expecting a GET for this kind of request now.

Thanks,
Josh
 
jdutra responded:  2013-06-21 06:30
Wow, that was an easy fix, and it works now. Thanks!