If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Regarding modifying FM Model using SDK

Started by dipstm, 28 Mar 2008 09:26:06 AM

Previous topic - Next topic

dipstm

Hi,
I need to modify my FM Model quite frequently bcoz we need to implement the data level security for the users
created in the group.Whenever a new user is added or deleted the FM Model shld be modified accordingly.
How can I achieve this using SDK? If anybody has done somthing of this sort then plz provide me with the steps to
implement.

Thanx,
Dipstm

tmacfarlane

Wouldn't a more scalable solution involve only have the FM model changed for a change at the group level?  You could manage the users from within Cognos Connection by granting/denying permissions related to the groups of which they belong.

In order to access the FM model via the SDK you would have to :

private void getModel(string packageSearchPath)
        {

            propEnum[] props = new propEnum[] { propEnum.searchPath, propEnum.model };
            searchPathMultipleObject spMulti = new searchPathMultipleObject();
            spMulti.Value = packageSearchPath + "/model";
            string strXMLHeader = "<?xml version=" + "\"" + "1.0" + "\"" + " encoding=" + "\"" + "UTF-8" + "\"" + " ?>";
            string strXMLModel = null;

            model = cmService.query(spMulti, props, new sort[] { }, new queryOptions());

            for (int i = 0; i < model.Length; i++)
            {

                strXMLModel = strXMLHeader + ((model)model).model1.value;
                ...etc...
             }

            // your return value here
}

dipstm

Hi,
Thanx  a lot for ur rply....

Can u plz let me knw where can I have the sample codes related to modifying FM Models using SDK. Actually I want to do a lot of things using SDK in FM like ... creating Groups,providing data level security for tht group , re-publishing packages,etc....

Plz let me knw....

Thanx,
Dipstm

tmacfarlane

All of the code that I have is from code that I developed myself and reviewing the SDK Developer Guide from Cognos.