Using Human Tasks in BPEL processes
We double-click the BPEL service component to open the BPEL Component Designer. We will add a human task after the CheckFlightAvailability
scope. Now every ticket will have to be approved first before making the reservation. However, before adding the Human Task, we also have to create a new variable, which will contain the best offer. Data about the best offer and employee data will then be assigned to the Human Task payload. The decision of the Approval Manager will be based on this data.
Creating variable and adding <switch> activity
We name the new variable FlightResponseBest
. The variable is of type TravelResponseMessage
(same as FlightResponseAA
and FlightResponseDA)
. We also add new<switch> activity to be able to compare both offers. Depending on the result, we copy the data from one of the variables containing the offer (FlightResponseAA or FlightResponseDA)
to the FlightResponseBest
. After creating the new variable and adding<switch...