09-07-2022 11:45 AM
I have a single Connector BR that makes several independent API calls to external systems. When it's called the Task Progress window sits at 11% with the message "Parsing Source Data". I would like to update the task as it goes along so the user knows something is happening. I found reference to the below snippet but don't know how to properly instantiate the extenderArgs variable. I tried using it with Nothing but it did not seem to work as intended. Is there a sample of how I can do this in a Connector BR?
Dim bValue As Boolean = BRApi.TaskActivity.UpdateRunningTaskActivityAndCheckIfCanceled(si, extenderArgs, activityDescription, percentCompleteToAdd)
09-08-2022 08:05 AM
Many of the MarketPlace solutions have examples of how this is used. For example, the PLP Solution Helper under Dashboard Extender Business Rules shows how "extenderArgs" is passed. First part is creating a Public Function where extArgs is defined as ExtenderArgs
Then, this can be passed as an argument to the BRApi.TaskActivity.UpdateRunningTaskActivityAndCheckIfCanceled Function
Hope that helps
09-08-2022 10:01 AM
Thank you. My issue is that I cannot simply add a parameter to the Connector entry point. I need to declare the object and set the TaskActivityID correctly. I just cannot find out what the ID is, as it does not appear to be passed at all into the Connector.
Dim extArgs As New ExtenderArgs
extArgs.TaskActivityID = "XXXXX"
09-08-2022 11:47 AM
Hi,, try this
Using dbConnApp As DbConnInfoApp = BRApi.Database.CreateApplicationDbConnInfo(si)
' Get task id
Dim taskId As Guid = EngineWorkflowRunningTask.GetRunningTaskActivityID(dbConnApp, si.WorkflowClusterPk)
' Other actions...
09-08-2022 03:28 PM
Thank you for this, I'm almost there. I can get the taskID via the your snippet but found out the TaskActivityID property on the ExtendedArgs class is READ-ONLY. I'll keep trying but thank you all for pointing me in the right direction.
09-08-2022 03:48 PM
Anyway I don’t think you can increase the percentage from connector BR as it is automatically updated by onestream after each import sub-step.
you can do from extender BRs that you execute from a DM job