%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % File: process.db 6/24/2002 % This file is used by the business model simulator. :- multifile class/2. /******** % Provider_role/Receiver_role is only applicable to communication process process/10 process(Instance, Process/ID, Status, Priority, Begin_time/End_time, Time_cost, (Provider/Provider_type, Receiver/Receiver_type), Event, Precond, Action, Postcond). Process/ID = Process_name/Process_id, both are unique given by the BPM. Process_id is a shorthand reference. Status = created, triggered, executing, finished, suspended, reinstated, cancelled. Priority = high, medium, low Event = [true], or a list of triggers. Precond = [true], or a list of precond. Action = [true], or a list of actions. Postcond = [true], or a list of preconditions. Note: in the current implementation, each process may or may not have a trigger. --------------------- process_status_list([created, triggered, finished, suspended, reinstated, cancelled]). process_status(created, triggered). process_status(created, suspended). process_status(created, cancelled). process_status(triggered, finished). process_status(triggered, suspended). process_status(triggered, cancelled). process_status(suspended, reinstated). process_status(reinstated, triggered). ----------------------------------------------------------------------- event/7 event(Instance, Event_type, Status, Priority, Begin_time/End_time, (Provider/Provider_type, Receiver/Receiver_type), Event_content). Status = received/[], - when the event arrives processed/ProcessID_list, - An event has been dealt with, after a process is finished, its ID is added to the list finished/ProcessID_list, - when reached the end-junction suspended/ProcessID_list, cancelled/ProcessID_list. A ProcessID is a variable, it is the ID of the process type. Event_content = list, the details about the event. This content is flexible and may content any information necessary. received -> processed received -> suspended received -> cancelled processed -> finished processed -> suspended processed -> cancelled suspended -> reinstated reinstated -> processed ----------------------------------------------------------------------- issue/6 issue(Instance, Issue, Status, Priority, Begin_time/End_time, Issue_content). Issue_content = list, the details about the issue. This content is flexible and may content any information necessary. *************/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Process 1. process(Instance, 'Obtain User Requirements'/1, created, Priority, Begin_time/End_time, 1, (Provider/Provider_type, edinburgh/pc_specification), [event_occ(Instance, customer_request_for_pc_specification, received/_, Priority, Begin_time/End_time, (Provider/Provider_type, Receiver/pc_specification), Event_content) ], [true], [cond_action([not_exist(instance_of(Provider, Provider_type))], [create(instance_of(Provider, Provider_type))] ) ], [exist(entity_occ(Ent, customer, Att)) ] ). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Process 2. process(Instance, 'Post Technical Constraint'/2, created, Priority, Begin_time/End_time, 2, (Provider/Provider_type, Receiver/pc_specification), [true], [event_occ(Instance, customer_request_for_pc_specification, processed/List, Priority, %% p1 finished processing Begin_time/End_time, (Provider/Provider_type, Receiver/Receiver_type), Event_content) ], [ get_issue_content(New_issue_content), post_issue( (Provider/Provider_type, Receiver/Receiver_type), issue(Instance, solve_technical_constraint, processed/List, Priority, Begin_time/End_time, New_issue_content )) ], [] ). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % process 3 process(Instance, 'Receive Technical Constraint'/3, created, Priority, Begin_time/End_time, 1, (Provider/Provider_type, Receiver/pc_specification), [true], [post_issue( (Provider/Provider_type, Receiver/Receiver_type), issue(Instance, solve_technical_constraint, processed/List, Priority, Begin_time/End_time, New_issue_content )) ], [ cond_action([not_exist(instance_of(Instance, spec_for_enq))], [create(instance_of(Instance, spec_for_enq))]), cond_action([not_exist(instance_att((Instance, spec_for_enq), solution, _))], [create(instance_att((Instance, spec_for_enq), solution, New_issue_content))] ), cond_action([exist(instance_att((Instance, spec_for_enq), solution, _))], [update(instance_att((Instance, spec_for_enq), solution, New_issue_content))]) ], [] ). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % process 4 process(Instance, 'Check Cost'/4, created, Priority, Begin_time/End_time, 1, (Provider/Provider_type, Receiver/pc_specification), [true], [instance_att( (Instance, spec_for_enq), solution, Solution )], [check_cost(Solution) ], [] ). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%