keskiviikko 10. huhtikuuta 2013

Tutorial 1 part 29 - adding if statement

Next based on output from web service we need to select right action.
Add an if action to the flow before InvokeReservevationSystem. Note here we are using BPEL 2.0 and the switch activity is no longer available, which we used in the previous BPEL sample code.
Click on the label activity and you can start editing the label and condition for it.

Make the label e.g. “free vehicle moving” etc. Create expression for this part.
BTW: in original phase when we created the DB with contents, we did not add any rows where the status for a car would be “available”. Add one row – e.g. ADZ-123 with that status via SQL Developer.
First open up on the left side of the “Expression Builder” the variable InvokeReservationsSystem_OutputVariable until you see the status:string part. Add it to the expression by pressing the “Insert into Expression” button.  Edit the expression until it is: $InvokeReservationSystem_OutputVariable.payload/@status = "Free"

That’s it. Press Ok twice.
Next add an empty label to the else part. If the vehicle is moving for known reasons we do not need to do anything.

Ei kommentteja:

Lähetä kommentti