-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Assignment 4 schedule and aggregation of order #12
most messages working added definition of messages
- Loading branch information
1 parent
a44e627
commit 8eaf6da
Showing
8 changed files
with
256 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# OrderProcessingAgent | ||
## Messages received: | ||
* Receive Order from client: | ||
* Type: CFP | ||
* Sender: Client | ||
* Receiver: All OrderProcessingAgents | ||
* Content: JSONObject as String -> Order | ||
* Receive accepted proposal: | ||
* Type: ACCEPT_PROPOSAL | ||
* Sender: Client | ||
* Receiver: OrderProcessingAgent | ||
* Content: JSONObject as String -> Full Order but only containing products available at specified bakery | ||
* Receive Reject proposal: | ||
* Type: REJECT_PROPOSAL | ||
* Sender: Client | ||
* Receiver: not chosen OrderProcessingAgent | ||
* Content: String -> "rejected" | ||
* Confirm Schedule: | ||
* Type: CONFIRM | ||
* Sender: SchedulerAgent | ||
* Receiver: OrderProcessingAgent | ||
* Content: String -> Scheduling possible | ||
* Disconfirm Schedule: | ||
* Type: DISCONFIRM | ||
* Sender: SchedulerAgent | ||
* Receiver: OrderProcessingAgent | ||
* Content: String -> Scheduling impossible | ||
|
||
## Messages sent: | ||
* Proposal to Client: | ||
* Type: PROPOSAL | ||
* Sender: OrderProcessingAgent | ||
* Receiver: Client | ||
* Content: JSONObject as String -> List of available products with prices (amount of product times sales_price for product) | ||
* Refusal to Client: | ||
* Type: REFUSE | ||
* Sender: OrderProcessingAgent | ||
* Receiver: Client | ||
* Content: String -> reason for refusal (no needed product available or not enough time to produce order) | ||
* Confirmation of order: | ||
* Type: CONFIRM | ||
* Sender: OrderProcessingAgent | ||
* Receiver: client | ||
* Content: String -> "order confirmed" | ||
* Check Scheduler: | ||
* Type: REQUEST | ||
* Sender: OrderProcessingAgent | ||
* Receiver: SchedulerAgent | ||
* Content: JSONObject -> order with only available products | ||
* Propagate accepted Orders: | ||
* Type: PROPAGATE | ||
* Sender: OrderProcessingAgent | ||
* Receiver: allAgents | ||
* Content: JSONArray -> sorted List of all received Orders -> according bakeryid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# SchedulerAgent | ||
## Messages received: | ||
* Disconfirm Schedule: | ||
* Type: DISCONFIRM | ||
* Sender: SchedulerAgent | ||
* Receiver: OrderProcessingAgent | ||
* Content: String -> Scheduling impossible | ||
* Propagate accepted Orders: | ||
* Type: PROPAGATE | ||
* Sender: OrderProcessingAgent | ||
* Receiver: allAgents | ||
* Content: JSONObject -> "sorterOrder": JSONArray containing sorted List of all received and scheduled Orders -> "bakeryId": according bakeryid | ||
* Check Scheduler: | ||
* Type: REQUEST | ||
* Sender: OrderProcessingAgent | ||
* Receiver: SchedulerAgent | ||
* Content: JSONObject -> order with only available products | ||
|
||
## Messages sent: | ||
* Confirm Schedule: | ||
* Type: CONFIRM | ||
* Sender: SchedulerAgent | ||
* Receiver: OrderProcessingAgent | ||
* Content: String -> Scheduling possible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.