Loss of Connection @Salesforce Lightning Activity' 'Get Data Wizard'

I have setup the ‘Get Data Wizard’ activity to extract data from Salesforce. This in general works very well except on a morning when I first try to extract the data it tends to fail saying unable to connect and can take a few attempts before it brings back the data. Once the connection has established it then goes on to work without error. The other strange thing is when I test the connection on the ‘Salesforce Application Scope’ the connection is always valid. The example commands in the ‘Get Data Wizard’ always work too, although they are only pulling out 100 records, I did wonder if it was the complexity of the data extract and the amount of data it was searching through which might be causing the problem.

@Cristian_Negulescu Hi Cristian could you please have a read of this post, do you have any idea why this may be happening?

Hello,
The connection is alive just for 1 hour in the studio after 1 hour you need to click again the test connection button. On the runtime, because you run the robot the connection will be initialized every time when is arrive at the Salesforce Application Scope.
About limitation, Get Data Wizard is limited to 2000 Rows but in your case are 100 because if you take a look on the SOQL commands you can see that all are finish with LIMIT 100, if you remove this you will go to 2000 Rows. If you want more you have this movie:

Thanks,
Cristian Negulescu

1 Like

Hi Cristian,

On first run through I do test the connection before trying it, however it doesn’t always work first time, I get an ‘Invalid Command’ window come up after about a minute. I have created a workflow with 2 ‘Get Data Wizards’ in it, the first has the test command to return 100 accounts, the second has my custom command. When I test this it always processes the 100 accounts wizard but will fail on my get data wizard account. I know the command works because after several attempts it will start to work and will continue to work from that point.

This is message I get from the ‘Invalid Command’ window.

System.Threading.Tasks.TaskCanceledException: A task was canceled.

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

at System.Net.Http.HttpClient.d__58.MoveNext()

— End of stack trace from previous location where exception was thrown —

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()

at UiPathTeam.Salesforce.Lightning_Platform.CmdRestAPI.d__61.MoveNext()

Regards

Colin

Hi Cristian,

I’ve now tried running my process through Orchestrator, and I am experiencing the same problem where the ‘Salesforce Get Data Wizard’ fails to connect and bring the data, could you please help me with this issue, salesforce lightning activity is great and fast when it works but this is happening first thing every day. If I can’t be confident it will run through Orchestrator it renders the whole process useless. Here is the error message that I am receiving.

RemoteException wrapping System.AggregateException: One or more errors occurred. —> RemoteException wrapping System.Exception: System.Threading.Tasks.TaskCanceledException: A task was canceled.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Http.HttpClient.d__58.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at UiPathTeam.Salesforce.Lightning_Platform.CmdRestAPI.d__61.MoveNext() at UiPathTeam.Salesforce.Lightning_Platform.CmdRestAPI.d__61.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task1.get_Result() at UiPathTeam.Salesforce.Lightning_Platform.Get_Data_Wizard.EndExecute(AsyncCodeActivityContext context, IAsyncResult result) at System.Activities.AsyncCodeActivity1.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)
at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result)
at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Sorry Cristian forgot to tag you into this, please can you review my last 2 replies @Cristian_Negulescu

Hello Marshall,
Please contact me on Linkedin for more details:
https://www.linkedin.com/in/cristian-negulescu/
What can I tell you is to use the latest version 1.0.0.872
Do you use a production version of Salesforce (login.salesforce.com) NOT Sandbox (test.salesforce.com)?
For the production version, you have a limitation for the number of Tokens that the server will allow. Each token will be invalidated after 1 hour. To solve this issue the connector on the end of Scope the system send a revoked token:
RespServiceURL + “/services/oauth2/revoke?token=” + RespAuthToken
This is the normal behavior is to revoke each token at the end of the scope if you don’t arrive at the end this token will not be released and like I said the has a limited number of tokens.
Inside of the application Scope you need to select at END_of_scope_decision (Connection_Status) value Close_at_scope_end.
Thanks,
Cristian Negulescu

@Cristian_Negulescu I am using the Production Version but I was also seeing the same issue when using the Sandbox version. I do have ‘Close at scope end’ selected too. I have looked for the new version when I go to manage packages, I am on version 1.0.0.866.

It’s ok 866 my concern was to not be very old. I don’t know what to say I can make zoom with you but I don’t know exactly where to start. The component has more than 18K downloads in Total and I don’t receive this issue. Do you have any proxy connection?

@Cristian_Negulescu Yes I do have a proxy connection, the strange thing is it always works first time when I try one of the example commands. Could it be something in my command line:

“SELECT Name,Account_number__c,PIN__c,Id,Company__c,Region__c,Remove_contact__c,Contact_Deleted_in_Orbit__c,Owner_Name__c FROM Contact WHERE Remove_contact__c=True AND Company__c=‘GB1’ AND Region__c=‘UK’ AND Contact_Deleted_in_Orbit__c=False AND Owner_Name__c<>‘Closed Accounts’ AND Owner_Name__c<>‘Pardot US’ ORDER BY Name”

OK Proxy can be an issue.
Let’s understand you configure Proxy inside of UiPath Studio or inside of the connector?
Here is a video about this:

What I do for testing this strange issue is this, I will make a simple HTTP request from a web activity. I will call only that SOQL and here you have an example for that:

To be fair with you I don’t know exactly how to configure a proxy for this HTTP REQUEST.

Thanks Cristian for your help, it’s working fine from Orchestra now.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.