The goal of this entry is to show how a flight booking process with different web services  and a mock-up GUI can  be simulated and verified with AMUSE. The focus is on the orchestration of the web services, which are part of the flight booking process.  In a next step it would be interesting to generate BEPEL out this state machine.

The flight booking process
The user of an online travel agency calls the appropriate website and enters his flight details on that page.  Then a search for possible flights, hotels and events taking place during the stay starts, which calls different web services. The Results are then finally displayed on the site.


This simple process is modeled in the following activity diagram:


Mock-up GUI


This GUI is used to feed the simulation with the user data and to present the results of a search to the user.

Web Services
To illustrate this process, the following Web Services are needed. However, this Web Services are only implemented to some extent.  The level of the implementation is quite sufficient for the demonstration purpose of this example:


EventService: Implements the method EventList, which displays all available events at a given time. In this example, every time the same events are described. It is enough for the demo.


public string EventList()


return “International film festival \n Rock konzerte  \n Music festival”;


FlightService: Implements the method FlightInfo, which displays the flights available from one location to another at a given time.


public string FlightInfo(string from, string to, DateTime departureDate,DateTime returnDate)


return from.ToUpper() + “–” + to.ToUpper() + ” HG8010 ” + departureDate + ” 08:15 \n” +to.ToUpper()+”-“+from.ToUpper()+” HG8011 “+returnDate+” 11:55 \n —————————————————– \n Rate:200€”;


HotelService: The method HotelInfo displays all available hotels during the stay


public string HotelInfo()


return ” Grand Hotel(4 Stars) \n Rate per night 59€”;


InputValidationService:  The method ValidateInputData should check the data entered by the users to their validity. For demonstration purposes I have implemented the method in a way that it in one case it returns “true” and in another case it returns”false”.


public bool ValidateInputData(string from, string to, bool oneWay, bool returnFlight, DateTime departureDate, DateTime returnDate, string numAdult,string numChildren,string numInfant)


if (from.Equals(to))

return false;


return true;


I added this web services to the Simulation, all external dlls. In order to pursue a more detailed and systematic approach, see Simons post .

The flight booking process modeled as a state machine


You can download the entire sample and try it yourself during the video.

[mediaplayer src=’/wp-content/uploads/AMUSE_WS_WMV_V9.wmv’ autoLoad=1 ]

Download video: AMUSE web service orchestration