Index: openacs-4/contrib/packages/simulation/test/demo-data.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/test/Attic/demo-data.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/simulation/test/demo-data.tcl 7 Jan 2004 16:16:06 -0000 1.1 +++ openacs-4/contrib/packages/simulation/test/demo-data.tcl 8 Jan 2004 11:27:38 -0000 1.2 @@ -1,33 +1,48 @@ -set actors_list { - Teacher - Student - Agent1 - Agent2 +# Procs returning demo data. +# +# Procs to support the Tclwebtest (HTTP level) testing and demo data setup +# of the simulation package. +# +# @author Peter Marklund + +namespace eval ::twt::simulation {} +namespace eval ::twt::simulation::data {} + +ad_proc ::twt::simulation::data::actors {} { + return { + Teacher + Student + Agent1 + Agent2 + } } -array set characters { - Bernadette "Bernadette" - MOTORHOME "MOTORHOME" - "A of Lawfirm X" "Her lawyer" - "A of Lawfirm Y" "Its lawyer" - "B of Lawfirm X" "Partner firm X" - "B of Lawfirm Y" "Partner firm Y" - "C of Lawfirm X" "Secretary firm X" - "C of Lawfirm Y" "Secretary firm Y" - "Portal" "Library" - "Lok of Legisl. Dept." "Member 1 of Legisl. Dept." - "Peter of Legisl. Dept." "Member 2 of Legisl. Dept." - "Aernout of Legisl. Dept." "Head of Legisl. Dept." - "Jeroen of Legisl. Dept." "Deputy Head of Legisl. Dept." - "Laurens of Legisl. Dept." "Chief of Legisl. Dept." - "Fred Undraiser" "Fundraiser" - "A of ADC" "Representative of ADC" - "Minister" "Minister of Justice" - "General Student" "Student" +ad_proc ::twt::simulation::data::characters {} { + return { + Bernadette "Bernadette" + MOTORHOME "MOTORHOME" + "A of Lawfirm X" "Her lawyer" + "A of Lawfirm Y" "Its lawyer" + "B of Lawfirm X" "Partner firm X" + "B of Lawfirm Y" "Partner firm Y" + "C of Lawfirm X" "Secretary firm X" + "C of Lawfirm Y" "Secretary firm Y" + "Portal" "Library" + "Lok of Legisl. Dept." "Member 1 of Legisl. Dept." + "Peter of Legisl. Dept." "Member 2 of Legisl. Dept." + "Aernout of Legisl. Dept." "Head of Legisl. Dept." + "Jeroen of Legisl. Dept." "Deputy Head of Legisl. Dept." + "Laurens of Legisl. Dept." "Chief of Legisl. Dept." + "Fred Undraiser" "Fundraiser" + "A of ADC" "Representative of ADC" + "Minister" "Minister of Justice" + "General Student" "Student" + } } -array set characters_ld { - "Lok of Legisl. Dept." "Member 1 of Legisl. Dept." +ad_proc ::twt::simulation::data::characters_ld {} { + return { + "Lok of Legisl. Dept." "Member 1 of Legisl. Dept." "Peter of Legisl. Dept." "Member 2 of Legisl. Dept." "Aernout of Legisl. Dept." "Head of Legisl. Dept." "Jeroen of Legisl. Dept." "Deputy Head of Legisl. Dept." @@ -36,14 +51,18 @@ "A of ADC" "Representative of ADC" "Minister" "Minister of Justice" "General Student" "Student" + } } -array set properties { - "Demo Property 1" "Demo Property 1" - "Demo Property 2" "Demo Property 2" +ad_proc ::twt::simulation::data::properties {} { + return { + "Demo Property 1" "Demo Property 1" + "Demo Property 2" "Demo Property 2" + } } -array set tasks { +ad_proc ::twt::simulation::data::tasks {} { + return { "Ask information from Bernadette" {assigned_role "Her lawyer" recipient_role "Bernadette"} "Ask information from MOTORHOME" {assigned_role "Her lawyer" recipient_role "MOTORHOME"} "Ask information from opponent's lawyer 1" {assigned_role "Its lawyer" recipient_role "Her lawyer"} @@ -59,9 +78,11 @@ "Give information to opponent's lawyer" {assigned_role "Her lawyer" recipient_role "Its lawyer"} "Send final report" {assigned_role "Her lawyer" recipient_role "Partner firm X"} "Send draft report" {assigned_role "Her lawyer" recipient_role "Partner firm X"} + } } -array set tasks_ld { +ad_proc ::twt::simulation::data::tasks_ld {} { + return { "Write Proposal gr1" {assigned_role "Member 1 of Legisl. Dept." recipient_role "Head of Legisl. Dept."} "Write Proposal gr2" {assigned_role "Member 2 of Legisl. Dept." recipient_role "Deputy Head of Legisl. Dept."} "Write Opinion SHOULD BE AN ADDINFOTOPORTFOLIO gr1" {assigned_role "Fundraiser" recipient_role "Minister of Justice"} @@ -82,4 +103,139 @@ "Implementation of all received comments and opinions SHOULD BE AN ADDINFOTOPORTFOLIO gr2" {assigned_role "Member 2 of Legisl. Dept." recipient_role "Minister of Justice"} "Write law SHOULD BE AN ADDINFOTOPORTFOLIO gr1" {assigned_role "Member 1 of Legisl. Dept." recipient_role "Minister of Justice"} "Write law SHOULD BE AN ADDINFOTOPORTFOLIO gr2" {assigned_role "Member 1 of Legisl. Dept." recipient_role "Minister of Justice"} -} + } +} + +ad_proc ::twt::simulation::data::tilburg_template_spec {} { + return "simulatie_tilburg { + description {Use case 1 template from Leiden team.} + description_mime_type text/enhanced + object_type acs_object + package_key simulation + pretty_name { + Simulation Tilburg + } + roles { + lawyer { + pretty_name Lawyer + } + client { + pretty_name Client + } + other_lawyer { + pretty_name { + Other lawyer + } + } + other_client { + pretty_name { + Other client + } + } + mentor { + pretty_name Mentor + } + secretary { + pretty_name Secretary + } + } + actions { + initialize { + initial_action_p t + new_state started + pretty_name Initialize + attachment_num 0 + } + ask_client { + assigned_role lawyer + assigned_states started + new_state open + pretty_name { + Ask client + } + attachment_num 1 + recipient_role client + } + ask_client_for_more_information { + assigned_role lawyer + enabled_states open + pretty_name {Ask Client for more information} + attachment_num 1 + recipient_role client + } + consult_lawyer { + assigned_role lawyer + enabled_states open + pretty_name { + Consult lawyer + } + attachment_num 1 + recipient_role other_lawyer + } + visit_the_library { + assigned_role lawyer + enabled_states open + pretty_name {Visit the library} + attachment_num 0 + recipient_role lawyer + } + consult_mentor { + assigned_role lawyer + enabled_states open + pretty_name { + Consult mentor + } + attachment_num 1 + recipient_role mentor + } + mentor_intervenes { + assigned_role mentor + enabled_states open + pretty_name { + Mentor intervenes + } + attachment_num 1 + recipient_role lawyer + } + consult_secretary { + assigned_role lawyer + enabled_states open + pretty_name { + Consult secretary + } + attachment_num 1 + recipient_role secretary + } + write_legal_advice { + assigned_role lawyer + assigned_states open + new_state written + pretty_name {Write legal advice} + attachment_num 1 + recipient_role secretary + } + correct_spell_check_etc { + assigned_role secretary + enabled_states written + new_state done + pretty_name {Correct, spell-check, etc.} + attachment_num 1 + recipient_role client + } + } + states { + started { + pretty_name Started + } + open { + pretty_name Open + } + written { + pretty_name Written + } + done { + pretty_name Done + } + } +}" +}