SBM Orchestration Guide → Orchestration Procedures → Using the Scope, Throw, and Compensate Steps to Handle Faults From Web Services → Running the Fault Handling Process App → Tutorial: Running the CompensateAWF Project
In this exercise, you run the CompensateAWF Project in the SBM User Workspace.
To run the CompensateAWF Project:
If the FaultHandlingPro tab is not visible, click the More tab, and then select FaultHandlingPro in the list.
The Submit transition form opens.
The CompensateAWF Project state form opens, and the company name appears in the Title field.
The Submit transition form opens.
The CompensateOWF orchestration workflow is invoked. The data from the Title field is passed to the UpdateTitle Service step. The UpdateTitle Service step is invoked and passes the text that is mapped to the Title field, "Updated by CompensateOWF," to the GetTickerSymbol Service step. The Web service's GetTickerSymbol Service step is invoked, and the text is returned to the SBM Application Engine, which displays "Updated by CompensateOWF" in the Title field of the state page.
The Submit transition form opens.
The CompensateAWF Project state form opens, and the text you typed appears in the Title field.
The Submit transition form opens.
The CompensateOWF orchestration workflow is invoked. The Web service's GetTickerSymbol operation is invoked, and the Web service determines that the data is not valid. The Web service generates the GetTickerSymbolFault, which is caught by the GetTickerSymbolFault Catch branch. This branch passes the fault detail to the ReturnTickerSymbolFault Throw step, which throws a fault to the Compensate step in the FaultHandler section of the OuterScope. The Compensate step looks for any enclosed, successfully completed scopes and finds the UpdateTitle scope. The CompensationHandler section for this scope contains a Service step to invoke the SBM Application Engine TransitionItem operation, which rolls back the change to the Title field that happened in the UpdateTitle scope. Note that this scope changed the Title field to "Updated by CompensateOWF," but the Compensate step is now rolling back that change. It also changes the Description field to "Returning Title to its original value." The Application Engine displays the original data from the Title field in the Title field of the state form and "Returning Title to its original value." in the Description field.
Copyright © 2007–2017 Serena Software, Inc. All rights reserved.