Lee Sobotkin

When in doubt, try, try, and try again... (Part 1)

Blog Post created by Lee Sobotkin Employee on May 31, 2017

Many Boomi developers and users want to track errors in their processes. Some want processes to gracefully exit or recover from an error. The Try/Catch shape is well suited for this use case, but only if the shape behavior is well understood. So before we get technical, let me tell you a story...

 

The Story

Imagine Lee, Jon, and Sharon fishing, enjoying the day, on a muddy lake. Because the water is SO muddy, they cannot see below the water surface. Each tie their fishing lines with a hook and bait, ready to catch some fish. I am a very visual person, so let’s talk about potential scenarios with pictures...

 

Scenario 1

All three cast their lines into the water. Shortly thereafter, Lee acknowledges hooking a fish by feeling a tug on his line. He is thrilled. Jon and Sharon, not so much.

 

 

Scenario 2

All three cast their lines into the water. Their lines get tangled into a knot under the water (they cannot see this due to the muddy water). Lee’s baited line hooks a fish, but all three feel a tug on their line (because of the knot underwater). Confusion sets in as to who really hooked the fish.

 

 

Scenario 3

Jon believes he is not using the correct bait. He devises a series of hooks and various baits that is tied to a single line. This will expedite testing various combinations. He immediately hooks a fish! Unfortunately, the knot in the line was below the water, and he was unable to discern which hook-bait combination hooked the fish.

 

 

The Analogy

What does this have to do with Boomi?! These scenarios have analogous principles that apply to the Try/Catch shape used in your process design. Consider that the fishing line is a Boomi document flow; the knots are splitting or combining documents; the water surface, a try/catch shape; and the act of hooking a fish, catching an error. Let’s re-evaluate the scenarios...

 

Boomi Scenario 1

Three documents passing through the try catch shape. One document fails the decision criteria and throws an exception. One document goes down the "Catch" path (the document at the Try/Catch shape that is tied to the document throwing the exception).

 

 

Boomi Scenario 2

Three documents passing through the try catch shape. Documents are combined and split. One document fails the decision criteria and throws an exception. All three documents go down the "Catch" path (because the document that throws the exception lost the tie back to the document that passed the Try/Catch shape through a series of combining and splitting documents).

 

 

Boomi Scenario 3

One document passing through the Try/Catch shape. Document is split. One document fails the decision criteria and throws an exception. Original document (with all records) goes down the "Catch" path (the document at the Try/Catch shape that is tied to the document throwing the exception).

 

 

Key Points

  • Documents sent down the "Catch" path are tied to the document that throws the error
  • If that tie is severed, all documents are sent down the "Catch" path when an error is thrown
  • All explanations relate to documents, *not* records
    • It is always important to understand your record-to-document relationship structure throughout the process

 

In a future part 2 of this discussion, I will talk about more advanced use cases involving the Try/Catch shape.

 

Lee Sobotkin is a Senior Integration Consultant at Dell Boomi. He has 13 years of experience, drawing cartoons to explain integration concepts.

Outcomes