Вы находитесь на странице: 1из 6

CALLING AN ARTUS G6 COMPONENT FROM

AN EXTERNAL SOURCE
When you call an Artus component using the Artus Component Server there are different
ways to pass parameters to the component. You can do this modifying the URL for each
component. This is the way you should modify that URL
Use this code with caution, the behavior could change in a future version or service pack, or they could disappear completely . So,
you should be prepared to test all of your applications that rely on this code, every time you make any kind of change to your BITAM
product installation.
November 10, 2008.

Prerequisites
Artus WEB server needs to be installed and configured correctly pointing to a valid license manager.
Your project should already exported and configured to be served on Artus WEB. You should be able to view
the dashboard and the component using the normal view before you can use the component.
Also you need to setup properly the URL where Arts WEB is installed. Go into Designer, open Options
(View >> Options) and change the URL for ArtusWEB.

Getting the base URL


To get the URL to call a component from an external source, go into the Designer, open the dashboard containing the
component and double click on the component. You will get the drill down window, select URL.

You will get the URL to call the component

That is the base URL, copy and paste the URL into an internet browser for performing a test.

You should be seeing an image similar to the one above. That means the component server is working perfectly. If
you cant get to component into the browser maybe you still havent setup your project on Artus WEB server.

Changing Parameters on the URL


An example of a URL could be this.
http://localhost/artus/genvi/componentserver.php?project=ZGkoedaC/GsluGkh_m||&user=CavZNvFdpvIxC6||&pw
d=&stage=I6||&cons=JZ||&comp=J1Ca
Please, note that the URL portion:
http://localhost/artus/genvi/componentserver.php?project=ZGkoedaC/GsluGkh_m||&user=CavZNvFdpvIxC6||&pw
d=&stage=I6||&cons=JZ||&comp=J1Ca
Contains the project name encrypted and cannot be changed.
IMPORTANT: Artus will identify the project by the ODBC name not the logical name.

Modifying security
By default the URL contains the user and password you were using on the Designer when you get the URL
http://localhost/artus/genvi/componentserver.php?project=ZGkoedaC/GsluGkh_m||&user=CavZNvFdpvIxC6||&pw
d=&stage=I6||&cons=JZ||&comp=J1Ca
You cannot change this user and password so is encrypted, instead you can call the component using active directory
authentication. In order to do that, just add to the end of the URL the text &SSO=1. And because we dont need
the user and password on the URL we can make the URL shorter removing user and password parameters.
http://localhost/artus/genvi/componentserver.php?project=ZGkoedaC/GsluGkh_m||&user=CavZNvFdpvIxC6||&pw
d=&stage=I6||&cons=JZ||&comp=J1Ca&SSO=1
Artus will use the current logged user to call the component. The user should be configured to use LDAP
authentication on Artus.

Sending parameters to the component


If you like to send parameters to the component you can use &filters. You can include a period filter and/or
dimension filters.
To change the date the component is showing you need to add to the URL a 21 bytes text like this:
SPI_01_00000NYYYYMMDD or SPD_01_00000NYYYYMMDD
Where:
Bytes

Description

Sample

1-6

SPI_01 for beginning

SPI_01, SPD_01

SPD_01 for ending


7

Underscore

8-13

4,5,6

(00000N)

Period Key. You can query the table


SI_PERIODO and look for the CLA_PERIODO
column to see possible values. For example
Monthly = 4, Yearly = 5

14-21

The date with a YYYYMMDD format

20081231

You need to specify an initial date or both. Use _AWSep_ to include both on the url. Samples:
Initial date: May, 26 2008

SPI_01_00000420080526

May, 26 2008 Jun, 13 2008

SPI_01_00000420080526_AWSep_SPD_01_00000420080613

Ending date: Jun,13 2008

(not available)

For the first sample the URL will be like this:


http://localhost/artus/genvi/componentserver.php?project=ZGkoedaC/GsluGkh_m||&user=CavZNvFdpvIxC6||&pw
d=&stage=I6||&cons=JZ||&comp=J1Ca||&filters=SPI_01_00000420080101
For the second one:
http://localhost/artus/genvi/componentserver.php?project=ZGkoedaC/GsluGkh_m||&user=CavZNvFdpvIxC6||&pw
d=&stage=I6||&cons=JZ||&comp=J1Ca||&filters=SPI_01_00000420080101_AWSep_SPD_01_00000420081231
IMPORTANT: If you dont use period filters Artus will show the default period the component
has.
You can add dimension filters to the URL also. To add a dimension filter and call a component you need to add the
following text to the URL: DIM_XX_YY_ZZ
Text

Description

Sample

DIM_

means is a dimension filter

DIM_

XX

The cube Id as in SI_CONCEPTO table. Look for


the CLA_CONCEPTO column.

YY

The consecutive the dimension has as in


SI_CPTO_LLAVE for the given cube
(CLA_CONCEPTO). Look for the CONSECUTIVO
Column

26

ZZ

The filter value

439, North, Miami

If you need to pass several dimension filters to the component use _AWSep_ to separate each filter on the URL.
Use _AWDim_ to include several values for the same dimension filter (you need to repeat the complete string)

Sample:
We have a cube called Sales, we want to call a component passing 2 dimension filters as a parameters. The first
one Region with a value of North (Region ID = 2), the second one State with values Boston and Chicago
(State ID = 2,3).
First we need to get the CubeID value.
select * from si_concepto where nom_concepto = 'sales'

Result:
cla_concepto
-----------3

Then we need the consecutive for the given dimensions


select consecutivo from si_cpto_llave where cla_concepto = 3 and nom_descriptor like
'Region'

Result:
consecutivo
-----------25

select consecutivo from si_cpto_llave where cla_concepto = 3 and nom_descriptor like


State

Result:
consecutivo
-----------12

The URL will be:


http://localhost/artus/genvi/componentserver.php?project=ZGkoedaC/GsluGkh_m||&user=CavZNvFdpvIxC6||&pw
d=&stage=I6||&cons=JZ||&comp=J1Ca||&filters=SPI_01_00000420080101_AWSep_DIM_1_25_2_AWSep_DIM_1_
12_ 2_AWDim_DIM_1_12_3
NOTE: We use the ID values instead of descriptions (e.g. 2 instead of North). If your
dimensions has the same column for key and description use the descriptor instead (e.g.
North)

Вам также может понравиться