08-06-2019 11:30 AM
I am working on a test system where the sequence launches with a custom process model and then each sub-sequence of the top-level sequence is called in a new execution with the same custom process model (to generate results for each sub-step as well as the overall sequence). Although confusing, this seems to work OK - except for one issue...
When an error occurs in the new execution, the ErrorReported flag is not propagated to the top-level execution and the error status is...this means that any errors are always displayed/reported twice.
We have a custom ProcessModelPostStepRunTimeError callback which obviously also gets called twice.
How can I pass/set the ErrorReported flag to the calling execution so that when the second ProcessModelPostStepRunTimeError occurs it is ignored?
As an aside - I am sending the errors to the OI by way of a UserMessage which triggers an error dialog (asynchronously)...for some reason when the second error is triggered and I haven't closed the dialog, this causes the OI to lock up...I think because it is waiting for a thread/execution to finish which is why I am trying to suppress the second error - it only needs to be reported once (but the top-level step should still show it's status as 'Error').
08-07-2019 10:56 AM
Hi Sam,
Sounds like an interesting application.
I wanted to provide some options of ways you may be able to accomplish this.
One option is trying to pass it as a parameter to a new execution, I'm not sure if this will work for your specific application but it could be worth using.
You could also write a FileGlobal Bool between the Executions.
Or one other options is using a Queue to pass the data and avoid race conditions.
Do you think any of these options could be feasible?