cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Workato connector SDK method issue

ryan-avent
Deputy Chef II
Deputy Chef II

Im seeing a strange issue when using methods in Workato connector SDK, if i call one method after another in the action execute Workato does not wait for the method to complete / respond before calling the next line, as can be seen in the image below each of these methods is responsible for a https callout but only the initial auth call is made and log lines are called. 

workato1.png

workato2.png

I have tried adding log lines to the start of each method (which are being logged) so the methods are being called but Workato doesnt seem to be waiting for the callouts / method to complete before moving on (the http call outs take less then 2 seconds to complete).

If I chain my callouts together in the methods (after_response) i can see Workato runs correctly but these methods are supposed to be stand alone and wont always call the next method like I have in this example.

Am i doing something wrong here? isnt ruby supposed to be synchronous (wait for response) before continuing, or do i need to tell Workato to wait for a response to the method? 



workato3.png


1 ACCEPTED SOLUTION

chotoson
Deputy Chef I
Deputy Chef I
1 REPLY 1

chotoson
Deputy Chef I
Deputy Chef I

Hi @ryan-avent 

I've seen examples in the Connector SDK that use ".presence" to work around the issue.

https://docs.workato.com/developing-connectors/sdk/guides/building-actions/streaming/upload-stream-c...