on 05-29-2018 7:43 AM
I have detected an issue or a missed information with the interaction between Java Code (with RestFul communication) and the BOXI Server during the change of the datasource id of a dataproviders in a WebI Report.
Usually, on own code, we update the universe linked to a dataprovider by this RestFul communication:
requestMethod :POST
url :http://dlnxsbsboxi01.brus.be.soprabanking:6405/biprws/raylight/v1/documents/2619052/dataproviders/mappings?originDataproviderIds=DP13⌖DatasourceId=2618913
-----------before send to server-----------------
[null] null
=== Request content ===
null
=== Response code ===
0
=== Response message ===
null
=== Response content ===
null
-----------after send to server-----------------
| === Request content ===
| null
| === Response code ===
| 200
| === Response message ===
| OK
| === Response content ===
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
| <success>
| <message>The resource of type "Document" with identifier "2619052" has been successfully updated.</message>
| <id>2619052</id>
| </success>
|
| === Headers ===
| null: [HTTP/1.1 200 OK]
| Server: [Apache-Coyote/1.1]
| Content-Length: [210]
| Date: [Mon, 28 May 2018 11:48:06 GMT]
| Content-Type: [application/xml]
In this above case, it’s working well.
But some reports/dataproviders have @prompt and a dialog box for filling the values appear when we refresh the corresponding report.
On the RestFul communication, the response code is always 200 but the message is not ‘success’ but seems the prompt wanted by the BOXI Server.
url :http://dlnxsbsboxi01.brus.be.soprabanking:6405/biprws/raylight/v1/documents/2619052/dataproviders/mappings?originDataproviderIds=DP2⌖DatasourceId=2618913
-----------before send to server-----------------
[null] null
=== Request content ===
null
=== Response code ===
0
=== Response message ===
null
=== Response content ===
null
-----------after send to server-----------------
| === Request content ===
| null
| === Response code ===
| 200
| === Response message ===
| OK
| === Response content ===
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
| <mappings>
| <parameters>
| <parameter optional="false" type="prompt" dpId="DP15">
| <id>4</id>
| <technicalName>Nom du rapport</technicalName>
| <name>Nom du rapport</name>
| <answer constrained="false" type="Text">
| <info cardinality="Single" keepLastValues="true">
| <values>
| <value>BEAC</value>
| </values>
| </info>
| <values>
| <value>BEAC</value>
| </values>
| </answer>
| </parameter>
| <parameter optional="false" type="prompt" dpId="DP15">
| <id>5</id>
| <technicalName>Numéro d'édition</technicalName>
| <name>Numéro d'édition</name>
| <answer constrained="false" type="Numeric">
| <info cardinality="Single" keepLastValues="true">
| <values>
| <value>1</value>
| </values>
| </info>
| <values>
| <value>1</value>
| </values>
| </answer>
| </parameter>
| </parameters>
| </mappings>
|
| === Headers ===
| null: [HTTP/1.1 200 OK]
| Server: [Apache-Coyote/1.1]
| Content-Length: [1247]
| Date: [Mon, 28 May 2018 11:49:01 GMT]
| Content-Type: [application/xml]
I have tried to fill the ‘mapping’ without result. When I try with GET instead of PUT, I have a “mapping” but without “parameter” tag.
In my point of view, the behaviour is not identical than the BOXI version 3.1.
Do you have an example of code to understand what it should be on the mapping.
I use, for my code, the class provided on your sample code with Base.java and Request.java.
Feel free to contact me.
Thanks upfront for your help,
Gilles
Hi Gilles,
What version of BOE are you using?
Prior to BI4.2 SP3, all prompts had to be answered when changing the dataprovider. in 4.2 SP3 and higher, the document parameters (prompt and contexts) do not need to be answered when changing data providers of a document. Only data source parameters such as SAP HANA variables and BEx query variables remain to be answered.
You will need to answer the parameters returned from your post and re-post until all prompts are answered,
Dan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Daniel,
I have the version 4.2 SP2.
With the RestFul communication, what is the solution to return prompt values to validate the change of the dataprovider ?
Firstly, I suppose that a need to detects that a prompt is necessary before changing the dataprovider, retrieve it, changing the dataprovider and pass the 'parameter' on same time ?
Do you have a sample ?
I try to do it based on the sample on RaylightRESTWS_Samples.zip but this part is not explained.
Hi Gilles,
Essentially when you POST to: /biprws/raylight/v1/documents/2619052/dataproviders/mappings?originDataproviderIds=DP2⌖DatasourceId=2618913
your response will either be "success" or it will contain parameters. If it contains prompts, then take this response, fill the parameter values and re-POST to the same URL using the xml with the filled parameter values as the body of the POST. If your parameters are hierarchical, then it will prompt again for the next level value(s). Once all parameters are passed back, the change source should complete.
an example of passing the parameter values can be found here: https://help.sap.com/viewer/5431204882b44fc98d56bd752e69f132/4.2/en-US/ec5653cc6fdb101497906a7cb0e91...
Dan
Hi Ayman Salem,
As explain, The mapping doesn't change the problem because we don't have the <parameter> tag...
When I try to add it, the server response code is 500.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can get the suggested mapping with:
requestMethod : GET
http://<host:port>/biprws/raylight/v1/documents/<doc id>/dataproviders/mappings?originDataprovidersIds=<DP id, ..>⌖DatasourceId=<id>
and you will have something like:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<mappings>
<content>
<mapping status="Ok">
<source>
<id>DS1.DO93</id>
</source>
<target>
<id>DS3.DO93</id>
</target>
</mapping>
<mapping status="Ok">
<source>
<id>DS1.DOa6</id>
</source>
<target>
<id>DS3.DOa6</id>
</target>
</mapping>
</content>
</mappings>
then, you can edit the suggested mapping with your own values
....
For a detailed example, see ChangeSourceSample.java (changeSource ()), BaseSample.java (changesourceGetSuggMapping, changesourceApply) in the RaylightRESTWS_Samples.zip file under "..../Samples/webi" Directory
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.