Tutorial: Running the CompensateAWF Project

Prerequisites:

You performed the steps in Tutorial: Practicing with the Compensate Step.

In this exercise, you run the CompensateAWF Project in SBM Work Center.

To run the CompensateAWF Project:

  1. Log on to SBM Work Center.
  2. Click the FaultHandlingPro icon.
  3. Click +New.
  4. On the Browse tab, click the CompensateAWF Project link.

    The Submit transition form opens.

  5. In the Title field, type any of the company names from the table in SerenaSampleTickerService Company Names and Ticker Symbols, and then click OK.

    The CompensateAWF Project state form opens, and the company name appears in the Title field.

  6. Click DemoCompensate.

    The Submit transition form opens.

  7. Click OK, and then click the Reload Item button.

    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.

  8. Click +New.
  9. On the Browse tab, click the CompensateAWF Project link.

    The Submit transition form opens.

  10. In the Title field, type any text that is not contained the company names from the table in SerenaSampleTickerService Company Names and Ticker Symbols, and then click OK.

    The CompensateAWF Project state form opens, and the text you typed appears in the Title field.

  11. Click DemoCompensate.

    The Submit transition form opens.

  12. Click OK, and then click the Reload Item button.

    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.

Related Topics

Tutorial: Practicing with the Compensate Step