Jump to content

We recently upgraded from 8203 to 8207, and I have been chal...


Recommended Posts

Posted

We recently upgraded from 8203 to 8207, and I have been challenged with finding a way to schedule a change management export.

I know its possible to use WebFOCUS REST to export a CM package. I just dont know how to put the calls together. Id like to make the rest call a focexec, so I can schedule it in ReportCaster.

Do you have a code example you can share

Posted
The WebFOCUS security and administration manual has a chapter on change management including how to run the command line export/import and all the parameters required. You could then set up a fex using an OS command to run that bat file with all the parameters and schedule it with ReportCaster
Posted
Hello Chuck, yes Waz did suggest the CMD line suggestion. That is not really workable for cloud customers who dont have physical access to that client folder. And, I wouldnt really be able to call it from a focexec anyways since its split tier (server and client on are separate machines). What I was more interested in, was how to make the REST service work. There is REST service call for this, but Im stuck on making tha work also. Do you have a suggestion how to make the REST call work Ideally from a focexec, so I can schedule it.
Posted

Hi John

Here is how to run that Web Service from the manual and I am thinking it could be invoked via a -HTMLFORM in a focexec but I have never tried it.

Change Management Export

This RESTful web service request can be used to export directories, files, and groups to be used

by Change Management Import.

Note: This RESTful web service is common to functionality in WebFOCUS Managed Reporting and the Reporting Server.

HTTP Method: POST

REST URL Format:

http://host:port/ibi_apps/rs/impex

where:

host

Is the name of the system where WebFOCUS is installed.

port

Is the port number used by WebFOCUS.

Body Format:

IBIRS_action=cmExport&IBIRS_fileName=fileName

where:

fileName

Is the name of the scenario for the Change Management Export. The scenario must exist in the /WebFOCUSxx/cm/export folder.

Example:

In the following example, the Change Management scenario called RESTWS is exported.

Request:

http://localhost:8080/ibi_apps/rs/impex

Body:

IBIRS_action=cmExport&IBIRS_fileName=RESTWS

 

WebFOCUS Managed Reporting RESTful Web Service Requests

Response:

 

<xml version="1.0" encoding="UTF-8" standalone="no">

 

 

 

 

 

 

If the value for the returncode attribute in the XML response is 10000, then the scenario was exported successfully.

Change Management Import

This RESTful web service request can be used to import directories, files, and groups that were created using Change Management Export.

Note: This RESTful web service is common to functionality in WebFOCUS Managed Reporting and the Reporting Server.

HTTP Method: POST

REST URL Format:

http://host:port/ibi_apps/rs/impex

where:

host

Is the name of the system where WebFOCUS is installed.

port

Is the port number used by WebFOCUS.

Body Format:

IBIRS_action=cmImport&IBIRS_fileName=fileName&IBIRS_resOverwrite=Overwrite

&IBIRS_importUsers=UserOpt&IBIRS_importRoles=RoleOpt

&IBIRS_importRules=RuleOpt&IBIRS_importGroups=GroupOpt

where:

fileName

Is the name of the scenario in the Change Management Export. The scenario must exist in

WebFOCUS Managed Reporting

Overwrite

Can be set as follows:

true. Overwrites existing files and groups.

false. Does not overwrite existing files and groups.

UserOpt

Can be set as follows:

0. Do not import users.

 

Import users but do not overwrite.

Import users and overwrite.

RoleOpt

Can be set as follows:

Do not import roles.

Import roles but do not overwrite.

Import roles and overwrite.

RuleOpt

Can be set as follows:

true. Import rules.

false. Do not import rules.

GroupOpt

Can be set as follows:

Do not import groups.

Import groups but do not overwrite.

Import groups and overwrite.

Example:

In the following example, the Change Management scenario called ImportMR is imported. Existing

files will not be overwritten. Users, groups, roles, and rules will not be imported.

Request:

http://localhost:8080/ibi_apps/rs/impex

WebFOCUS RESTful Web Services Developers Guide 57

WebFOCUS Managed Reporting RESTful Web Service Requests

Body:

IBIRS_action=cmImport&IBIRS_fileName=ImportMR&IBIRS_resOverwrite=false

&IBIRS_importUsers=0&IBIRS_importRoles=0&IBIRS_importRules=false&IBIRS_importGroups=0

Response:

 

<xml version="1.0" encoding="ISO-8859-1" standalone="no">

 

 

 

 

 

 

 

 

 

 

 

 

If the value for the returncode attribute in the XML response is 10000, then the scenario was imported successfully.

Posted

Hello Chuck,

I wasnt exactly looking for documentation. I have the documentation. I have been using embedded_bi_user8203.pdf, it might be a little dated, but it should be good enough for what I am trying to do.

The problem is I am not a REST programmer. I am looking for a coding example to run a CM export from Reportcaster. The manual says you can do it, but there is not really an example that you can paste together from the doc / sample code.

Here is an example of what I want to do.

(oversimplified, but I think you will get the point, take out the ! in the meta tag)

This works

-HTMLFORM BEGIN

<!meta http-equiv = refresh content = 1; url = run/ibfs/EDA/EDASERVE/ibisamp/carinst.fex />

-HTMLFORM END

This does not

-HTMLFORM BEGIN

<!meta http-equiv = refresh content = 2; url =/rs/impex/IBIRS_action=cmExport&|IBIRS_fileName=Public_backup />

-HTMLFORM END

-EXIT

typically, I would run the TEST page

http://server:port/ibi_apps/rsIBIRS_action=TEST then adapt some code from client traces the URL. Works for the REST run call, doesnt work for the REST cmExport. (and is why I opened the topic).

Asking again, has anyone run a CM export from ReportCaster. Can you share how

(The cm_export.sh isnt going to work for me, because I am split tier, I wont be able to call a client script from the reporting server.)

I do think eventually, Ill learn enough REST to be able to do this, but I really would appreciate a jump start, if someone has a coding example.

Posted

Hows about something like:

https://my_client_address/ibi_apps/rs/impexIBIRS_action=cmExport&IBIRS_fileName=ChangeMgmtExportJob

We do this, but with a REST synonym that uses the WebFOCUS Client REST adapter.

The synonym is something like:

 

FILENAME=M6ILO, SUFFIX=WFCREST , REMARKS=Runs a Change Management Export Scenario, $

SEGMENT=M6ILO, SEGTYPE=S0, $

FIELDNAME=IBIRS_ACTION, ALIAS=IBIRS_action, USAGE=A30, ACTUAL=A30, ACCESS_PROPERTY=(NEED_VALUE),

XDEFAULT=cmExport, $

FIELDNAME=IBIRS_SERVICE, ALIAS=IBIRS_service, USAGE=A30, ACTUAL=A30, ACCESS_PROPERTY=(NEED_VALUE),

XDEFAULT=impex, $

FIELDNAME=IBIRS_FILENAME, ALIAS=IBIRS_fileName, USAGE=A100, ACTUAL=A100, ACCESS_PROPERTY=(NEED_VALUE), $

FIELDNAME=__RESPONSE, USAGE=TX80L, ACTUAL=TX, ACCESS_PROPERTY=(INTERNAL), $

SEGMENT=RESPONSE, SEGTYPE=S0, SEGSUF=XML , PARENT=M6ILO, POSITION=__RESPONSE, $

FIELDNAME=IBFSRPC, ALIAS=ibfsrpc, USAGE=A1, ACTUAL=A1, ACCESS_PROPERTY=(INTERNAL),

PROPERTY=ELEMENT, $

FIELDNAME=IBFSPARAMS, ALIAS=ibfsparams, USAGE=A1, ACTUAL=A1, ACCESS_PROPERTY=(INTERNAL),

REFERENCE=IBFSRPC, PROPERTY=ELEMENT, $

FIELDNAME=ENTRY, ALIAS=entry, USAGE=A30, ACTUAL=A30,

REFERENCE=IBFSPARAMS, PROPERTY=ELEMENT, $

FIELDNAME=KEY1, ALIAS=key, USAGE=A30, ACTUAL=A30,

REFERENCE=ENTRY, PROPERTY=ATTRIBUTE, $

FIELDNAME=VALUE, ALIAS=value, USAGE=A30, ACTUAL=A30,

REFERENCE=ENTRY, PROPERTY=ATTRIBUTE, $

FIELDNAME=SIZE, ALIAS=size, USAGE=A30, ACTUAL=A30,

REFERENCE=IBFSPARAMS, PROPERTY=ATTRIBUTE, $

FIELDNAME=ROOTOBJECT, ALIAS=rootObject, USAGE=A30, ACTUAL=A30,

REFERENCE=IBFSRPC, PROPERTY=ELEMENT, $

FIELDNAME=_JT, ALIAS=_jt, USAGE=A30, ACTUAL=A30,

REFERENCE=ROOTOBJECT, PROPERTY=ATTRIBUTE, $

FIELDNAME=VALUE1, ALIAS=value, USAGE=A30, ACTUAL=A30,

REFERENCE=ROOTOBJECT, PROPERTY=ATTRIBUTE, $

FIELDNAME=_JT1, ALIAS=_jt, USAGE=A30, ACTUAL=A30,

REFERENCE=IBFSRPC, PROPERTY=ATTRIBUTE, $

FIELDNAME=LANGUAGE, ALIAS=language, USAGE=A30, ACTUAL=A30,

REFERENCE=IBFSRPC, PROPERTY=ATTRIBUTE, $

FIELDNAME=NAME, ALIAS=name, USAGE=A30, ACTUAL=A30,

REFERENCE=IBFSRPC, PROPERTY=ATTRIBUTE, $

FIELDNAME=RETURNCODE, ALIAS=returncode, USAGE=A30, ACTUAL=A30,

REFERENCE=IBFSRPC, PROPERTY=ATTRIBUTE, $

FIELDNAME=RETURNDESC, ALIAS=returndesc, USAGE=A200, ACTUAL=A200,

REFERENCE=IBFSRPC, PROPERTY=ATTRIBUTE, $

FIELDNAME=SUBRETURNCODE, ALIAS=subreturncode, USAGE=A30, ACTUAL=A30,

REFERENCE=IBFSRPC, PROPERTY=ATTRIBUTE, $

FIELDNAME=TYPE, ALIAS=type, USAGE=A30, ACTUAL=A30,

REFERENCE=IBFSRPC, PROPERTY=ATTRIBUTE, $

 

and then you can run a query against that.

TABLE FILE MY_CM_REST_SYN

PRINT __RESPONSE

WHERE IBIRS_FILENAME EQ My_Change_Management_Export

END

  • Thanks 1
Posted
This would do it!!!.. I could not find that master. I made all the other master files for rest client, but never saw the cmExport master. I havent tried this yet, but this should be solved. I would like to know, where was that master, but now that I know it exists, I will find it.
Posted

The ACX would be something like:

 

SEGNAME=M6ILO,

CONNECTION=WFREST,

OBJECT=rs,

SERVICETYPE=REST,

HTTPMETHOD=POST,

RESTRESPONSE=XML,

HTTPBODY=ENCODE, $

 

Im not sure about the standard filename. I think you can reasonably call it anything

Posted

Thank you Doug, this worked out perfectly. I copied your .mas / .acx, adjusted the connection name.

Runs as a .fex. Runs in the scheduler.

For others, here is the working focexec.

-DEFAULT &filename = Public_backup

TABLE FILE baseapp/cm_export

HEADING CENTER

CM export result for &filename

PRINT

RESPONSE.VALUE

RESPONSE.RETURNDESC

IF IBIRS_FILENAME IS &filename.EVAL

ON TABLE SET PAGE OFF

END

One post closing note. Doug provided the master. I could not actually find it with a string search, so I dont think its included with an 8207 server. For now, that doesnt matter to me, because it works, but I would like eventually find out, what release this master was in.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...