Commit Graph

73 Commits

Author SHA1 Message Date
Loredana Crusoveanu
c09a9ff829 BAEL-5856 mark manual test 2023-01-31 19:10:03 +02:00
Gerard Klijs
4a8cb75ab2 BAEL-5856 Using and testing Axon applications via REST (#13134)
Co-authored-by: Ashley Frieze <ashley@incredible.org.uk>
2023-01-23 22:24:35 +00:00
collaboratewithakash
48a56f4d72 fixed backlink 2023-01-21 15:50:19 +05:30
Gerard Klijs
3a35086f25 BAEL-5855 Persisting the Query Model (#12976)
* BAEL-5855 Persisting the Query Model

* BAEL-5855 Persisting the Query Model, apply baeldung code style.
2022-11-27 17:00:47 +00:00
freelansam
188201d324 JAVA-15409: Fix formatting of POMs (#12992) 2022-11-18 00:26:06 +05:30
collaboratewithakash
fd89c479ac Update README.md 2022-11-05 16:23:05 +05:30
Gerard Klijs
f486ea0d9b BAEL-5807 Add streaming query (#12769) 2022-10-02 09:47:55 +05:30
Asjad J
db236de0e5 Updated README.md
added link back to the article: https://www.baeldung.com/axon-query-dispatching/
2022-09-17 08:33:03 +05:00
Gerard Klijs
ed2c59a76b BAEL-4769 Additions for 'Querying the Query Model in Axon' (#12578)
* Update to latest and include script to start axon server

* Add the two other types of queries

* Add unit and integration tests for the queries

* BAEL-4769 Formatting

Co-authored-by: bipster <openbip@gmail.com>
2022-09-06 14:04:07 -04:00
anuragkumawat
6e6802b1e3 JAVA-12393 Upgraded to use axon-bom.version 2022-06-07 20:28:00 +05:30
anuragkumawat
a1978c7792 JAVA-12393 GitHub Issue: [tutorials/axon] - Sample app fails to start 2022-06-04 12:54:42 +05:30
Krzysiek
70c641eef2 JAVA-9123: POM properties cleanup 2022-01-17 14:03:32 +01:00
johnA1331
58d76862d4 Update README.md 2021-09-29 23:32:13 +08:00
Steven van Beelen
79e287a900 [BAEL-4768] Snapshotting the Aggregate in Axon (#11103)
* Add configuration class

Add configuration class

#BAEL-4768

* Add SnapshotTriggerDefinition bean creation method

Add SnapshotTriggerDefinition bean creation method

#BAEL-4768

* Add SnapshotTriggerDefinition bean name

Add SnapshotTriggerDefinition bean name

#BAEL-4768

* Add threshold behind property value

Add threshold behind property value. Default to 250.

#BAEL-4768

* Add link to the readme

Add a link to the article in the readme

#BAEL-4768

* Process review comments

- Drop readme line
- Adjust parameter indentation of config class

#BAEL-4768
2021-09-25 18:43:54 +05:30
sampadawagde
cbf982f1b9 JAVA-5223: Fix formatting of POMs 2021-05-06 17:14:43 +05:30
Steven van Beelen
e3a2e8f2f2 Use new Axon BOM
Use the Axon BOM to set the versions for the Axon dependencies

#BAEL-4947
2021-04-30 14:47:24 +02:00
johnA1331
44db1b3e3f Update README.md 2021-04-29 05:26:24 +08:00
Steven van Beelen
a5ad7b16e5 Update previous complete test endpoints
The test endpoints used to create an order, add a product, confirm the
order and ship it are not embracing the asynchronous approach of the
CommandGateway. Make sure that all commands are composed with one
another and return the completable future for Spring to resolve

#BAEL-4767
2021-03-19 11:54:20 +01:00
Steven van Beelen
213f6f0f8b Rename API in line with adjusted approach
Change PlaceOrderCommand/OrderPlacedEvent to
CreateOrderCommand/OrderCreatedEvent. Placed suggests it is already
placed, meaning products cannot be changed. However with the new
OrderLine member and its operations it's no longer correct to state the
order placed upon creation. Furthermore, the OrderedProduct is no longer
 a single product, but contains several. Renaming this to Order is more
 in line with what this query model resembles

#BAEL-4767
2021-03-19 11:35:31 +01:00
Steven van Beelen
449fcf5dbb Update http file for testing
Add additional operations to the order-api.http file to simplify testing

#BAEL-4767
2021-03-19 11:24:08 +01:00
Steven van Beelen
f4c62fe737 Allow all operations on the Controller
Add post mappings to allow single creation of an Order, influencing all
aspects of an Order

#BAEL-4767
2021-03-19 11:23:46 +01:00
Steven van Beelen
5ebb8fdcc9 Add aggregate test cases
Add test cases to reach a 100% coverage of all message handling
functions of the OrderAggregate and OrderLine member. Added, upgrade to
JUnit 5

#BAEL-4767
2021-03-19 11:09:48 +01:00
Steven van Beelen
5635c87d38 Update Projection
Add event handlers to update the products map of the OrderedProduct
model

#BAEL-4767
2021-03-19 11:08:42 +01:00
Steven van Beelen
2fc786b499 Update Command Model
Adjust the OrderAggregate to contain an OrderLine aggregate member. The
OrderLine is added as soon as a Product is added through the
AddProductCommand. The OrderLine member is capable of handling the
increment and decrement product count commands, to increase/decrease the
 number of instances for that OrderLine. Decreasing the count below 1
 will publish the ProductRemovedEvent from within the OrderLine.
 Additional business validation is added to unsure a given Product isn't
  added twice (adding a second should go through increment) and that the
   products aren't adjusted as soon as the product is confirmed.

#BAEL-4767
2021-03-19 11:07:26 +01:00
Steven van Beelen
f8a71eb72b Update Exception API
- Introduce a DuplicateOrderLineException to signal whenever somebody
wants to add the same product twice instead of using the increment
command.
- Introduce OrderAlreadyConfirmedException to signal whenever the order
is confirmed, so that adding products and incrementing/decrementing
their count is not possible once the order has been confirmed

#BAEL-4767
2021-03-19 11:04:12 +01:00
Steven van Beelen
452d36949f Update Query API
Change the OrderedProduct model such that it contains a map of products
having the count as its value, instead of a single product.

#BAEL-4767
2021-03-19 11:01:19 +01:00
Steven van Beelen
37106a346f Update Event API
- Adjust OrderPlacedEvent to only construct the order
- Introduce ProductAddedEvent to be able to add several products
to a order
- Introduce ProductCountIncrementedEvent to increase the number of
product instances for a given Order
- Introduce ProductCountDecrementedEvent to increase the number of
product instances for a given Order
- Introduce ProductRemovedEvent to signal whenever all the product count
 drops below 1

#BAEL-4767
2021-03-19 10:59:26 +01:00
Steven van Beelen
7f879019cf Update Command API
- Adjust PlaceOrderCommand to only construct the order
- Introduce AddProductCommand to be able to add several products to an
order
- Introduce IncrementProductCountCommand to increase the number of
product instances for a given Order
- Introduce DecrementProductCountCommand to increase the number of
product instances for a given Order

#BAEL-4767
2021-03-19 10:57:51 +01:00
Steven van Beelen
a04c2dc0ec Update Axon version
Update Axon version to 4.4.7 (current most recent)

#BAEL-4767
2021-03-19 10:53:34 +01:00
amit.pandey
04c9af4965 pom formatting 2020-03-15 18:22:24 +05:30
catalin-burcea
2f7e94bc92 [BAEL-18783] - Fix formatting of POMs 2019-12-06 11:40:56 +02:00
Dhawal Kapil
2c8354eb51 BAEL-17684 POM Properties Cleanup
-Properties cleanup
2019-10-12 19:24:18 +05:30
Josh Cummings
8435d122dc Merge branch 'master' into readme-26 2019-10-02 22:12:09 -06:00
Josh Cummings
e2f6187f35 Update links to https (#7931)
* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* Update README.md

* https added

* https added

* Update README.md

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added

* https added
2019-10-02 20:30:08 +03:00
Sjmillington
83e27dd408 Add README descriptions 26 2019-09-29 17:47:21 +01:00
Steven van Beelen
ce364f6b2e Adjust expected exception
Adjust expected exception from IllegalArgumentException to
UnconfirmedOrderException

BAEL-3099
2019-07-19 16:05:39 +02:00
Steven van Beelen
62d1391db5 Update Axon version
Update Axon version to 4.1.2

BAEL-3099
2019-07-19 16:05:12 +02:00
Steven van Beelen
496c2b1737 Add ProcessingGroup annotation to OrderedProductsEventHandler
Add the ProcessingGroup annotation to OrderedProductsEventHandler so
 that this event handler is grouped in a nicely named Event Processor.
If the app is started in conjunction with Axon Server, this will make
 the set up more evident from the dashboard

BAEL-2435
2019-07-10 13:37:39 +02:00
Steven van Beelen
97ab713024 Create dedicated UnconfirmedOrderException
Create a dedicated UnconfirmedOrderException and use it from the
 OrderAggregate instead of the IllegalStateException

BAEL-2435
2019-07-10 13:27:50 +02:00
Steven van Beelen
65183f082d Update Axon dependency
Update the Axon Framework version to 4.1.1. Additionally, drop the
 exclusion on axon-server-connector, as the page will be adjusted to
 use Axon Server SE.

BAEL-2345
2019-07-10 13:26:48 +02:00
amit2103
a5b5b0fcba [BAEL-12090] - Extract versions into properties 2019-02-04 00:06:11 +05:30
Steven van Beelen
0cf67f5dbe BAEL-2435 Change dependency
Change the autoconfigure dependency to the starter dependency of Axon
2018-12-31 13:45:58 +01:00
Steven van Beelen
03306112bd BAEL-2435 Minor clean ups
-Add toString() function to messages/query-model
-Fix typo in exception
-Reorder event handlers in OrderedProductsEventHandler
-Replace usage of constants for local fields
-Add missing Aggregate test case
2018-12-28 15:58:41 +01:00
Steven van Beelen
d5ad67a801 BAEL-2435 Add http resource
Add http resource to try out all the end points when running the
application in Intellij
2018-12-27 10:47:22 +01:00
Steven van Beelen
4c7303c293 BAEL-2435 Rename main file
Rename main file from MessagesRunner to OrderApplication
2018-12-27 10:46:45 +01:00
Steven van Beelen
769af6759e BAEL-2435 Introduce Query message logic
Introduce a FindAllOrderedProductsQuery query message, which is
published on the QueryGateway through the OrderRestEndpoint and handled
by the OrderedProductsEventHandler
2018-12-27 10:39:42 +01:00
Steven van Beelen
84b6dc1dbb BAEL-2435 Switch domain around
Change the domain from 'Messages' to 'Order' as that domain is better
suited for an example project like this. The Query Model would be better
 suited to revolve around the OrderedProducts rather than just printing
 out a line of text. To that end, add a OrderedProduct model with the
 OrderStatus, which is updated in the (renamed)
 OrderedProductsEventHandler upon all the events
2018-12-27 10:36:10 +01:00
Steven van Beelen
eab6dfe0dd BAEL-2435 Switch domain around
Change the domain from 'Messages' to 'Order' as that domain is better
suited for an example project like this. Update the endpoint to reflect
the order focus i.o. the message focus. Additionally, add a POST
endpoint which would return an exception due to the state check in the
aggregate
2018-12-27 09:55:49 +01:00
Steven van Beelen
bd0a1efe70 BAEL-2435 Switch domain around
Change the domain from 'Messages' to 'Order' as that domain is better
suited for an example project like this. To that end the
MessagesAggregate should be replaced by an OrderAggregate. Additionally,
 add some decision making logic which denies the shipping of an order if
 it hasn't been confirmed yet. Adjust and update thee unit test
 accordingly
2018-12-27 09:51:08 +01:00
Steven van Beelen
2279246a42 BAEL-2435 Switch domain around
Change the domain from 'Messages' to 'Order' as that domain is better
suited for an example project like this. First, update the commands and
events, adding an extra command/event to flesh out the domain some what
2018-12-27 09:39:40 +01:00