% File: process.db % 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), Trigger, 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 Trigger = [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. ----------------------------------------------------------------------- trigger/7 trigger(Instance, Trigger, Status, Priority, Begin_time/End_time, (Provider/Provider_type, Receiver/Receiver_type), Trigger_content). Status = received/[], - when the trigger 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. Trigger_content = list, the details about the trigger. 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. /* e.g. WF engine needs to do after the process have been triggered. update(trigger(Instance, customer_request_for_pc_specification, processed/1, Priority, %% p1 finished processing Begin_time/End_time, (Provider/Provider_type, edinburgh/pc_specification), Trigger_content) ). */ process(Instance, 'Obtain User Requirements'/1, created, Priority, Begin_time/End_time, 1, (Provider/Provider_type, edinburgh/pc_specification), [trigger(Instance, customer_request_for_pc_specification, received, Priority, Begin_time/End_time, (Provider/Provider_type, Receiver/pc_specification), Trigger_content) ], [exist(entity(Ent, person, Att)); exist(entity(Ent, business, Att)) ], [create(entity(Ent, customer, Att))], [exist(entity(Ent, customer, Att)) ] ). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Process 2. process(Instance, 'Construct Basic Specification'/2, created, Priority, Begin_time/End_time, 1, (Provider/Provider_type, Receiver/pc_specification), [trigger(Instance, customer_request_for_pc_specification, processed/_, Priority, %% p1 finished processing Begin_time/End_time, (Provider/Provider_type, Receiver/Receiver_type), Trigger_content), [true], [construct_specification( trigger(Instance, customer_request_for_pc_specification, processed/2, Priority, Begin_time/End_time, (Provider/Provider_type, Receiver/Receiver_type), Trigger_content) ) ], [exists(Solution(Provider, _, _, _, _)) ] ). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % process 3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%