Comp150CPA: Clouds and Power-Aware Computing
Classroom Exercise 19
Event/Condition/Action Modeling
Spring 2011

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.

  1. 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.
    Answer:
     
         customer        manager        staff        manager            billing
         requests        assigns        reports      notes              sends 
         cleaning        staff          completion   completion         bill
    [start]------>[queued]------>[pending]------>[done]------>[accounted]------>[billed]
                                    | staff reports not completed
                                    v
                                [skipped] 
    
  2. Describe the profiles for people in the scenerio above and what they should be able to do.
    Answer:
  3. 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 boolean flags:
  4. (Advanced) 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?
    Answer: 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.