Introduction
This post covers the details of leveraging the above, what it does, and what it doesn't do.
Here's a very simple example, based on the following integration, which, incidentally, uses a couple of the other new 25.04 features -
As you can see, the integration invokes a decision service to get the discount to be applied to this order. It also checks if the order is large, e.g. greater than €5000.Our store is selling Samuel Beckett t-shirts, so a €5k order is definitely suspicious. Large orders need to be approved, by a sales manager, thus the Process invoke.
Let's do a dry run, with a large order -
Looks good, behaving as it should -Now let's try with a smaller order - this should return an error from Netsuite, as I have set the Sales Order status to an invalid value.
I will now add the retry logic, although it won't help us fix this invalid data issue. However, I just want to detail what will be generated and what you may need to do afterwards to complete error handling. Begin by adding the retry logic - The basics of what's generated are discussed in my previous post.
Net, net - default is to retry 3 times -
let's test this out -
So what happened here? Well the first action in the integration is setting a return status -Naturally, that is not what I want, so I add supplementary error handling here in the Otherwise branch -
The mapping is as follows -Type and Title are hardcoded. The other fields get their data from the following source - I could also have rethrown the fault to a global fault handler, so it's up to you how to handle this.
Summa Summarum