Comp150CPA: Clouds and Power-Aware Computing
Classroom Exercise 19
group member 1: ____________________________ login: ______________
group member 2: ____________________________ login: ______________
group member 3: ____________________________ login: ______________
group member 4: ____________________________ login: ______________
group member 5: ____________________________ login: ______________
In class we described Event/Condition/Action modeling as the basis
for use of Free Force.com. Let's explore this more.
- Suppose a business sells cleaning services. A customer asks for
a cleaning job on a specific day, after which a manager assigns a staff
member to do the job. The staff member either does the cleaning and
fills out a time card, or does not show up and reports the task as not
done. The manager bills the customer, as appropriate, after which
the billing department sends a bill. Model the state transitions
for one job as an ECA state transition diagram.
customer manager staff manager billing
requests assigns reports notes sends
cleaning staff completion completion bill
| staff reports not completed
- Describe the profiles for people in the scenerio above and what
they should be able to do.
- The customer should be able to submit a request.
- The manager should be able to assign a request to a staff member,
and to mark the job as completed.
- The staff member should be able to mark the job as completed or skipped.
- The billing department should be able to mark the job as billed.
- Describe a data format for a job with appropriate state information
to maintain state and allow each profile to change state
appropriately without interfering with the state changes for other profiles.
Answer: Following the pattern in lecture, we need several
- assigned (manager) : whether job has been assigned or not.
- done (staff): whether the job is completed.
- skipped (staff): whether the job has been skipped.
- billable (manager) : whether the job is billable.
- billed (billing) : whether the job has been billed.
It is possible to specify a datatype that has a limited list of
options, e.g., one could define a variable "state" that only takes the
values "accepted", "scheduled", "done", "paid", etc.
In a profile-based access scheme, is this a good idea? Why or why not?
The problem with this is that then one state variable must be
accessible to several profiles, so that people can undo (or mistakenly
skip) signoff steps of other people. If we had one state variable in
the above scenerio, e.g., the billing department could bill the job
without signoff from the manager. As discussed in lecture, this is a
breakdown of regularized processes that are mandated by law for
businesses of sufficient size.