--Goal oriented Pattern Family Framework for Business Process Modeling / Saeed Ahmadi Behnam --Modify the PATH in the following to point ot metamodle (e.g., C:/USE_OCL/GoPF_FMM ) reset open PATH !create pf : PF !set pf.name := 'HealthcarePF' !create p1 : Pattern !create p2 : Pattern !create p3 : Pattern !set p1.name := 'IncreasePatientSafetyPattern' !set p2.name := 'CollectDataPattern' !set p3.name := 'CollectOutputDataPattern' !insert (pf,p1) into hasPattern !insert (pf,p2) into hasPattern !insert (pf,p3) into hasPattern !create g1 : GoalModelBB !create g2 : GoalModelBB !create g3 : GoalModelBB !insert (p1,g1) into hasGMBB !insert (p2,g2) into hasGMBB !insert (p3,g3) into hasGMBB !set g1.name := 'IncreasePatientSafetyGoalModelBB' !set g2.name := 'CollectDataGoalModelBB' !set g3.name := 'CollectOutputDataGoalModelBB' !create I : Intention !create C : Intention !create G : Intention !create M : Intention !create A : Intention --Modification !create T2 : Intention !set T2.name := 'TakeAction' !set T2.leaf := true !set T2.mainGoal := false --End of Modification !create C2 : Intention !create O : Intention !create P : Intention !create O2 : Intention !create L : Intention !create N : Intention !create R : Intention !set I.name := 'IncreasePatientSafety' !set I.leaf := false !set I.mainGoal := true !set C.name := 'CollectData' !set C.leaf := true !set C.mainGoal := false !set G.name := 'GenerateInformativeOI' !set G.leaf := true !set G.mainGoal := false !set M.name := 'MakeSafetyDecision' !set M.leaf := true !set M.mainGoal := false !set A.name := 'AdoptDecision' !set A.leaf := true !set A.mainGoal := false !set C2.name := 'CollectData' !set C2.leaf := false !set C2.mainGoal := true !set O.name := 'CollectOutcomeData' !set O.leaf := true !set O.mainGoal := false !set P.name := 'CollectProcessData' !set P.leaf := true !set P.mainGoal := false !set O2.name := 'CollectOutcomeData' !set O2.leaf := false !set O2.mainGoal := true !set L.name := 'LookforOutcome' !set L.leaf := true !set L.mainGoal := false !set N.name := 'AnalyseObservation' !set N.leaf := true !set N.mainGoal := false !set R.name := 'RecordOutcome' !set R.leaf := true !set R.mainGoal := false !insert (g1,I) into hasIntention !insert (g1,C) into hasIntention !insert (g1,G) into hasIntention !insert (g1,M) into hasIntention !insert (g1,A) into hasIntention !insert (g2,C2) into hasIntention !insert (g2,O) into hasIntention !insert (g2,P) into hasIntention !insert (g3,O2) into hasIntention !insert (g3,L) into hasIntention !insert (g3,N) into hasIntention !insert (g3,R) into hasIntention --Modification !insert (g1,T2) into hasIntention --End of Modification !create bs1_1 : BusinessStrategy !create bs1_2 : BusinessStrategy !create bs2_1 : BusinessStrategy !create bs2_2 : BusinessStrategy !create bs2_3 : BusinessStrategy !create bs3_1 : BusinessStrategy !create bs3_2 : BusinessStrategy --Modification !create bs1_3 : BusinessStrategy --End of Modification !set bs1_1.name := 'BasicImprovement' !set bs1_2.name := 'AdvancedImprovement' !set bs2_1.name := 'BasicOutcome' !set bs2_2.name := 'BadicProcess' !set bs2_3.name := 'CompleteCollection' !set bs3_1.name := 'BasicRecoding' !set bs3_2.name := 'PreprocessedRecording' --Modification !set bs1_3.name := 'AdvancedWithImmediateAction' --End of Modification !insert (p1,bs1_1) into hasBizStrategy !insert (p1,bs1_2) into hasBizStrategy !insert (p2,bs2_1) into hasBizStrategy !insert (p2,bs2_2) into hasBizStrategy !insert (p2,bs2_3) into hasBizStrategy !insert (p3,bs3_1) into hasBizStrategy !insert (p3,bs3_2) into hasBizStrategy --Modification !insert (p1,bs1_3) into hasBizStrategy --End of Modification !create s1_1 : EvaluationStrategy !create s1_2 : EvaluationStrategy !create s2_1 : EvaluationStrategy !create s2_2 : EvaluationStrategy !create s2_3 : EvaluationStrategy !create s3_1 : EvaluationStrategy !create s3_2 : EvaluationStrategy --Modification !create es1_3 : EvaluationStrategy --End of Modification !set s1_1.name := 'BasicImprovement' !set s1_2.name := 'AdvancedImprovement' !set s2_1.name := 'BasicOutcome' !set s2_2.name := 'BadicProcess' !set s2_3.name := 'CompleteCollection' !set s3_1.name := 'BasicRecoding' !set s3_2.name := 'PreprocessedRecording' --Modification !set s1_3.name := 'AdvancedWithImmediateAction' --End of Modification !insert (bs1_1,s1_1) into hasEvalStrategy !insert (bs1_2,s1_2) into hasEvalStrategy !insert (bs2_1,s2_1) into hasEvalStrategy !insert (bs2_2,s2_2) into hasEvalStrategy !insert (bs2_3,s2_3) into hasEvalStrategy !insert (bs3_1,s3_1) into hasEvalStrategy !insert (bs3_2,s3_2) into hasEvalStrategy --Modification !insert (bs1_3,s1_3) into hasEvalStrategy --End of Modification !create bpt1_1 : BusinessProcessBB !create bpt1_2 : BusinessProcessBB !create bpt2_1 : BusinessProcessBB !create bpt2_2 : BusinessProcessBB !create bpt2_3 : BusinessProcessBB !create bpt3_1 : BusinessProcessBB !create bpt3_2 : BusinessProcessBB --Modification !create bpt1_3 : BusinessProcessBB --End of Modification !set bpt1_1.name := 'BasicImprovement' !set bpt1_2.name := 'AdvancedImprovement' !set bpt2_1.name := 'BasicOutcome' !set bpt2_2.name := 'BadicProcess' !set bpt2_3.name := 'CompleteCollection' !set bpt3_1.name := 'BasicRecoding' !set bpt3_2.name := 'PreprocessedRecording' --Modification !set bpt1_3.name := 'AdvancedWithImmediateAction' --End of Modification !insert (bs1_1,bpt1_1) into hasBPBB !insert (bs1_2,bpt1_2) into hasBPBB !insert (bs2_1,bpt2_1) into hasBPBB !insert (bs2_2,bpt2_2) into hasBPBB !insert (bs2_3,bpt2_3) into hasBPBB !insert (bs3_1,bpt3_1) into hasBPBB !insert (bs3_2,bpt3_2) into hasBPBB --Modification !insert (bs1_3,bpt1_3) into hasBPBB --End of Modification -- elements of BPBB (UCM maps) are created and assigned to BusinessProcessBBs !create CPs1_1 : ProcessElement !create GPs1_1 : ProcessElement !set CPs1_1.name := 'CollectingData' !set GPs1_1.name := 'GeneratingInformativeOI' !insert (bpt1_1,CPs1_1) into hasPE !insert (bpt1_1,GPs1_1) into hasPE !create CPs1_2 : ProcessElement !create GPs1_2 : ProcessElement !create MPs1_2 : ProcessElement !create APs1_2 : ProcessElement !set CPs1_2.name := 'CollectingData' !set GPs1_2.name := 'GeneratingInformativeOI' !set MPs1_2.name := 'MakingDecision' !set APs1_2.name := 'ApplyingKnowledge' !insert (bpt1_2,CPs1_2) into hasPE !insert (bpt1_2,GPs1_2) into hasPE !insert (bpt1_2,MPs1_2) into hasPE !insert (bpt1_2,APs1_2) into hasPE --Modification !create CPs1_3 : ProcessElement !create GPs1_3 : ProcessElement !create MPs1_3 : ProcessElement !create APs1_3 : ProcessElement !create T2Ps1_3 : ProcessElement !set CPs1_3.name := 'CollectingData' !set GPs1_3.name := 'GeneratingInformativeOI' !set MPs1_3.name := 'MakingDecision' !set APs1_3.name := 'ApplyingKnowledge' !set T2Ps1_3.name := 'TakingAction' !insert (bpt1_3,CPs1_3) into hasPE !insert (bpt1_3,GPs1_3) into hasPE !insert (bpt1_3,MPs1_3) into hasPE !insert (bpt1_3,APs1_3) into hasPE !insert (bpt1_3,T2Ps1_3) into hasPE --End of Modification !create OPs2_1 : ProcessElement !set OPs2_1.name := 'CollectingOutcomeData' !insert (bpt2_1,OPs2_1) into hasPE !create PPs2_2 : ProcessElement !set PPs2_2.name := 'CollectingProcessData' !insert (bpt2_2,PPs2_2) into hasPE !create OPs2_3 : ProcessElement !create PPs2_3 : ProcessElement !set OPs2_3.name := 'CollectingOutcomeData' !set PPs2_3.name := 'CollectingProcessData' !insert (bpt2_3,OPs2_3) into hasPE !insert (bpt2_3,PPs2_3) into hasPE !create LPs3_1 : ProcessElement !create RPs3_1 : ProcessElement !set LPs3_1.name := 'LookingforOutcome' !set RPs3_1.name := 'RecordingOutcome' !insert (bpt3_1,LPs3_1) into hasPE !insert (bpt3_1,RPs3_1) into hasPE !create LPs3_2 : ProcessElement !create NPs3_2 : ProcessElement !create RPs3_2 : ProcessElement !set LPs3_2.name := 'LookingforOutcome' !set NPs3_2.name := 'AnalysingObservation' !set RPs3_2.name := 'RecordingOutcome' !insert (bpt3_2,LPs3_2) into hasPE !insert (bpt3_2,NPs3_2) into hasPE !insert (bpt3_2,RPs3_2) into hasPE -- Intention Realization !insert (C,CPs1_1) into realized !insert (G,GPs1_1) into realized !insert (C,CPs1_2) into realized !insert (G,GPs1_2) into realized !insert (M,MPs1_2) into realized !insert (A,APs1_2) into realized --Modification !insert (C,CPs1_3) into realized !insert (G,GPs1_3) into realized !insert (M,MPs1_3) into realized !insert (A,APs1_3) into realized !insert (T2,T2Ps1_3) into realized --End of Modification !insert (O,OPs2_1) into realized !insert (P,PPs2_2) into realized !insert (O,OPs2_3) into realized !insert (P,PPs2_3) into realized !insert (L,LPs3_1) into realized !insert (R,RPs3_1) into realized !insert (L,LPs3_2) into realized !insert (N,NPs3_2) into realized !insert (R,RPs3_2) into realized -- Intention Pattern Linking !insert (C,p2) into define !insert (O,p3) into define -- Inserting New Pattern (xp) !create xp : Pattern !set xp.name := 'DecreaseOutcomePattern' !insert (pf,xp) into hasPattern !create xg : GoalModelBB !set xg.name := 'DecreaseOutcome' !create T : Intention !create Z : Intention !create V : Intention !set T.name := 'TakeAction' !set T.leaf := false !set T.mainGoal := true !set Z.name := 'PrioritizeOutcomes' !set Z.leaf := true !set Z.mainGoal := false !set V.name := 'PreventOutcome' !set V.leaf := true !set V.mainGoal := false !insert (xg,T) into hasIntention !insert (xg,Z) into hasIntention !insert (xg,V) into hasIntention !insert (xp, xg) into hasGMBB !create bs4_1 : BusinessStrategy !create bs4_2 : BusinessStrategy !set bs4_1.name := 'ImmediatePrevention' !set bs4_2.name := 'PrioritizedPrevention' !insert (xp,bs4_1) into hasBizStrategy !insert (xp,bs4_2) into hasBizStrategy !create s4_1: EvaluationStrategy !create s4_2: EvaluationStrategy !set s4_1.name := 'ImmediatePrevention' !set s4_2.name := 'PrioritizedPrevention' !insert (bs4_1, s4_1) into hasEvalStrategy !insert (bs4_2, s4_2) into hasEvalStrategy !create bpt4_1 : BusinessProcessBB !create bpt4_2 : BusinessProcessBB !set bpt4_1.name := 'ImmediatePrevention' !set bpt4_2.name := 'PrioritizedPrevention' !insert (bs4_1,bpt4_1) into hasBPBB !insert (bs4_2,bpt4_2) into hasBPBB -- elements of BPBB (UCM maps) are created and assigned to BusinessProcessBBs !create VPs4_1 : ProcessElement !set VPs4_1.name := 'PreventOutcome' !insert (bpt4_1,VPs4_1) into hasPE !create ZPs4_2 : ProcessElement !create VPs4_2 : ProcessElement !set ZPs4_2.name := 'PrioritizeOutcomes' !set VPs4_2.name := 'PreventOutcome' !insert (bpt4_2,ZPs4_2) into hasPE !insert (bpt4_2,VPs4_2) into hasPE !insert (V, VPs4_1) into realized !insert (Z, ZPs4_2) into realized !insert (V, VPs4_2) into realized -- End of Inserting -- Intention Pattern Linking for xp !insert (T2,xp) into define -- Create, Initialize and Associate ElementLinks -- Element Links for IncreasePatientSafety !create I_C : ElementLink !create I_G : ElementLink !create I_M : ElementLink !create I_A : ElementLink !create I_T2 : ElementLink !set I_C.name := 'I_C' !set I_G.name := 'I_G' !set I_M.name := 'I_M' !set I_A.name := 'I_A' !set I_T2.name := 'I_T2' !insert (I_C, I) into linkTo !insert (I_C, C) into linkFrom !insert (I_G, I) into linkTo !insert (I_G, G) into linkFrom !insert (I_M, I) into linkTo !insert (I_M, M) into linkFrom !insert (I_A, I) into linkTo !insert (I_A, A) into linkFrom !insert (I_T2, I) into linkTo !insert (I_T2, T2) into linkFrom -- Element Links for CollectData !create C2_O : ElementLink !create C2_P : ElementLink !set C2_O.name := 'C2_O' !set C2_P.name := 'C2_P' !insert (C2_O, C2) into linkTo !insert (C2_O, O) into linkFrom !insert (C2_P, C2) into linkTo !insert (C2_P, P) into linkFrom -- Element Links for CollectOutcomeData !create O2_L : ElementLink !create O2_R : ElementLink !create O2_N : ElementLink !set O2_L.name := 'O2_L' !set O2_R.name := 'O2_R' !set O2_N.name := 'O2_N' !insert (O2_L, O2) into linkTo !insert (O2_L, L) into linkFrom !insert (O2_R, O2) into linkTo !insert (O2_R, R) into linkFrom !insert (O2_N, O2) into linkTo !insert (O2_N, N) into linkFrom -- Element Links for TakeAction !create T_V : ElementLink !create T_Z : ElementLink !set T_V.name := 'T_V' !set T_Z.name := 'T_Z' !insert (T_V, T) into linkTo !insert (T_V, V) into linkFrom !insert (T_Z, T) into linkTo !insert (T_Z, Z) into linkFrom -- Add ElementLinks to GoalModelBBs !insert (g1,I_C) into hasElementLink !insert (g1,I_G) into hasElementLink !insert (g1,I_M) into hasElementLink !insert (g1,I_A) into hasElementLink !insert (g1,I_T2) into hasElementLink !insert (g2,C2_O) into hasElementLink !insert (g2,C2_P) into hasElementLink !insert (g3,O2_L) into hasElementLink !insert (g3,O2_R) into hasElementLink !insert (g3,O2_N) into hasElementLink !insert (xg,T_V) into hasElementLink !insert (xg,T_Z) into hasElementLink