質問

I'm trying to build a state diagram derived from the class diagram for the Support Manager Class.

Here is the class diagram (reputation <10 so can only provide link):

http://i.imgur.com/3wFO9Gu.png

This is the state diagram that I have constructed so far: http://i.imgur.com/vBTyTLX.png

I'm not sure if this is correct. But the state diagram should represent the Manager class and the manager class is supposed to:

  • Allocate 'resource' to employees
  • Be able to update the resource to employees
  • View the outstanding job for an employee
  • allocate a technician to a job
  • update the system information
  • notify employee that the job has been complete - (technician fixes problem and the job is confirmed by manager).

Is this possible to represent on one state diagram? Or would this require several? Is the diagram correct in the representation of how the manager deals with a resource problem raised by an employee?

役に立ちましたか?

解決

  • You can't derive state diagram from a class diagram. For behaviour is not defined by structure.
  • But you can create a state diagram for explanation in addition to a class diagram.
  • Principally your state diagram is OK. But:
    • you have obvious errors in its lower part - you are doubling the choice confirm/reject there.
    • It is a STATE diagram? Where are states? You have mixed actions (arrows) and states (rounded rectangles) so, that you have only actions. If you want to describe actions instead of states, you really need activity diagram.
  • You can create a state diagram for modelling Manager behaviour. But it has sense only if you are thinking of it in terms of states and events/actions.

他のヒント

for me what you want to represent seem to be an Activity diagram more than a State diagram because, for me, you describe more a working process than states.

It should be feasible to represent your behavior in one unique diagram (if it is still comprehensible).
You are the only which cant tell if your representation is fine, but maybe could you add link (call) to your method!?

The state diagram is definitelly not the adequate tool to show Manager's activity. The reasons are many, I'll give you just one - Manager can have several "threads" of the "workflow" represented by this state diagram - one job can be in the "pending" state, another in "confirmation", etc.

Therefore this workflow would rather define the class "Job", than the Manager. You could review the multiplications on this class, as not all liks are established on the Job class creation.

The responsabilities of the Manager (that you listed) could be modelled by methods on the class and their sequenceby an activity diagram.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top