简体   繁体   中英

UML Use Cases: how to model a "batch" feature?

Should a batch scheduled process (for example, a nightly process) be modeled as a Use Case? it is something the system should do, but there is not an Actor "using" the feature, because it is scheduled.

Any suggestions? Thanks!

We've defined a 'Scheduler' actor to model that scenario. The Scheduler usually has its own set of use cases which are batch jobs, or executables that need to run regularly, etc. For example, the Use Case can be written like "The Use Case begins when the current time is on the hour" for a job that runs 24 times a day. We try not to include too many of these cases because it is too easy to get bogged down into implementation details. We wait until really important activities have to be timed, like monthly close procedures for the accounting department. They don't mention any software specifics (like the name of the scheduling software), just that the Use Case is triggered by the Scheduler actor on a given day and/or time.

First attempt:

Time can be actor in your use case.

But as you said it is strange as an primary actor.

在此处输入图像描述

You can think a human alternative. So ask yourself:

System automatically do a batch scheduled process but: when? how? ... So WHO will tell the system when? how? to do you scheduled process? Is there a role which configure a batch scheduled process? If so..

Second Attempt:

在此处输入图像描述

There is a good article at IBM site Dear Dr. Use Case: Is the Clock an Actor?

And you can check similiar question at Is TIME an actor in a use case?

The system (OS) its the "actor":

http://en.wikipedia.org/wiki/Actor_%28UML%29

In UML, an "Actor" is not just a person, can be a process or the OS, you just add an stereotype, indicating its "system".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM