Skip to content

Commit 0e8bfbf

Browse files
authored
Merge pull request #447 from RailsEventStore/move-processes-to-application
Move processes to rails_application
2 parents 0981f50 + c621ac0 commit 0e8bfbf

32 files changed

+151
-369
lines changed

.github/workflows/processes.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

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}") and !(entry == '.' || entry == '..') }
3232
end
3333

3434
def source_domain_directory(domain)

ecommerce/configuration.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
require_relative "invoicing/lib/invoicing"
1010
require_relative "taxes/lib/taxes"
1111
require_relative "fulfillment/lib/fulfillment"
12-
require_relative "processes/lib/processes"
1312

1413
module Ecommerce
1514
class Configuration
@@ -20,7 +19,6 @@ def initialize(number_generator: nil, payment_gateway: nil)
2019

2120
def call(event_store, command_bus)
2221
configure_bounded_contexts(event_store, command_bus)
23-
configure_processes(event_store, command_bus)
2422
end
2523

2624
def configure_bounded_contexts(event_store, command_bus)
@@ -41,9 +39,5 @@ def configure_bounded_contexts(event_store, command_bus)
4139
Fulfillment::Configuration.new(@number_generator),
4240
].each { |c| c.call(event_store, command_bus) }
4341
end
44-
45-
def configure_processes(event_store, command_bus)
46-
Processes::Configuration.new.call(event_store, command_bus)
47-
end
4842
end
4943
end

ecommerce/processes/.mutant.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

ecommerce/processes/Gemfile

Lines changed: 0 additions & 4 deletions
This file was deleted.

ecommerce/processes/Gemfile.lock

Lines changed: 0 additions & 104 deletions
This file was deleted.

ecommerce/processes/Makefile

Lines changed: 0 additions & 10 deletions
This file was deleted.

ecommerce/processes/test/test_helper.rb

Lines changed: 0 additions & 101 deletions
This file was deleted.

0 commit comments

Comments
 (0)