Running Jobs

I have several groups developing Data Integrator jobs. While during dev they are in their own repository, once they move to integration or production they are in one. The problem is that some of the jobs for the various areas require manual running. The process is that their teams have on call rotations. When a person gets a page (as they are on call) they need to be able to run the particular job. I would like to be able to present to the different areas somehow a list of their own jobs on the server and a way to run them ad hoc, without opening up the whole system to them and them being able to see all the jobs. Also, not all of the on call persons have DI Designer, so I need a way to excute the jobs w/o them needing Designer. I thought a web service (via DI Web Admin) would be nice, but I don’t have a clue really as to where to start there. Other than that I thought of creating individual batch jobs, but it would be nice to give them a little more nicer interface than a folder with some batch jobs.

Thoughts?


jschuhdodge :us: (BOB member since 2005-03-18)

How about using the “execute” link available in the web administrator?

http://localhost:28080/admin/servlet/AwExecuteBatchJob?REPOSITORY_NAME=RepoName&PROJECT=ProjectName&NAME=JobName&GUID=JobGuid

The GUID for each job is available in the AL_LANG table.

You should be able to build a simple ASP/JSP page displaying links to execute your jobs.

Nicolas


Nicolas Hadj-Blaha :new_zealand: (BOB member since 2005-03-10)

Username/Password can be provided as well in the link - not to lookup the exact parameter names.

Did I get it right, on an external event you want people to perform a rather lightweight job or even better, one dataflow?

This sould like Realtime to me! So I would setup a webpage in either ASP or JSP, use the MessageClient library for COM (ASP) or Java (in JSP) to send a XML string to the realtime service - even if that string is nothing else than a “run now” message, process the data and return anything, like an okay message.

The advantage would be that you are in total control and you can even provide input&output parameters…

Would that be an option?


Werner Daehn :de: (BOB member since 2004-12-17)

These are batch jobs that would be running. I will give nicolas’s suggestion a try as I think I would be able to do what I want that way… Thanks though for your suggestions. I will definately file it away for future use. Thanks again!


jschuhdodge :us: (BOB member since 2005-03-18)

Well, I tried:

http://localhost:28080/admin/servlet/AwExecuteBatchJob?REPOSITORY_NAME=RepoName&PROJECT=ProjectName&NAME=JobName&GUID=JobGuid

(passing in the values I needed of course) and was hopeful. It didn’t work. It went to the signin.jsp page and gave an authentication error. If I log in to Web Admin first, then try it, it brings me to the execute page. So we are close. Wdaehn - you mentioned you can pass username and password. How?

Thanks!


jschuhdodge :us: (BOB member since 2005-03-18)

If you look at the logonform.jsp, you will find the parameters:

USERNAME
PASSWORD
and
REPONAME

so change the link to
…GUID=wgfwr&USERNAME=myuser&PASSWORD=Idonttell&REPONAME=prod


Werner Daehn :de: (BOB member since 2004-12-17)

Do not forget that you need to uuencode it first … so spaces become %20 etc.


TRS-80 :belgium: (BOB member since 2005-03-29)

Ok. I tried that and I still get an error. Is comes back with an error:

BODI-3016160: Login Failed: Invalid session.

I noticed that I have to repo params. REPONAME and REPOSITORY_NAME. Which should I use? For username and password, am I supplying the repository username and password or the web admin username and password. I tried varying combinations with no luck. Has any of you got this actually working?

Thanks!


jschuhdodge :us: (BOB member since 2005-03-18)

Hi

Hope this manual’s example might help you…

Bye

’ Instantiate the Message Client COM object
dim ActaConn
set ActaConn = Server.CreateObject(“ActaClient.ActaConnection”)
’ Clear any previous errors and connect to Access Server.
’ The parameters are machine, port, user, password
Err.clear
ActaConn.connect “electron”, 4000, “user”, “password”
if Err.Number <> 0 then
Response.write("

The connect method returned the following
error: " &Err.Description&"

")
else
Response.write("

The connect method succeeded.

")
’ Clear errors and invoke the service needed, pass
’ service name, XML input data as parameters
Err.clear
ActaConn.invoke “test1”, file_content
if Err.Number <> 0 then
Response.write("

the invoke method returned the following
error:
" &Err.Description&"

")
else
Response.write("

The invoke method succeeded

")
’ Get the return value
dim outData
outData = ActaConn.returnValue
Response.write("
"&outData&"
")
end if
end if

RajPatel (BOB member since 2005-05-19)

The example you give is used to initiate the Message COM Object for Access Server. This bit of code is for Real-Time Jobs. Whereas I am looking to be able to run Batch Jobs.

Thanks though!


jschuhdodge :us: (BOB member since 2005-03-18)

My mistake, I was looking at Metadata Reports, not WebAdmin. I’ll check.


Werner Daehn :de: (BOB member since 2004-12-17)

It seems the WebAdmin does not do a redirect. To login you have to use the link

http://localhost:28080/admin/servlet/AwLogon?USERNAME=admin&amp;PASSWORD=admin

With this you get a session assigned, next you can use Nicolas link.


I modified the AwLogon.class Servlet so that an additional parameter PAGETO is supported, like

http://localhost:28080/admin/servlet/AwLogon?USERNAME=admin&amp;PASSWORD=admin&amp;PAGETO=AwJobConfiguration

PAGETO can be any link, just make sure it is encoded correctly, so no “&” or “?” directly but with the ascii code %xx.

In order to get the new AwLogon.class be used, you have to stop the DI Webservice and replace the existing file in the “\Data Integrator\ext\webserver\webapps\acta_web_admin\WEB-INF\lib\web_admin.jar”. Make a backup of the original jar file before but don’t let the extension be *.jar!!! You can use winzip for this, or adjust belows script with your path if needed

------------------unzip the attachement into c:\temp
cd c:\temp
mkdir com
mkdir com\acta
mkdir com\acta\webapp
mkdir com\acta\webapp\admin
mkdir com\acta\webapp\admin\servlet\

copy c:\temp\AwLogon.class com\acta\webapp\admin\servlet\

“C:\Program Files\Business Objects\Data Integrator\ext\bin\jar” -uf “C:\Program Files\Business Objects\Data Integrator\ext\webserver\webapps\acta_web_admin\WEB-INF\lib\web_admin.jar” com/acta/webapp/admin/servlet/AwLogon.class

EDIT!!!
please copy the signin.jsp page into the jsp folder of webadmin so that this PAGETO parameter is submitted only if there is one set actually. Without, you are redirected to the webpage “null” in case you did not specify a PAGETO value explicitly.

I’ll make sure this fix makes it into the official codeline. btw, this does work with DI11, but should work with the entire 6.5 and 6.1 codeline.
AwLogon.zip (2.0 KB)
signin.zip (1.0 KB)


Werner Daehn :de: (BOB member since 2004-12-17)

So if I did what you described, would that mean I could combined your link with the PAGETO param and add the the AWExecuteBatchJob as the PAGETO param value and add the params for that? So I would have the following:

http://localhost:28080/admin/servlet/AwLogon?USERNAME=admin&PASSWORD=admin&PAGETO=AwExecuteBatchJob&REPOSITORY_NAME=RepoName&PROJECT=ProjectName&NAME=JobName&GUID=JobGuid

Obviously I would be filling in the correct params with real values and also url encoding this. But, is this something at should work? Another question on that, with the PAGETO param, could I then go to a different page (one I write) that provides the links necessary to execute using Nicolas’ link?

Thanks!


jschuhdodge :us: (BOB member since 2005-03-18)

I thought DI XI allowed much more granular security – wouldn’t it be possible to restrict a user to run only certain jobs?


dnewton :us: (BOB member since 2004-01-30)

I don’t think it does at the job level. The granularity of security appears to be evident in a secure central repository. I spoke with a tech person at BO and they verified that this type of granularity is not in DI XI. They went on to go ahead and add it as an enhancement for me. So, maybe someday we will get there…

I still need to try my previous post to see if it works.

Thanks!


jschuhdodge :us: (BOB member since 2005-03-18)

encode it, as you said and it will work.

Yes, that’s another option. So after successful login, you would PAGETO a JSP page (inside this webapp directory …\DI\ext..\webapps\web_admin\jsp..) of your own, check with (req.getSession(false) != null) if the user is logged in, add your own checks and provide a list of links, this time directly the kind of Niclas links as you are authenticated already. Regarding how the read the user currently logged in - so you can add your own checks - I have to look again.

We did add object level security for the Designer in DI 11 for the central repo, this security for webadmin is on the list - but not too soon.


Werner Daehn :de: (BOB member since 2004-12-17)

wdaehn-

I tried what you described for adding the class file to the web_admin.jar. That works! :smiley:

However, when I try and run my web admin normally, I get the following error once I log in with admin/admin. :cry:

Apache Tomcat/4.0.6 - HTTP Status 404 - /admin/servlet/null

type Status report

message /admin/servlet/null

description The requested resource (/admin/servlet/null) is not available.

Any ideas?


jschuhdodge :us: (BOB member since 2005-03-18)

wdaehn-

One other note. I thought maybe I goofed with the Jar command, so I put the old file back in the temp dir and ran the command again and after bringing the service back up it worked again. So I am wondering if there is something wrong or missing in the class file you sent. I know you can necessarily open and view class files, but I opened them both in textpad and they appear to be different in the actual text I did see… not that this means anything… but just thought I would throw out there…

Thanks!


jschuhdodge :us: (BOB member since 2005-03-18)

looks to me as if you did everything right, but the PAGETO parameter is empty. Is this possible??


Werner Daehn :de: (BOB member since 2004-12-17)

What do you mean the PAGETO is param is empty? As I said I did what you said and when I tested the PAGETO thing it worked great! I just passed everything in an encoded url and no probs. However, when I launch web admin under normal circumstances via start>programs>bo>etc., the page comes up and I log in with the correct username and password. Then click submit and that is where I get the error…

So any ideas? :confused:


jschuhdodge :us: (BOB member since 2005-03-18)