Example tasks

Piyawadee Sukaviriya ([email protected])
Fri, 5 May 1995 18:45:54 -0400 (EDT)

Guys,

I don't have any more time to work on the tasks description
more than what I have now. I want you to get at least something
to think about before you leave. So here is what I have.

Like I said, this might not be complete or accurate. My eyeballs
are rolling checking back and forth but there's so much my eyes can catch
in this format. I didn't even get to the point where I use propoer
object names from your presentation model. So use your imagination
somewhat. There are a number of (assumed) pre-defined techniques in here.

At the bottom of the file is the task mrl. I'm going to work
on it some more before I go to CHI. The task mrl might confuse
you some because I'm working on an idea of giving designers a
choice of separating techniques into a different structure
with a different control structure from the task sequence.
(Don't panick....I'll explain when I see you guys.)

So here it is. Just pay attention to the expressions if
nothing else makes sense.

See you in a few days.
--Noi

================e-mail.mtf===============================

// So here is the task break down
// Select-message
// Click-Message in header
//
// Forward-message
// Select-message (same as above)
// Invoke-Forward
// Select-Command-From-Menu
// Specify-Recipient
// Text-Edit-Technique
// Fill-in-Message
// Display-Message
// Modify-Text
// Forward
// Say-Done
// Invoke-Forward-Call
//
// Send-Message
// Invoke-Send
// Select-Command-From-Menu
// Specify-Recipient
// Text-Edit-Technique
// Fill-in-Message
// Add-Text
// Send
// Say-Done
// Invoke-Send-Method
//
// The object class Mail_message, Message_queue will be defined using the Application IDL
//
// Issues:
// In saying Object A : Task, we say object A is an instance of Task.
// In saying Object A : Object B, do we say B IS-LIKE A or do we say
// B is a copy of A. If the latter, can we say is-like
// in an mtf file.
//

Select-Message : Task {
parameters = message : Parameter {
type = Mail_message;
mode = produced; }
subtasks = :Task_Container {
tasks = :Click-Object {
preconditions = [The message header is displayed];
effects = [message = the message which the clicked on
object represents];
};
effects = [A global variable called SELECTED_MSG is set to message];
}; // Select-Message

// =++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Forward-Message : Task {
goal_description = "To forward a received message to a different recipient.";
task_label = "Forward Message";
parameters = message : Parameter {
type = Mail_message;
mode = consumed; },
recipient : Parameter {
type = text_string;
};
subtasks = :Task_Container {
Primary_Task_Order = sequential;
tasks = Select-Message, Invoke-Forward, Specify-Recipient,
Fill-in-Message, Invoke-Forward-Call;
};
preconditions = "[there is at least one message in the queue]";
is_reentrant = true;
is_interruptable = true;

}; // Forward-Message

// Here I will have to say
// Forward-Message/Select-Message is exactly the same tree as Select-Message
//

Invoke-Forward : Task {
goal = "Indicating that a message is to be forwarded.";
task_type = user;
subtasks = :Task_Container {
tasks = :Menu_Command { // Interaction_Technique
menu = Command-menu;
menu_item = Forward-menu-item;
effects = [display "Message forwarded"];
// Here we need a mechanism to talk to the pool
// and let it know we want the visual part to act
};
};
}; // Invoke-Forward

Specify-Recipient : Task {
goal_description= "Indicate who will receive the forwarded message."
task_type = user;
subtasks = : Task_Container {
tasks = :Text_Edit_Technique { // IT
text_field = forward-address-field;
};

};
effects = [recipient = forward-address-field.contents];
// This means the contents of the forward address field will
// get transferred to the parameter recipient.
}; // Specify-Recipient

Fill-in-message : Task {
goal_description = "To add to the forwarded message."
task_label = "Fill in the message"

subtasks = : Task_Container {
primary_order = sequential;
tasks = Display_message, Modify_text;
};

}; // Fill-in-message


Display-message : Task {
goal_description = "To display a message in a text editor.";
task_type = presentation;
preconditions = "[mail_interface.text_box.text = message.contents]";
// This is more like pre-processing....Can I do this?
}; // Display-message

Modify-Text : Text_Edit_Interactor {
goal_description = "Add to the forwarded message."
window = mail_interface.text_box;
is_loop = yes;
}; // Modify-Text

Forward : Task {
goal_description = "Finishing off the message to be forwarded.";
subtasks = :Task_Container {
primary_order = sequential;
tasks = Say-done, Invoke-Forward-Call;
};
}; // Forward

Say-Done : Command_Button_Technique {
goal_description = "Confirming that a message is ready to be forwarded.";
button = Forward-Done-button;
preconditions = [message.contents = mail_interface.text_box.contents];
// Again, this is like preprocessing.
}; // Say-Done

Invoke-Forward-Call : Application_Task {
goal_description = "To invoke the application routine which will forward a message."

designated_object = message;
routine_name = forward;
routine_parameters = { msg <- message,
to <- recipient}; // This is like assignment.
// Here I'm just inspired to use a different
// symbol....it seems a little different than
// just assigning values.
};

// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Send-Message : Task {
goal_description = "Create a new message and send it to someone.";
subtasks = :Task_Container {
primary_order = sequential;
tasks = Invoke-Send, Specify-Recipient, Fill-in-Message, Send;
};
}; // Send

// The next one is tricky. I just want to change something down the line.
Invoke-Send : Forward-Message/Invoke-Forward {
goal_description = "Indicate that a message is to be created and sent."
};

// Here can I say:

Send-Message/Invoke-Send.subtasks/:Menu_Command {
menu_item = Send-menu_item;
effects = [display "Message sent."];
}; // How do you like this?

Specify-Recipient : Forward-Message/Specify-Recipient {
goal_description= "Indicate who will receive the message."
subtasks = : Task_Container {
tasks = :Text_Edit_Technique { // IT
text_field = Send-address-field;
};

};
effects = [recipient = send-address-field.contents];
// This means the contents of the forward address field will
// get transferred to the parameter recipient.
};

Fill-in-Message : Forward-Message/Fill-in-Message {
};

Send-Message/Fill-in-Message/Display-message {
preconditions = []; // Nothing happens. Equal null.
};

Send : Task {
goal_description = "Sending the message.";
subtasks = :Task_Container {
primary_order = sequential;
tasks = Say-done, Invoke-Send-Call;
};
}; // Send

Say-Done : Command_Button_Technique {
goal_description = "Confirming that a message is ready to be forwarded.";
button = Send-OK-button;
preconditions = [message.contents = mail_interface.text_box.contents];
// Again, this is like preprocessing.
}; // Say-Done

Invoke-Send-Method : Application_Task {
goal_description = "To invoke the application routine which will send a message."

designated_object = GOD;
routine_name = send;
routine_parameters = { msg <- message,
to <- recipient};
// I made this one up for the time being.
};


===========================Task.mrl=============================

Object Expression;
Object Task_Container;
Object Techniques_Bag;

Enum Task_Parameter_Mode
"Mode of a task parameter" {
produced "The parameter is an output of the task",
consumed "The parameter is an input to the task",
both "The parameter is both input & output"
};

Enum Task_Type "Different types of tasks supported in the task model." {
user,
presentation,
application,
interaction_technique
};

Enum Primary_Task_Order
"This is the order in which a group of tasks must be performed." {
sequential,
alternatives,
Unrestricted
};

Enum Secondary_Task_Order
"When an ordered collection of task is specified as Unrestricted,
we need to define a secondary order whether these tasks can be done
in parallell or not." {
can_be_parallel,
must_be_parallel,
one_at_a_time
};

Object Parameter {
attribute label : string;
attribute type : string;
attribute mode : Task_Parameter_Mode;
};

Object Task {

attribute task_id : string;
attribute task_label : string;
attribute task_type : string;

attribute user_label : string;
attribute readable_description : string;

attribute goal_description : string;
attribute goal : Expression;

attribute task_parameters : collection<Parameter>;

attribute pre_conditions : Expression;
attribute effects : Expression;

attribute is_optional : boolean;
attribute is_resumable : boolean;
attribute is_interruptible: boolean;

attribute subtasks : Task_Container;
};

Object Task_Container {
attribute tasks : Collection<Task>;
attribute primary_order : Primary_Task_Order;
attribute secondary_order : Secondary_Task_Order;

attribute loop_condition : Expression;

// For future use -- the newest,experimental idea
attribute techniques : Technique_Bag;
};

Object Technique_Bag {
attribute techniques : Collection<Interaction_Technique>;
attribute primary_order : Primary_Task_Order;
attribute secondary_order : Secondary_Task_Order;

};

//==================================================================

Object Application_Task : Task {

attribute routine_name : string;
attribute routine_parameters : Collection<Parameter>;
atttribute designated_object : string; // Might be object id instead
atribute server_name : string;
};
//==================================================================

Object Interaction_Technique : Task {

// The parameters for this guy will be those which are
// specific to Amulet implementation.
// For a different platform, this part could vary
// depending on how we implement interaction techniques.
};