Re: [concern-users] Best way to approach subject history
Brought to you by:
hengels,
leonchiver
|
From: Andy D. <an...@ma...> - 2005-05-05 23:17:25
|
What do you think of this proposal?
Modify org.concern.Log by adding these methods:
void setAnnotation(String name, String value);
String getAnnotation(String name);
Iterator iterateAnnotationKeys();
And for Hibernate's sake:
Map getAnnotations();
void setAnnotations(Map annotations);
The same modification will have to be made to org.concern.controller.Log. If
I understand the source properly, the same modification will have to be made
to org.concern.controller.Archive as well.
Next, modify the hibernate mapping to accommodate the attributes map (note,
the reason I'm limiting it to String keys and String values is to simplify
the Hibernate mapping).
Next, add these methods to the Controller:
boolean complete(String userValue, String activityName, Map /* <String,
String> */ logAnnotations);
? any other suggestions ?
If we want the ability to annotate a log entry after it has already been
created, then we will need the ability to uniquely identify a particular log
entry from the client side - probably by adding the Log's id to
org.concern.Log.
Another thought I had was to add annotations to org.concern.controller.Subject
(just like above), and provide methods for accessing those annotations (or
the Subject instance) from Activities or client code. Then, when a Log (and
later an Archive) is made from the Activity, copy a snapshot of the subject's
annotations to the Log. Client code could then annotate the subject even
during the course of completing an activity. For example, if a supervisor
sent a request back to a user for correction, the client UI could prompt the
supervisor to provide a reason for the need to correct the entry and annotate
the subject with that note. When the subject is later reviewed by the user,
he/she will be able to review the note and correct the subject. In this
example, we have a sequence of activities like this:
1. User submits the subject.
2. Supervisor reviews the subject and sends it back for correction
3. User reviews Supervisor's comments, makes corrections, and resubmits the
subject.
Now I'll present the same sequence again, only include details on how
annotations might be handled:
1. User submits the subject.
- Client code sets the annotation "user" to the user's id.
- The activity completes, and the annotations are copied into the Log.
The Log entry now contains the user id of the user who submitted the subject.
2. Supervisor reviews the subject and sends it back for correction.
- Client code sets the annotation "user" to supervisor's id.
- Client code sets the annotation "comments" to the supervisor's comments.
- The activity completes, and the annotations are copied into the Log.
The Log entry now contains the user id of the supervisor who rejected the
entry and the supervisor's comments.
3. User reviews Supervisor's comments, makes corrections, and resubmits the
subject.
- Client code can retrieve the current annotations for the subject (as
they stand now) and see the supervisor's comments, and also who the
supervisor was (via the user id).
- Client code can also look through the log and see the history of
activities performed against the subject, including the annotations as they
existed at the time each of those activities completed.
- User modifies the subject.
- Client code sets the annotation "user" to the user's id.
- The activity completes, and the annotations are copied into the Log.
You get the idea. Basically, the subject will always contain a "current"
snapshot of the annotations (much like CVS-HEAD :) ), while the Log will
contain the history of annotations against the subject. If a subject had
been sent back for correction several times, the user could see the
supervisor's comments for every time the supervisor sent the subject back for
correction. The system also knows which user was involved in each activity.
Of course, this is only an example and there are other applications for this.
Let me know what you think,
Andy
On Thursday 05 May 2005 01:44 pm, Holger Engels wrote:
> not yet .. though this would be a valuable addition.
>
> Quoting Andy Depue <an...@ma...>:
> > I notice that Con:cern keeps a log of activity against a subject, which
> > is great. I would like to record additional information, such as who
> > performed
> >
> > the activity, etc. Would the best approach be to record that information
> > myself apart from con:cern, or does con:cern already provide some
> > mechanism
> >
> > to record additional information in relation to the log or an activity
> > performed?
> >
> > Thanks,
> > Andy
|