Skip to content

Commit a0361bb

Browse files
committed
Readme files updated to reflect the fact processes are now part of the application.
1 parent 43aadad commit a0361bb

File tree

3 files changed

+26
-21
lines changed

3 files changed

+26
-21
lines changed

README.md

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ ecommerce/
4343
├── ordering
4444
├── payments
4545
├── pricing
46-
├── processes
4746
├── product_catalog
4847
├── shipping
4948
└── taxes
@@ -57,7 +56,6 @@ ecommerce/
5756
* [Ordering](ecommerce/ordering/README.md)
5857
* [Payments](ecommerce/payments/README.md)
5958
* [Pricing](ecommerce/pricing/README.md)
60-
* [Processes](ecommerce/processes/README.md)
6159
* [Product Catalog](ecommerce/product_catalog/README.md)
6260
* [Shipping](ecommerce/shipping/README.md)
6361
* [Taxes](ecommerce/taxes/README.md)
@@ -97,25 +95,10 @@ It's a good example of how to create a separate application that uses the same d
9795

9896
### Process Managers
9997

100-
#### Release payments when order expired
101-
102-
There's a process manager responsible for dealing with the process of
103-
expiring orders.
104-
105-
It takes the following events as the input:
106-
- Ordering::OrderPlaced
107-
- Ordering::OrderExpired
108-
- Ordering::OrderConfirmed
109-
- Payments::PaymentAuthorized
110-
- Payments::PaymentReleased
111-
112-
When certain conditions are met the process manager return a
113-
`ReleasePayment` command.
114-
115-
#### Confirm order when payment successful
98+
Processes are application specific so they live at the application level.
99+
In our case it's in the main ecommerce Rails app:
116100

117-
Another process manager is responsible for confirming order.
118-
It does it, when a successful payment is detected.
101+
[Processes](https://github.com/RailsEventStore/ecommerce/tree/master/rails_application/app/processes)
119102

120103

121104
# Contributing guide

build_events_catalog.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def configure
2828
end
2929

3030
def read_domains
31-
Dir.entries(SOURCE_PATH).select { |entry| File.directory?("#{SOURCE_PATH}#{entry}") and !(entry == '.' || entry == '..' || entry == 'processes') }
31+
Dir.entries(SOURCE_PATH).select { |entry| File.directory?("#{SOURCE_PATH}#{entry}") }
3232
end
3333

3434
def source_domain_directory(domain)

rails_application/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,25 @@ The script is called `big_picture.rb`, and you can execute it like this:
5858
```shell
5959
bin/rails r script/big_picture.rb
6060
```
61+
62+
## Process managers
63+
64+
### Release payments when order expired
65+
66+
There's a process manager responsible for dealing with the process of
67+
expiring orders.
68+
69+
It takes the following events as the input:
70+
- Ordering::OrderPlaced
71+
- Ordering::OrderExpired
72+
- Ordering::OrderConfirmed
73+
- Payments::PaymentAuthorized
74+
- Payments::PaymentReleased
75+
76+
When certain conditions are met the process manager return a
77+
`ReleasePayment` command.
78+
79+
### Confirm order when payment successful
80+
81+
Another process manager is responsible for confirming order.
82+
It does it, when a successful payment is detected.

0 commit comments

Comments
 (0)