06-07-2016 01:44 PM
Is there any plans to add proper async and await keyword support in OnBase studio? Currently, one can include those keywords and compile properly but the await keyword doesn't get acted upon, and the thread just continues, and when the Script context exits any async work still in progress halts.
Or better yet, is there a way to have a class that implements IWorkflowScript (or any of the other Unity interfaces) inside an DLL and have those classes exposed for usage inside a workflow configuration?
06-08-2016 11:01 AM
Hi Luis,
Async/await is supported in Unity scripts. However, the script framework will not await the OnExecute method if you configure it as async. This means that the script will "finish" execution before the code in it has completed running. This could cause unpredictable behavior and is likely to produce errors, so I strongly recommend that you do not mark your OnExecute method as async. Instead, call Wait() or Result on the task returned by your async method to ensure that all code has completed before the script finishes execution.
To your second question, you cannot write an external assembly which implements a script interface, but you can call external assemblies from inside of a script. Just write your assembly in Visual Studio, import it into OnBase Studio, and add a reference to it in your script.
Hope this helps!
06-08-2016 11:01 AM
Hi Luis,
Async/await is supported in Unity scripts. However, the script framework will not await the OnExecute method if you configure it as async. This means that the script will "finish" execution before the code in it has completed running. This could cause unpredictable behavior and is likely to produce errors, so I strongly recommend that you do not mark your OnExecute method as async. Instead, call Wait() or Result on the task returned by your async method to ensure that all code has completed before the script finishes execution.
To your second question, you cannot write an external assembly which implements a script interface, but you can call external assemblies from inside of a script. Just write your assembly in Visual Studio, import it into OnBase Studio, and add a reference to it in your script.
Hope this helps!
06-08-2016 03:02 PM
06-08-2016 03:37 PM
06-09-2016 05:48 AM
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.