I have a set of LB’s for the Deal Commission calculator in the nsCox namespace. These LBs current Interrupt with Error when doing validations, which is fine when the user is doing Commission calculations in the UI.
However, Commission data can also come through the PreLedger from external API calls. When that happens, I don’t want the process to be interrupted. I only want the errors logged and the PreLedger process to continue on. Is this possible with the Create Message functionality? Or would I have to add a flag and conditionals that check whether the LB was called through the UI vs PreLedger?
Interrupt with Error essentially tells the system to stop executing that logic and return the errors immediately, while Create Message really just adds a message into the list that will be returned when the logic block execution completes.
As far as I know, there is no way to get Create Message to conditionally interrupt the logic execution, or Interrupt with Error to conditionally not interrupt the execution.
Your idea to use a flag + conditionals sounds like a solid approach to accomplish the behavior your looking for. Additionally, if your logic block isn’t too heavy and it’s performance isn’t really a concern, then you could just use Create Message instead of Interrupt with Error (this would mean the entire logic block is executed every time though, even if an error was thrown in a previous action).
