• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Create order.

 
Greenhorn
Posts: 10
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

Have something like domain model *.png The SUD responsible for creating orders with for some items and buy from suppliers. As far as I understand UML every each order must have 1 Seller.
1. Is multiplicity 1 means that every new Order MUST have Seller when created/persisted, or the Order can be created/persisted and system set the seller when the order processed buy other department/system?
2. Is it possible to assume that, system creates an order without supplier set? And purchasing department pick appropriate supplier?
3. Instead of association, make "sellerId" an attribute of the Order, same as on optionalClassDiagram. Any pros/cons?
4. Are there any other ways to resolve it?

Thanks.
order_supplierDomain.png
[Thumbnail for order_supplierDomain.png]
domain model
optinalClassDiagram.png
[Thumbnail for optinalClassDiagram.png]
optional class model.
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First you should understand what is that Order represent, something the Supplier buy or sell/provide.

Not knowing your use case how Supplier or Order is used, it's hard to determine the exact relationship

Every Supplier <fill in the blank> many Orders.

What's the purchasing department doing there in the domain model? Or did you put it there? The purchasing department should be an actor in the use case diagram and actors are rarely in the domain model unless it's really important.


 
Ivan Pyshko
Greenhorn
Posts: 10
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, purchasing department is an actor, and not part of my class diagram or domain model. I just put it there as a side not.
As far as I understand supplier manufacture/provide/distribute items and  the SUD system is a next link in a chain.
What I'm not able to clarify yet, since there is no information where the supplier info is stored:
Create Order -> add items -> sent to process by next system in process chain (for example purchasing department/bounded context is responsible for picking up most appropriate supplier)
Or
Create Order -> add items -> choose supplier via hooks/DAO/interfaces to external context -> process by next in chain.

This is not an exact problem from an assignment. Seller entity not in any use cases.
Thanks
 
K. Tsang
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seller is not in any use case but in the domain model? Hmm which assignment is this?

Let go with Supplier is indeed in the domain model like you have it.

Let's assume every Order made needs to go through the purchasing department, hence the Supplier info will be assigned by the purchasing department.

Now the question is who initiates the Order? If this is also the purchasing department, then at order creation, the supplier info will be provided. If it's not (say Customer) then the above assumption is valid.
 
Ivan Pyshko
Greenhorn
Posts: 10
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gemstone.
Seems like the best option to create an assumption about where the supplier is coming from.
 
K. Tsang
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah Gemstone. I recall from previous posts regarding this assignment, the Order can be SellOrder and BuyOrder.

Supplier is dealing with BuyOrder. Anyway, you can assume the Supplier is known when the BuyOrder is created.
 
Ivan Pyshko
Greenhorn
Posts: 10
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Agree. This is the easiest solution. Thanks.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic