Skip to content
This repository was archived by the owner on May 3, 2025. It is now read-only.

Latest commit

 

History

History
22 lines (14 loc) · 755 Bytes

File metadata and controls

22 lines (14 loc) · 755 Bytes

Temporal PHP SDK samples

This example illustrates the BookingSaga workflow with activities distributed across multiple services.

Installation

  • docker compose run app composer install
  • docker compose run app1 composer install
  • docker compose run app2 composer install
  • docker compose up

Dispatch command

docker compose exec app php app.php booking-saga

The command will be dispatched on the app service. It will wait for Temporal to process the workflow. The BookHotelActivity will be executed on app1, and ReserveCarActivity - on app2.

Results

The ReserveCarActivity will throw an error with 20% probability. You can check the entire workflow and compensation on the Temporal dashboard - localhost:8088.