SEARCH DATA FROM OTHER DATABASE

383 views
Skip to first unread message

con...@ecotronicbr.com

unread,
Sep 11, 2014, 7:18:08 PM9/11/14
to suppor...@runmyprocess.com
Hello team!

I would like to search, using a REST API, data from server of other system in cloud.

I need to design in my web interface a box to search the data that I want to make stay in web interface.

Already exists a tutorial like this?

Can you help me?

thoshino

unread,
Sep 11, 2014, 11:34:32 PM9/11/14
to suppor...@runmyprocess.com, con...@ecotronicbr.com
Hi,

You want to make a search box and button, then retrieve data from other cloud, and fill in data into the RMP web form. 
Correct?

There is no set tutorial for this, but here are some pointers.

Search box is text input widget, button widget can be set to Execute script.
You can write full Javascript to send request to the REST API (like, jQuery ajax function), or use API listener and Composite API.

In latter case you can use JS to trigger the API listener.

ajax or API listener function, as success call back function you can parse the return data and fill in each widgets of your web interface.

You can set the value of a widget using this function
RMPApplication.set();

I hope these will be of some help.

Best regards,

Taka

Pray Desai

unread,
Sep 11, 2014, 11:35:21 PM9/11/14
to suppor...@runmyprocess.com
Hi,

1. You need to build  "connectors" to the REST API using its API endpoint and other paramaters or you can check if they already exist in our pre-configured connectors library and directly import it in your project.

2. Create a "Composite API" that should retrieve the required data from your other system via "Connector" task. Store this result in an array of json in a process variable.

3. Then, attach this composite API to the "API Listener" tab of your web interface. You can select the launch event as "Screen initialized" if you want to trigger composite API at the web interface launch.
Documentation reference :
4. In the API Listener tab's "Completed" event, you can write a script that retreives the process variable that contains your result using ${P_computed.result_pairs} and then loops through this result to set a text input widget with autocomplete values using JQuery.

Documentation reference :


-- 
Regards,
Pray Desai,
Fujitsu RunMyProcess.



--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/b417e1c5-cc74-4705-8465-7a30e8fb1653%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

ADMINISTRADOR ECOTRONIC

unread,
Sep 25, 2014, 8:54:57 PM9/25/14
to suppor...@runmyprocess.com
Hello Pray, 

How can I store the result (json) in a json array?


Best regards. 


 

You received this message because you are subscribed to a topic in the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/-m3EcwqSdG8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supportforum...@runmyprocess.com.

To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.

Pray Desai

unread,
Sep 25, 2014, 10:41:58 PM9/25/14
to suppor...@runmyprocess.com
Hi,
Are you talking about result from your external system's connector call? Then, you can retreive it by creating a output variable in your connector task with its value as : 
${P_result.your_connector_result_json_object

If you want to store content associated with a certain key in JSON object that you retreived, into a JSON Array, then you can use : 
${P_to_array(json_object_output_variable, key)}

Check this documentation for reference :

-- 
Regards,
Pray Desai,
Fujitsu RunMyProcess.

ADMINISTRADOR ECOTRONIC

unread,
Sep 26, 2014, 3:44:44 PM9/26/14
to suppor...@runmyprocess.com
Yes Desay

I'll try, but first I need more help. (and I'll need so much more! :))

I'm testing my conector, and the result is this message:

{"Message":"No HTTP resource was found that matches the request URI 'https://www.sigecloud.com.br/api/request/pessoas/pesquisar'.","MessageDetail":"No action was found on the controller 'Pessoas' that matches the request."}

My conector worked?


When the client (RMP) make a request to the api, in this method that explained me (composite api to a variable to use the autocomplete in text input widget), will send a request to the api with parameters synchronized with the text that user is including ?

In this method I send to a collection all the data of the server related to especific parameters?

The API have in Custom Header parameters like autorization token and user, it's necessary to put in the composite API a task with login?


Best Regards

Shobhit Tripathi

unread,
Sep 27, 2014, 10:42:02 AM9/27/14
to suppor...@runmyprocess.com
Hi,

1. I'm testing my conector, and the result is this message:
{"Message":"No HTTP resource was found that matches the request URI 'https://www.sigecloud.com.br/api/request/pessoas/pesquisar'.","MessageDetail":"No action was found on the controller 'Pessoas' that matches the request."}
My conector worked?

 I think you are missing with Provider/Connector configuration part.
 Below are the some reasons:

a) Using HTTP request to the server.(might be server using secure connection "HTTPS").
b) While creating connector, you may have missing correct parameter in fields(Accept media type/ Result media type). You can refer this in server's API document.

2. When the client (RMP) make a request to the api, in this method that explained me (composite api to a variable to use the autocomplete in text input widget), will send a request to the api with parameters synchronized with the text that user is including ?
 
 Yes, In this case API synchronized with user Input in Web Interface to fetch appropriate result.
 
3. In this method I send to a collection all the data of the server related to especific parameters?

 I could not understand this properly. Are you wanted to know that whatever the parameter required to fetch the result from Server side is stored in the collection?
 If this is the scenario, than you can pass all the required parameter inside your connector field (Content type).
 Note: this field only comes when ypu use POST/PUT method.
 
 4. The API have in Custom Header parameters like autorization token and user, it's necessary to put in the composite API a task with login?
 
 Yes. There is another way also, you can use user meta/preferences to stored the credentials and then use it whenever you want.

Hope this will help you, feel free to ask.

Thanks & Regards,
Shobhit 

ADMINISTRADOR ECOTRONIC

unread,
Sep 29, 2014, 11:21:20 AM9/29/14
to suppor...@runmyprocess.com
Hi, 

I think that I had successs to comunicate them. In the test console, the result is null. This means thar the api works?



Best regards 

Shobhit Tripathi

unread,
Sep 29, 2014, 3:29:28 PM9/29/14
to suppor...@runmyprocess.com
Hi,

While you are testing the connector (where you are getting the result as "null"). You can check computed result on Processed Result tab, where you can find the status message "P_status". This will show you the description regarding you query and output generated by the server(if success).

Feel free to ask for further queries.

Thanks & Regards,
Shobhit
Fujitsu- RunMyProcess




--
Thanks & Regards,
Shobhit
Fujitsu- RunMyProcess

ADMINISTRADOR ECOTRONIC

unread,
Sep 30, 2014, 11:41:41 AM9/30/14
to suppor...@runmyprocess.com
Hi, 


How can I know what is the name to include for your_connector_result_json_object and json_object_output_variable?

Best regards

Pray Desai

unread,
Sep 30, 2014, 1:05:06 PM9/30/14
to suppor...@runmyprocess.com, con...@ecotronicbr.com
You will find your_connector_result_json_object in a parameter with expected result in "Processed result" tab when you launch test of your connector.
If your API is well documented, it should mention the expected result and its parameter.
Then, you can store this variable in connector task output variable json_object_output_variable with its value as ${P_result.your_connector_result_json_object}




--

ADMINISTRADOR ECOTRONIC

unread,
Sep 30, 2014, 4:11:17 PM9/30/14
to suppor...@runmyprocess.com

---------- Forwarded message ----------
From: ADMINISTRADOR ECOTRONIC <con...@ecotronicbr.com>
Date: 2014-09-30 16:02 GMT-03:00
Subject: Re: [supportforum:4854] SEARCH DATA FROM OTHER DATABASE
To: Pray Desai <pde...@runmyprocess.com>


Yes, they are atached.

I'm trying to create an autocomplete text input widget, with the data returned from APIs. This data is about scrap generators (my costumers) , that was add in the other system db, that contains name, adress and other info. 

So this connector is for search the costumer.


I sending the API doc in Portuguese

2014-09-30 15:10 GMT-03:00 Pray Desai <pde...@runmyprocess.com>:

I dont what is your expected result of this connector.
Result is empty array in your screenshot. 
If you were expecting some result, then it means there is something missing in connector/rpvider configuration or test variables.

You can retreive your result in process output variable of this connector task from here :
${P_result.result_formecedor}

Can you send me your provider and connector configuration screenshots ?

On Tue, Sep 30, 2014 at 11:06 AM, ADMINISTRADOR ECOTRONIC <con...@ecotronicbr.com> wrote:
These are the screen of the connector test.

Can you say me if it's working?

I think yes..


DOCUMENTAÇÃO API.pdf
server .pdf
test.pdf

Pray Desai

unread,
Sep 30, 2014, 4:50:22 PM9/30/14
to suppor...@runmyprocess.com, ADMINISTRADOR ECOTRONIC
Did you use any authentication method in your connector call ? I did not see it in your provider configuration. Can you send the connector configuration screenshot as well. The documentation mentions authorization token to be sent as header.
Also, can you test this API call outside RunMyProcess and check the result ? You can use Chrome extension like Dev REST HTTP Client.


ADMINISTRADOR ECOTRONIC

unread,
Oct 1, 2014, 3:57:28 PM10/1/14
to Pray Desai, suppor...@runmyprocess.com
Hello, 

I'm having problem with the test of the composite api. 

I returning this status (attached), but the connector test, I had success.


Can you help me ?


2014-10-01 2:30 GMT-03:00 ADMINISTRADOR ECOTRONIC <con...@ecotronicbr.com>:
Pray!

I had success! The api returns values. 

The error was in the dynamic URL!

Thanks a lot!

Leo

2014-09-30 18:31 GMT-03:00 ADMINISTRADOR ECOTRONIC <con...@ecotronicbr.com>:

the api is ok!

2014-09-30 18:29 GMT-03:00 ADMINISTRADOR ECOTRONIC <con...@ecotronicbr.com>:

Hello Pray, 

Yes! Look the screenshot. 


composite api.pdf
Reply all
Reply to author
Forward
0 new messages