Async processing in a Connector Business Rule
Hi All,
I am writing an Connector BR to connect to a system via their API. I first build the rule as a Extender rule so that I can test the logic. So far it works great. It uses Asynchronous processing on all of the web calls. When I try to move that code into a Connector BR, I am having an issue on the GetFieldList part of it. When I try to use it in a data source, I get the following error:
Unable to cast object of type 'System.Threading.Tasks.Task`1[System.Object]' to type 'System.Collections.Generic.List`1[System.String]'.
I am guessing this is because the Main module in the BR is public async Task<obect> Main so whatever is returned is going to be a Task<object>.
Has anyone done Asynchronous processing in the connector rule and had the GetFieldList part working.
My only thought to get around this is the write the data to a table/file with the Extender BR then the Connector reads that.
Any thoughts are greatly appreciated.
Scott