Is there a better way to model in UML?

advertisements

I am attempting to create a model that will allow me to capture the owners, users & assets in a given organization. I seem to have hit a stumbling block as I am unable to answer the questions below as well as uncertain whether I have modelled it correctly.

  1. How do I express ownership and user for a given asset?
  2. How do I express the ownership and use values for an object e.g. the server object has a vendor value of IBM and is owned by ABC Corp and is used by DEF user.
  3. Is there a way I can further decouple common attributes or properties e.g. name, location? Is there a need to further decouple this?
  4. How do I assess behavioural constraints e.g. what happens if a user leaves an organization or an asset is damaged? Where do I capture this information if not in the model?

Example of model

EDIT

Further to the answers I have updated my model. Not sure if it is going down the right path.


EDIT: Responding to OP comments:

Re. recording info on ownership etc. here's an example:

The key thing is that date acquired/sold etc. are attributes of the relationship between an Asset and an Organisation/User. They aren't attributes of the participating classes. In the example, Asset Use allows for many concurrent users whereas Asset Ownership only allows 1 owner at any given point. That's controlled by the multiplicity.

there is a requirement to display the owner as well as users. How would I show this seeing that the asset is not a subclass or subtype of the owner or user class?

Your display page would pull information from the necessary classes, following the relationship. A page isn't limited to showing info from a single class at a time.

For example the name attribute under owner would have the name of the organization however the name attribute under server would have the name of the server i.e. FQDN.

OK: then you could have different datatypes for the two names. Perhaps a simple String for Organisation and a specific FQDN for Asset. But remember: that means all Assets must be named using an FQDN. If only Computers are named with FQDN then put the name attribute on Computer, not Asset. As an aside: it's pretty common for organisations to have a naming scheme for assets that's independent of the type of asset. The only requirement is that it's unique. I've shown this in diag above for example. hth.

End Edit

Answering your specific questions:

How do I express ownership [..] for a given asset?

Presumably that's what the Organisation - Asset Association covers? If so, what's the multiplicity? Presumably:

  • Each Asset is owned by exactly one Organisation Or can an asset be jointly owned?
  • Each Organisation owns many (zero or more) assets?
  • Do you need to record any info about the ownership - for example, when the asset was acquired, when it was sold, etc. If so you'll need an association class to capture that.

How do I express user for a given asset?

Similar questions to above. Can many users use the same asset? Concurrently or sequentially? Do you need to record start/end dates for asset use?

How do I express the [..] server object has a vendor value of IBM

You have this modelled with the Asset.vendor attribute - which may be sufficient. However: do you need to capture any details for Vendors? e.g. contact info, address, support contracts, etc. If so you'll likely need to split out a separate Vendor class.

Is there a way I can further decouple common attributes or properties e.g. name, location? Is there a need to further decouple this?

All 3 sub-classes have the same attributes. That smells bad - it suggests they aren't really different. Could you use one class (Asset) that captures all attributes - and has an extra "assetType" (or similar) with legal values "Server", "Destop", "Laptop"? However: do you need to track assets that aren't computers of some type? If so a single Asset class isn't flexible enough.

How do I assess behavioural constraints e.g. what happens if a user leaves an organization or an asset is damaged?

Depends on your business requirement. What needs to happen if a user leaves? Should the asset simply have no Users? In which case the relationship needs to be optional (0..*).

What does it mean for an asset to be damaged? Do you need to record the damages? If so you need another class.

Where do I capture this information if not in the model?

If it's not in the model you can't record or change it. So I'd be very wary of anything you think you need to capture that's not in the model. More likely it means your model is incomplete and/or you're missing requirements.

Generally I'd recommend you put some further thought into the naming & multiplicity of the associations. Doing so will undoubtedly raise questions about the requirements and/or domain constraints. That'll help you get a model that stands a much better chance of meeting the requirements.

hth.