After executing pxRunSingleCaseDDF how can i get a handle on the instance of DataFlowRun
When invoking an Data-flow with either the DataFlow-Execute method or pxRunSingleCaseDDF I can use pzLoadSingleCaseRuns (or look via Designer studio > decisioning...) to display instances of Data-Decision-DDF-RunInfo.
However, i would like to systemically open the specific instance after executing the data-flow to make determine what i do next in the processing.
To do this i need to understand how the ID is created or if i can control the ID and by what mechanism i can open a single instance of RunInfo.
This question has been discussed on a separate chat, I'm adding a summary of the discussion here so it can be viewed by others.
There are a few points to be observed here:
- pzLoadSingleCaseRuns: Try to avoid using pz marked rules, they are internal and we might change them without keeping backward compatibility. Data-Decision-DDF-RunInfo is the same case, it's only used for UI and has not been designed to be used as an API. For API use we have Data-Decision-DDF-RunOptions that you can use to manage your run and Data-Decision-DDF-Progress that can be used for getting information about the progress of the run.
Single case runs, runs that are executed in the same thread can be divided in two different steps:
Step-1) The actual execution: On the same thread that you trigger the data flow, it will be executed and if you have an abstract destination it will give back to you once the execution is finished.
Step2) Metrics aggregation: Once the run is finished we have a mechanism that will give the metrics of this execution to a metrics manager that will take care of aggregating all executions of the same data flow rule giving you an overview of what happened across the system. This happens on a separate thread so while you execute your data flow you won't have access to the actual run object you loaded from the LP, that's created/updated at a later stage.
Once approach you can take is to use the RunOptions page on your call and set the desired ID there, that will be used to create the run, but since that is done on a separate thread you won't have access to the info about the last execution right away. On top of that since the run works simply as an aggregator you cannot pick individual executions.