iT Synergy Blogs

Growing Innovation - Soluciones a problemas reales

  • Facebook
  • Instagram
  • LinkedIn
  • Phone
  • Twitter
  • YouTube

Copyright © 2023 · iT Synergy·

ESB Toolkit Dynamic Responses in Chained Operations Using Itineraries.
ESB Toolkit Dynamic Responses in Chained Operations Using Itineraries. avatar

March 22, 2011 By Marco Antonio Hernández Prado Leave a Comment

To manage dynamic responses within the ESB when in its services throw either a valid response or a faulted one, we implemented the following scenario that may help you with similar cases.

First you have to take into account serveral important points:

  • An itinerary can define dynamically its response paths. Within an itinerary you can define if a service will respond or not. This isn’t quite a visible property, but it can be used to define if the itinerary service will respond to the client or to the following  service.

This will be the scenario used in our use case.

  • An orchestration can handle one-way or two-way processes, seen as a process that can be design from the itineraries. You don’t have to explicitly place the two-way ports to handle this type of processes. In some cases, handling orchestrations with two-way ports doesn’t allow a simple management of the process since the process is always going to demand for a response when the Decision shapes are used. This means that the process will be required to return a response  in all branches of the Decide Shape (“If”,“Else”, etc). Sometimes this becomes too complex to deal with.

Orchestration that responds with a two-way port (not being used in our example):

Orchestration that responds with a one-way port (being used in our example):

 

Using Dynamic Responses in Chained Operations within Itineraries.

This a preview taken from the original ESB Toolkit Use Case, to us it will be the Dynamic Responses in Chained Operations within Itineraries use case.

As you can see, the services can respond to the next service or respond to the client that made the call.

Implementation Detail:

1. The incoming (On-Ramps) message is received within the ESB through the WCF Service  Itinerary Services Response, this comes with the ESB Toolkit, 2.0 o 2.1.

2. The call is made through the ESB Toolkit Itinerary Tester Client, we added it to our solution to make the tests.

3. The defined itinerary is as follows:

 

The message is received and processed by the CustomOrchestration1 orchestration, then the result is sent to  CustomOrchestration2 which processes and responds to the caller.

Lets take a look to the properties of each shape:

Receive Order

 

CustomOrchestration1 (Ochestration Extender)

 

CustomOrchestration1 (Ochestration Extender)

 

4. The detail of the Orchestrations is as follows:

CustomOchestration1

This orchestration receives a message of the type Initial Order and transforms it to a message type CustomOrchestration1. Here we see two types of possible behaviors. If the Quantity field is equal Zero ( 0 ), an exception is thrown and responded to the caller.

The exception is handled with the ESB Exceptions Framework and published directly to the MessageBox. This same port is used to respond with the exception and to send the message to the following step.

In the Construct  Shape Construct Outoubound Message, the message is constructed for the following step.

 

It is important to note that we use the correlation itineraryRequestResponse when sending the fault. This applies for both, CustomOrchestration1 and CustomOrchestration2.

CustomOchestration2

The difference between this orchestration and CustomOrchestration1, is the validation  of the field. This one makes it with Total, validates if the Total is equal to zero and throws an exception. If the exception is thrown it is sent as a response to the caller, otherwise the response will be of type CustomOrchestration1. Bellow an example with its results:

a. The caller sends OK data. Quantiy has a value and Total has a Value. Then it goes through  CustomOchestration1, CustomOrchestration2 and responds to the caller:

Message

DebugView

 

Itinerary Test Client

 

b. Caller sends data with Quantity in zero, Total with a value different from zero, goes through CustomOchestration1, this orchestration generates an error and sends the response to the caller, it doesn’t go through CustomOrchestration2.

Message

 

DebugView

Itinerary Test Client

 

c. The Caller sends data with Quantity ok. The Total with zero value, the message is processed by CustomOrchestration1 and sent to  CustomOrchestration2. This orchestration generates an error and sends it as a response to the caller.

Message

DebugView

Itinerary Test Client

 

With all these three examples we could prove how the ESB can manage adequate responses when the message is correctly processed and also to give a response when the message isn’t processed correctly.  Also, we can check in the ESB Portal the message and check the used itinerary.

Here is the sample code (install in  “C:\Projects” folder):

iTSynergy.ESB_.ChainedOperations_BTS2010_ESB_2.1

iTSynergy.ESB_.ChainedOperations_BTS2009_ESB_2.0

Filed Under: BizTalk, BizTalk 2010 configurations, BizTalk Application, BizTalk Services, ESB, SOA Tagged With: ESB

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Team


Marco
Antonio Hernández

Jaime
Alonso Páez

Luis
Carlos Bernal

Ana
María Orozco

Juan
Camilo Zapata

Carlos
Alberto Rueda

Sonia
Elizabeth Soriano

Diana
Díaz Grijalba

Bernardo
Enrique Cardales

Alexandra
Bravo Restrepo

Juan
Alberto Vélez

Diana
Paola Padilla

Jhon
Jairo Rodriguez

Yully
Arias Castillo

Carlos
Andrés Vélez

Brayan
Ruiz

Jesús
Javier Hernández

Alejandro
Garcia Forero

Gustavo
Adolfo Echeverry

Josué
Leonardo Bohórquez

Oscar
Alberto Urrea

Odahir
Rolando Salcedo

Jimmy
Quejada Meneses

Natalia
Zartha Suárez

Mario
Andrés Cortés

Eric
Yovanny Martinez

Carolina
Torres Rodríguez

Juan
Mauricio García

Tag Cloud

.NET (9) 940px (1) Analysis Services mdx (1) An attempt was made to load a program with an incorrect format. (1) ASP.NET MVC (1) Azure (3) Backup (1) BAM (7) BAM API (1) BAMTraceException (2) BI (3) BizTalk (24) Business Intelligence (6) C# (2) caracteristicas de publicacion (2) Content Editor (3) ESB (15) ESB Toolkit (3) General (4) habilitar caracteristicas (3) indexes (2) Integration Services (2) Master Page (3) MDX (2) MSE (11) net.tcp (2) Office 365 (2) Oracle (2) Performance Point (2) Public Website (2) Receive Location (2) SDK (2) Servicio Web (2) Sharepoint 2010 (2) SharePoint 2013 (4) SharePoint Online (2) SOA (8) Soap Fault (2) Sort Months MDX (2) SQL Server (2) Visual (2) Visual Studio 2010 (2) WCF (19) Windows (3) Windows 8 (17)

Categories

  • .NET (33)
  • Analysis Services (1)
  • ASP.NET MVC (2)
  • Azure (7)
  • BAM (9)
  • BAM PrimaryImport (3)
  • BigData (1)
  • BizTalk (77)
  • BizTalk 2010 configurations (57)
  • BizTalk Application (60)
  • BizTalk Services (13)
  • Business Intelligence (4)
  • Cloud (3)
  • CMD (1)
  • CodeSmith – NetTiers (2)
  • CommandPrompt (1)
  • CRM OptionSet mapping component (1)
  • Desarrollo de software (6)
  • develop (6)
  • developers (3)
  • DropBox (1)
  • Dynamics (1)
  • Enterprise Architect (1)
  • Entity Framework (1)
  • Errores BizTalk (2)
  • ESB (27)
  • ETL (1)
  • Event Viewer (1)
  • Excel Services (1)
  • Foreach loop container (1)
  • General (4)
  • Gerencia de Proyectos (2)
  • Google (1)
  • Grouped Slices (1)
  • Human Talent (1)
  • IIS (4)
  • Integración (6)
  • Integration Services (3)
  • KingswaySoft (1)
  • Lync (1)
  • MSE (13)
  • Office 365 (2)
  • Oracle Data Adapter (2)
  • Performance Point (4)
  • Picklist (1)
  • Pivot Table (1)
  • Procesos (1)
  • Pruebas (1)
  • Public Website (2)
  • Reports (1)
  • SCRUM (1)
  • SDK (2)
  • SEO (1)
  • Servicios (2)
  • Sharepoint (9)
  • SharePoint 2010 (10)
  • SharePoint 2013 (4)
  • SharePoint Online (2)
  • SharpBox (1)
  • Shortcuts (1)
  • Sin categoría (1)
  • SOA (50)
  • SQL (5)
  • SQL Server (3)
  • SQL Server Management Studio (1)
  • SSIS (3)
  • SSL (1)
  • SSO (1)
  • Tracking Profile Editor (2)
  • Twitter (1)
  • Uncategorized (1)
  • Virtual Network (2)
  • Visual Studio 11 (1)
  • Visual Studio 2010 (2)
  • Visual Studio Online (1)
  • VMware (2)
  • WCF (24)
  • Web (1)
  • Web Api (1)
  • Windows (5)
  • Windows 8 (11)
  • Windows Azure (2)
  • Windows Live Write (1)
  • Windows Phone (7)
  • Windows Phone 8 (1)
  • Windows Scheduler (1)
  • windows8 (2)
  • WindowsRT (3)
  • WP7 SDK (1)

Manage

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org