Dan_Fontaine | 2017-10-24 20:58:04 UTC | #1
I have been trying to do a proof of concept for both a Web Services Data Action and Bridge Action WebserviceDataDip Custom Action. They both take the Failure path when used in Architect. Although the Web Services Data Action passes all tests and a response is received.
Here is the Web Services Data Action setup:
Input Contract: { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": {} }
Output Contract: { "$schema": "http://json-schema.org/draft-04/schema", "title": "Starship", "description": "A vehicle.", "type": "object", "properties": { "maxatmospheringspeed": { "type": "string", "description": "The maximum speed of this vehicle in atmosphere." }, "cargocapacity": { "type": "string", "description": "The maximum number of kilograms that this vehicle can transport." }, "films": { "type": "array", "description": "An array of Film URL Resources that this vehicle has appeared in.", "items": { "type": "string" } }, "passengers": { "type": "string", "description": "The number of non-essential people this vehicle can transport." }, "edited": { "type": "string", "description": "the ISO 8601 date format of the time that this resource was edited." }, "consumables": { "type": "string", "description": "The maximum length of time that this vehicle can provide consumables for its entire crew without having to resupply." }, "created": { "type": "string", "description": "The ISO 8601 date format of the time that this resource was created." }, "length": { "type": "string", "description": "The length of this vehicle in meters." }, "url": { "type": "string", "description": "The hypermedia URL of this resource." }, "manufacturer": { "type": "string", "description": "The manufacturer of this vehicle. Comma seperated if more than one." }, "crew": { "type": "string", "description": "The number of personnel needed to run or pilot this vehicle." }, "vehicleclass": { "type": "string", "description": "The class of this vehicle, such as Wheeled." }, "costincredits": { "type": "string", "description": "The cost of this vehicle new, in galactic credits." }, "name": { "type": "string", "description": "The name of this vehicle. The common name, such as Sand Crawler." }, "model": { "type": "string", "description": "The model or official name of this vehicle. Such as All Terrain Attack Transport." } } }
Request Configuration: { "requestUrlTemplate": "https://swapi.co/api/vehicles/6/?format=json", "requestType": "GET", "headers": {}, "requestTemplate": "${input.rawRequest}" }
Response Configuration: { "translationMap": {}, "successTemplate": "${rawResult}" }
Test Result: { "maxatmospheringspeed": "1200", "cargocapacity": "50", "films": [ "https://swapi.co/api/films/1/" ], "passengers": "1", "edited": "2014-12-22T18:21:15.552614Z", "consumables": "0", "created": "2014-12-10T16:01:52.434000Z", "length": "10.4", "url": "https://swapi.co/api/vehicles/6/", "manufacturer": "Incom Corporation", "crew": "1", "vehicleclass": "repulsorcraft", "costincredits": "14500", "name": "T-16 skyhopper", "model": "T-16 skyhopper" }
When I place it in a Call Data Action block and assign all outputs with variables, validate, publish it, and place a test call, the call takes the failure path. Does anything look out of sorts?
anon47876146 | 2017-10-25 13:54:57 UTC | #2
Do you mind posting the Action from your Flow and the variables you're expecting to be returned from the Action in Architect?
Dan_Fontaine | 2017-10-25 14:15:06 UTC | #3
<img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/3d7d931f3bb9fa24fe0da0c62cc3bc635583398a.png" width="248" height="500"> <img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/6f20f4830e90806df2d9c25f11f86f21f01c0467.png" width="285" height="500">
I created the variables as new variables in the Action - just using dummy variables at the moment. I was told by Support that I needed to assign outputs to variables although you can leave the outputs unassigned and the flow validates and can be published.
Jason_Mathison | 2017-10-26 13:06:55 UTC | #4
AFAIK there is no requirement that all of the outputs from the "call data action" be assigned to a variable.
Just to make sure I understand, are you saying that this action returns success when you call this data action from the UI test mode?
If this works in test mode but fails in an architect flow please open a support ticket so that we can dig into the logs of what is going wrong.
Dan_Fontaine | 2017-10-26 13:34:09 UTC | #5
That's correct, as shown above and quoted here, it successfully passes all tests and returns a result:
Dan_Fontaine, post:1, topic:2005
Test Result: { "maxatmospheringspeed": "1200", "cargocapacity": "50", "films": [ "https://swapi.co/api/films/1/" ], "passengers": "1", "edited": "2014-12-22T18:21:15.552614Z", "consumables": "0", "created": "2014-12-10T16:01:52.434000Z", "length": "10.4", "url": "https://swapi.co/api/vehicles/6/", "manufacturer": "Incom Corporation", "crew": "1", "vehicleclass": "repulsorcraft", "costincredits": "14500", "name": "T-16 skyhopper", "model": "T-16 skyhopper" }
jcp | 2017-11-10 16:35:23 UTC | #6
Hi, I have experienced a similar issue, where the Test is successful, but Architect is following the 'Failure' path. Raised it with support. Isn't there any log we can enable for Web Service data actions ? Thanks, Jean-Christophe
Dan_Fontaine | 2017-11-10 16:49:07 UTC | #7
I am also waiting for a response from support. If possible, please post your configuration.
anon47876146 | 2017-11-10 19:04:03 UTC | #8
@Dan_Fontaine and @jcp did either of you test your action with the flattening box checked? To use the action in Architect, the response needs to be flattened. If the box is not checked, check it and save the action then try again in Architect.
<img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/a38d3f55c0831ff8c6c7c6948e116cec234a4c3e.png" width="616" height="476">
Dan_Fontaine | 2017-11-10 20:05:52 UTC | #9
Yes, I did/do have the flatten checkbox checked.
jcp | 2017-11-13 00:09:14 UTC | #10
Sure, the option is enabled, and I ran test with the Flatten output option ticked. I ran these test before I logged the support ticket.
jcp | 2017-11-14 12:30:23 UTC | #11
Hi,
I have had some help from Genesys to get a resolution to this. In my case I had to add a dummy input data to the contract (even if no Input data is needed), also need to populate the Input with dummy value in architect when the action is called. Action: <img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/81c66680fafe91e3b0c94deb940a206480a9aba7.png" width="543" height="327">
Architect Data Action: <img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/043bb6c290abeed34235691ab9ca07916db0e87d.png" width="245" height="232">
Big thanks to Daniel Szlaski
Dan_Fontaine | 2017-11-14 21:33:54 UTC | #12
Adding that solved the issue for me. Thanks!
Alok_Tibrewal | 2017-11-15 05:09:56 UTC | #13
Umm...
I am still facing this issue. In my data action I have request and response both parameters. My test is running successful but my flow is giving error,
Regards Alok
Jason_Mathison | 2017-11-15 15:40:56 UTC | #14
A fix for this issue is being testing in our lower environments. Assuming that no issues are found we should globally support actions with no input variables in a few weeks. It is possible for us to enable this fix for a given organization right now if it causing major issues for you, contact me directly and I will work through that with you.
Once this fix is released I will plan on updating this forum thread.
system | 2017-12-16 15:41:32 UTC | #15
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 2005