Web interface: P_computed when calling connector from API listener?

109 views
Skip to first unread message

tyl...@securecominc.com

unread,
Apr 18, 2014, 12:44:52 PM4/18/14
to suppor...@runmyprocess.com
Hello,

Is there some way of returning information from connectors to API listener scripts? P_computed keeps coming back as an empty object.

Regards,

Tyler

Madhuri Jadhav

unread,
Apr 23, 2014, 2:00:09 AM4/23/14
to suppor...@runmyprocess.com, tyl...@securecominc.com
Hi Tyler,
 Can I ask you for more details?

How you calling connector in API listener-manually via javaScript,Screen initialization or Listen to variable?

These three types works differently and P_computed has different behavior in these three case.

Thanks,
Madhuri,Fujitsu

Tyler Fenby

unread,
Apr 23, 2014, 12:37:01 PM4/23/14
to Madhuri Jadhav, suppor...@runmyprocess.com
I have tried both screen initialization and listen to variable.


Tyler Fenby
Security System Engineer
SecureCom
Office: +1 989 837-4005

Richard Manga

unread,
Apr 23, 2014, 1:06:03 PM4/23/14
to suppor...@runmyprocess.com, Madhuri Jadhav
Hi,

Please test your connector with the same input data used by the API. (API -> Connector Description -> Test Connector).

Check if the result is not empty and check the structure of the result.

Regards,

Richard Manga.


--
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/CAKOH13-uZdqMFRD7ZRQTmwxPVX242KH2aBuogrpRH9TpxGguMw%40mail.gmail.com.

Tyler Fenby

unread,
Apr 23, 2014, 2:17:28 PM4/23/14
to supportforum, Madhuri Jadhav
I don't see a "test connector" option under the API listener tab.


Tyler Fenby
Security System Engineer
SecureCom
Office: +1 989 837-4005


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/RnC3HNKdQkU/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/.

Richard Manga

unread,
Apr 23, 2014, 6:56:04 PM4/23/14
to suppor...@runmyprocess.com, Madhuri Jadhav
Hi,

You should click on the task of your API that contains your connector. Then go to the configuration tab of this task.

In the "Fonctional" Tab, the selected label is "Connector". In the tab "Call a connector", you will have one button "Connector description".

Click on the button "Connector description", you will have a new screen opened, and you will be able to test your connector clicking on "launch test".

The following screenshots can help you.

Regards,

Richard Manga


Connector1.PNG
Connector2.PNG
Connector3.PNG

Tyler Fenby

unread,
Apr 23, 2014, 6:58:44 PM4/23/14
to supportforum

Oh, I see. I tested it extensively while I was creating it. It returns the expected information when I run the test.

Tyler Fenby of SecureCom
Sent from Android

Tyler Fenby

unread,
Apr 23, 2014, 7:00:35 PM4/23/14
to supportforum, Madhuri Jadhav

Oh, I see. I tested it extensively while I was creating it. It returns the expected information when I run the test.

Tyler Fenby of SecureCom
Sent from Android

Richard Manga

unread,
Apr 23, 2014, 7:22:45 PM4/23/14
to suppor...@runmyprocess.com, Madhuri Jadhav
Hi,

I suggest you to test again  exactly with the same parameters that are given as input to your API and make a screenshot of the result tab.

The goal of this approach is to check that the input data of the API call produce a result in the context you are using it.

So, test again the connector with the same data that give you empty P_computed, so we will see if the result is empty or not.

Regards,

Richard Manga.


Tyler Fenby

unread,
Apr 23, 2014, 7:24:01 PM4/23/14
to supportforum, Madhuri Jadhav

No data is passed in. The connector simply returns every organization in our CRM.

Tyler Fenby of SecureCom
Sent from Android

Richard Manga

unread,
Apr 23, 2014, 7:47:17 PM4/23/14
to suppor...@runmyprocess.com, Madhuri Jadhav
Hi,

Do you have any output variable in the last task of your API?

When you want to get some values from your API, you should create an output variable  that contains the value you want (you can set the value of this variable using freemarker code).

So, to access this value in your javascript code, you can use P_computed.output_variable.

Regards,

Richard Manga


Tyler Fenby

unread,
Apr 25, 2014, 9:02:58 AM4/25/14
to supportforum, Madhuri Jadhav
I'm not calling it as a Composite API. I'm calling the connector directly:
Inline image 1

Does it need to be a Composite API to return a value?


Tyler Fenby
Security System Engineer
SecureCom
Office: +1 989 837-4005


Dimitri MELCHIOR Pro

unread,
Apr 25, 2014, 9:12:53 AM4/25/14
to RunMyProcess Support Forum, tyl...@securecominc.com, Madhuri Jadhav
Hi Tyler,

if you set :

alert(JSON.stringify(P_computed));

in completed event script, does it return anything?

Best regards.

--

Dimitri MELCHIOR

PreSales Consultant

     

Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.


Tyler Fenby

unread,
Apr 25, 2014, 9:15:46 AM4/25/14
to Dimitri MELCHIOR Pro, RunMyProcess Support Forum, Madhuri Jadhav
Just an empty JSON object: "{}"
So you know, I determined that it wasn't returning anything by setting the completed script to "console.log(P_computed);"

Regards,


Tyler Fenby
Security System Engineer
SecureCom
Office: +1 989 837-4005


Dimitri MELCHIOR Pro

unread,
Apr 25, 2014, 9:45:21 AM4/25/14
to Tyler Fenby, RunMyProcess Support Forum, Madhuri Jadhav
Tyler,

There are 3 possibilities :
  1. Your Web Service does return nothing
  2. Your Web Servide does not return a JSON
  3. Your Web Service returns a non parse-able JSON (happens if you have Double quotes, special characters or null)
So, I suggest you to draw-up a single-box-Composite-API calling your web service. As output of the box, set the variable my_value = ${P_result}.

Finally, into your WI, you will configure your Composite API instead.

It should work that way. Please let me know.

Best regards.



--

Dimitri MELCHIOR

PreSales Consultant

     

Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.


Reply all
Reply to author
Forward
0 new messages