11-15-2023 11:31 PM
Hi Everyone,
I have requirement to run 4 data management steps in parallel, is there a way to run 4 data management steps same time?
Thanks in advance.
11-16-2023 02:01 AM
Hi Sandeep
I haven't tried to run data management steps in parallel before, but what you could try is to put each step in it's own sequence and then kick them all off at once using a business rule:
BRApi.Utilities.StartDataMgmtSequence(si, "Sequence 1", Nothing)
BRApi.Utilities.StartDataMgmtSequence(si, "Sequence 2", Nothing)
BRApi.Utilities.StartDataMgmtSequence(si, "Sequence 3", Nothing)
BRApi.Utilities.StartDataMgmtSequence(si, "Sequence 4", Nothing)
This should start each of them in the background, so I think it will effectively run them in parallel.
Regards,
Mark
12-12-2023 10:42 AM
Hi Mark, How would I pass a variable (user selection from a parameter) from the initial Data Management Sequence to the next DM step?
I am running into errors when using the code when trying to pass the Entity and Scenario variables.
Thanks, Stephen
12-12-2023 10:43 AM
12-12-2023 10:43 AM
12-12-2023 10:49 AM - edited 12-12-2023 10:54 AM
Hi Stephen
In order to pass parameters to the sequence you need to create a Dictionary (Of String, String). See below:
'Prepare Parameters
Dim params As New Dictionary(Of String, String)
params.Add("Paramter1Name", "Paramter1Value")
params.Add("Paramter2Name2", "Paramter2Value")
'Execute Sequence
BRApi.Utilities.StartDataMgmtSequence(si, "DataMgmtSequenceName", params)
12-12-2023 10:55 AM
Example using your code:
'Prepare Parameters
Dim params As New Dictionary(Of String, String)
params.Add("FCSEntity", SelectSeedingEntity)
'Execute Sequence
BRApi.Utilities.StartDataMgmtSequence(si, "ClearTest1Prior", params)
12-12-2023 01:15 PM
Thank you Mark, I implemented those changes and am a little closer to resolving the issue ... I am attaching a screenshot of my DM (with the prompts for E# and S#) as well as the BR coding and the error message. Any help/thoughts is greatly appreciated!
12-12-2023 01:29 PM
First off, your parameter names are wrong, Try this:
'Prepare Parameters
Dim params As New Dictionary(Of String, String)
params.Add("SelectSeedingEntity", SelectSeedingEntity)
params.Add("FromScenario", FromScenario)
params.Add("ToScenario", ToScenario)
'Execute Sequence
BRApi.Utilities.StartDataMgmtSequence(si, "ClearTest1Prior", params)
But secondly, what are you trying to achieve? It looks to me like you have a Data Management Sequence that executes a custom calculate function that is just going to execute another Data Management Sequence?
12-12-2023 01:32 PM
Thanks! I can try that change. In a planning app, I am trying to run in parallel (for the client) 7 years worth of clearing and copying data. The current process that is in place does each one of the years back to back to back, etc., Takes a long time/ The End User, from a Dashboard, is prompted to select the Entity and To/From Scenarios to clear/copy
12-18-2023 08:10 AM
This solution seems a little klunky to me for the average user and normal use case, I'm wondering if an easier option might be that the Data Management Sequence could have a checkbox upfront that prompts whether the Steps can be run in parallel or not, similar to how it prompts today what servers to run on.
11-16-2023 01:48 PM
Thanks @MarkBird I will try this and let you know.