cancel
Showing results for 
Search instead for 
Did you mean: 

HTML Loader & Scheduled Transactions

Former Member
0 Kudos

Hi Experts,

Clearly I'm missing something, but can't figure out what. Perhaps someone can help me...

Am using 12.0.7. To simulate my actual problem, I created a simple stub transaction with 2 action blocks: an HTML Loader action block that loads a report from the server and outputs resulting HTML file to a data file.

If I run this from the inside the Workbench I get an HTML file as expected.

But, if I create a schedule that executes this same transaction, the HTML file returned is BLANK (as in stringlength(StringContent) = 0).

Can anybody offer any insights? Is this a security-related thing?

Thanks in advance,

Dave

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I had faced a similar issue with http post action.

The thing is that the Loader action needs a authentication method, When the txn is run in the workbench it will fetch the file because your user already has a valid web session active. But when it is run through sceduler it will not have a valid session, so if you configure authentication via credential alias it will work.

This worked for me.

Thanks,

Obu

Former Member
0 Kudos

Jeremy: I'm calling the following URL:

server://logon/logonServlet?redirectURL=/XMII/Illuminator?%3FReportType%3D1%26QueryTemplate..........text%2Fhtml&j_user=<myUsername>&j_password=<myPassword>

where myUsername and myPassword are hardcoded temporarily. I've tried adding credentials to the HTML Loader action. As far as I can tell, I'm performing all of the authentication best that I can. Does the "server://" switch lose context when run in this manner? As I mentioned, the TRX works fine when I run it through the Workbench, so the URL syntax is valid at least in that context.

Obu: I'm using 12.0, not sure that I can create a credential alias (like 12.1?). Or if I did then how would i apply it to the schedule or the action block in the TRX. Can you explain?

Thanks again!

Dave

Former Member
0 Kudos

I haven't dealt with it in a while but the last time I did 'server://' would not work in scheduled transaction.

Former Member
0 Kudos

HI,

In 12.0 there is no credential alias, you can try by giving the Username and Password in the configuration of HTML loader action itself.

And as mentioned by Christian try by giving the full server address instead of server:// , this does not work sometimes.

Regards,

Obu

Former Member
0 Kudos

Yeah, thanks Christian. Sure enough, the "server://" didn't work via a scheduled transaction.

I guess that it results for me to create a Global Transaction Variable to store the LOCAL server/port then call that dynamically in the scheduled transaction. This seems a little clunky, since I'll need to EITHER change this Global Variable as part of the promotion (DEV -> QA -> PROD) OR include the server as an input parameter to the transaction to be called from the scheduler. How did you resolve this?

Thanks again.

jcgood25
Active Contributor
0 Kudos

It sounds like you're on the right track. I think the reason the server:// prefix doesn't work is that when running the scheduled job it doesn't have the http(s) session to determine server port like it does when you run from the WB. Not that unlike the credential/session issue.

If the NW server port configurations are consistent within the customer landscape you may be able to simply use http://localhost:port since localhost will resolve on the fixed port (just no free security pass like older versions with trusted servers).

Former Member
0 Kudos

Thanks for the help. I created a transaction variable for the host and port (multiple instances are running on different ports on the same host) and pass that into the transaction and it works OK. Just need to pass this parameter via the scheduler.

jcgood25
Active Contributor
0 Kudos

The WB has a user session, whereas the Scheduled job does not.

Do you have a user / pwd combination in the Scheduled job (like a Run As account)?

Any way to make the loader request with authorization?

Former Member
0 Kudos

Hi Jeremy,

Yes, I do have a "run as" user in the Schedule, but it doesn't seem to make much difference in my case.

Not sure what you mean by "make the loader request authorization". How do I do that? I tried adding a Username and Password transaction variables (in addition to having the scheduler user) and pass those from the scheduler parameters through into the Loader authorization, but that doesn't seem to make a difference either.

I'm kind of stuck at this point. Any further thoughts will be much appreciated.

Dave

jcgood25
Active Contributor
0 Kudos

What is the HTMLLoader URL you are calling? (I was implying that if you could pass credentials in the request made by the HTMLLoader action then it also might work).