CC "Modeling" GET_ACT_MODEL SET n_act_modelid:(modelid) CC "AQL" EVAL_AQL_EXPRESSION modelid:(n_act_modelid) expr:("<\"Process\">") SET s_intprocess_objids:(objids) CC "Core" GET_CLASS_ID classname:("Process") bp-library SET n_intprocess_classid:(classid) CC "Core" GET_ATTR_ID classid:(n_intprocess_classid) attrname:("Relates from") #--> RESULT ecode: intValue attrid: id SET n_intproc_relatesfrom_attrid:(attrid) CC "Core" GET_ATTR_ID classid:(n_intprocess_classid) attrname:("Referenced process") #--> RESULT ecode: intValue attrid: id SET n_intproc_refprocess_attrid:(attrid) CC "Core" GET_ATTR_ID classid:(n_intprocess_classid) attrname:("Relates to") #--> RESULT ecode: intValue attrid: id SET n_intproc_relatesto_attrid:(attrid) CC "Core" GET_CLASS_ID classname:("Business Entity") bp-library SET n_businessentity_classid:(classid) CC "Core" GET_CLASS_ID classname:("Process") bp-library SET n_intproc_classid:(classid) CC "Core" GET_ATTR_ID classid:(n_intproc_classid) attrname:("Correlation Results") #--> RESULT ecode: intValue attrid: id SET n_intproc_corrres_attrid:(attrid) CC "AdoScript" PERCWIN_CREATE title:"Please wait! For an appropriate interaction process is being searched..." CC "AdoScript" SLEEP ms:100 SET n_percentage:0 SET n_count:0 FOR s_intprocess_objid in:(s_intprocess_objids) { SET n_num_of_objs:(tokcnt(s_intprocess_objids," ")) SET n_count:(n_count+1) SET n_percentage:((n_count/(n_num_of_objs+3))*100) CC "AdoScript" PERCWIN_SET percentage:(n_percentage) CC "AdoScript" SLEEP ms:200 GET_THEBESTS_OF_DIMENSIONS s_intprocessobjid:(s_intprocess_objid) a_bestofdims:a_best_of_dims #CC "AdoScript" INFOBOX (a_best_of_dims) SET n_percentage:((n_count/(n_num_of_objs+2))*100) CC "AdoScript" PERCWIN_SET percentage:(n_percentage) CC "AdoScript" SLEEP ms:200 CC "Core" GET_ATTR_VAL objid:(VAL s_intprocess_objid) attrname:("Process Annotation") SET s_intprocess_annotation:(val) FIND_APPROPRIATE_INTERACTION_PROCESSES a_bestofdims:(a_best_of_dims) s_processannotation:(s_intprocess_annotation) n_appropriate_process_modelid:n_appropriate_interaction_process_modelid SET n_percentage:((n_count/(n_num_of_objs+1))*100) CC "AdoScript" PERCWIN_SET percentage:(n_percentage) CC "AdoScript" SLEEP ms:200 #CC "AdoScript" INFOBOX ("business entity position: "+(STR n_appropriate_interaction_process_modelid)) CC "Core" GET_ATTR_VAL objid:(n_appropriate_interaction_process_modelid) attrname:("Position") SET str_referenceObject_position: (val) CC "Core" GET_ATTR_VAL objid:(VAL s_intprocess_objid) attrname:("Position") SET str_process_position: (val) LEO parse:(str_referenceObject_position) get-tmm-value:n_y_refobj:"y" LEO parse:(str_process_position) get-tmm-value:n_x_refobj:"x" # ---- Sets new variables with the values of X and Y. To the value of Y is added 5cm, so the Comment will be positioned below the Task object SET n_y_objproperty: ( (n_y_refobj) + CM 2) SET n_x_objproperty: (n_x_refobj) CC "Modeling" SET_OBJ_POS objid:(VAL s_intprocess_objid) x:(n_x_objproperty) y:(n_y_objproperty) SET n_percentage:((n_count/(n_num_of_objs))*100) CC "AdoScript" PERCWIN_SET percentage:(n_percentage) CC "AdoScript" SLEEP ms:200 } CC "AdoScript" SLEEP ms:500 CC "AdoScript" INFOBOX ("Appropriate Partner(s) have been successufully found") CC "AdoScript" PERCWIN_DESTROY CC "Core" SET_ATTR_VAL objid:(n_act_modelid) attrname:("BoolCreateWBButton") val:("Yes") PROCEDURE GET_THEBESTS_OF_DIMENSIONS s_intprocessobjid: string a_bestofdims: reference { CC "Core" GET_REC_ATTR_ROW_COUNT objid:(VAL s_intprocessobjid) attrid:(n_intproc_corrres_attrid) #--> RESULT ecode: intValue count: intValue . SET n_numberof_corrres_intproc:(count) SET n_num_of_dimension:2 SET s_dummy_1:"" SET s_dummy_2:"" SET a_bestofdims:(array(n_num_of_dimension)) CC "Core" GET_REC_ATTR_ROW_ID objid:(VAL s_intprocessobjid) attrid:(n_intproc_corrres_attrid) index:1 #--> RESULT ecode: intValue rowid: id . SET n_rec_pref_rowid:(rowid) CC "Core" GET_ATTR_VAL objid:(n_rec_pref_rowid) attrname:("Dimension") as-string SETL s_reference_dimension:(val) FOR i from:0 to:(n_numberof_corrres_intproc-1) { CC "Core" GET_REC_ATTR_ROW_ID objid:(VAL s_intprocessobjid) attrid:(n_intproc_corrres_attrid) index:(i+1) #--> RESULT ecode: intValue rowid: id . SET n_rec_pref_rowid:(rowid) SET n_preferences_objid:(tobjid) CC "Core" GET_ATTR_VAL objid:(n_rec_pref_rowid) attrname:("Preference") SETL s_temp_pref:(val) CC "Core" GET_ATTR_VAL objid:(n_rec_pref_rowid) attrname:("Correlation") as-string SETL s_temp_corr:(val) CC "Core" GET_ATTR_VAL objid:(n_rec_pref_rowid) attrname:("Dimension") as-string SETL s_temp_dimension:(val) SETL s_help:(s_temp_pref+"@"+s_temp_corr+"@"+s_temp_dimension) IF (s_temp_dimension = (s_reference_dimension)) { SET s_dummy_1:(s_dummy_1+"$"+s_help) #CC "AdoScript" INFOBOX ("1_CorrRes: "+s_dummy_1) } ELSE { SETL s_dummy_2:(s_dummy_2+"$"+s_help) } } #CC "AdoScript" INFOBOX ("CorrRes:"+s_dummy_1) SET a_dimension_1:(strarray(s_dummy_1,"$")) SET a_dimension_2:(strarray(s_dummy_2,"$")) aerase(a_dimension_1,0); aerase(a_dimension_2,0); SET a_help_1:(array(a_dimension_1.length)) SET a_help_2:(array(a_dimension_2.length)) SET biggest_1:(VAL token(a_dimension_1[0] , 1 , "@")) SET a_bestofdims[0]:(a_dimension_1[0]) SET a_bestofdims[1]:(a_dimension_2[0]) FOR i from:0 to:(a_dimension_1.length-1) { SETL s_help_1:(VAL token(a_dimension_1[i] , 1 , "@")) IF (s_help_1 > biggest_1) { SET biggest_1:s_help_1 SET a_bestofdims[0]:(a_dimension_1[i]) } } SETL biggest_2:(VAL token(a_dimension_2[0] , 1 , "@")) FOR i from:0 to:(a_dimension_2.length-1) { SETL s_help_1:(VAL token(a_dimension_2[i] , 1 , "@")) IF ((s_help_1) > biggest_2) { SET biggest_2:s_help_1 SET a_bestofdims[1]:(a_dimension_2[i]) } } } PROCEDURE FIND_APPROPRIATE_INTERACTION_PROCESSES a_bestofdims: array s_processannotation: string n_appropriate_process_modelid: reference { SET s_ModelType:("Business Entity") SET n_appropriate_process_modelid:-1 SET flags:(array(a_bestofdims.length)) CC "AQL" EVAL_AQL_EXPRESSION modelid:(n_act_modelid) expr: ("<\""+s_ModelType+"\">") SETL s_process_model_ids:(objids) FOR s_process_model_id in:(s_process_model_ids) { FOR i from:0 to:(a_bestofdims.length-1) { SET dummy_pref:(token(a_bestofdims[i] ,0,"@")) GET_CORRTHR_RECORDS s_processmodelid:(s_process_model_id) s_preference:(dummy_pref) n_lowerb:n_lower_bound n_upperb:n_upper_bound SETL temp_pref:(VAL (token(a_bestofdims[i] , 1 , "@"))) #CC "AdoScript" INFOBOX ("bounds: "+(STR n_lower_bound)+"@"+ (STR temp_pref)+"$"+(STR temp_pref)+"@"+ (STR n_upper_bound)) IF ((n_lower_bound)<=(temp_pref) AND (temp_pref)<=(n_upper_bound)) { SET flags[i]:1 } ELSE { SET flags[i]:0 } } CC "Core" GET_ATTR_VAL objid:(VAL s_process_model_id) attrname:("Annotation") SET s_process_annotation:(val) #CC "AdoScript" INFOBOX ("flags: "+(STR flags[0])+(STR flags[1])+"annotations: "+s_processannotation+"@"+s_process_annotation) IF ((flags[0])=1 AND (flags[1]=1) AND (s_processannotation = s_process_annotation)) { SET n_appropriate_process_modelid:(VAL s_process_model_id) BREAK } } } PROCEDURE GET_CORRTHR_RECORDS s_processmodelid: string s_preference: string n_lowerb: reference n_upperb: reference { CC "Core" GET_ATTR_ID classid:(n_businessentity_classid) attrname:("KPIs") SET n_corthr_record_attrid:(attrid) SET n_lowerb:0 SET n_upperb:0 CC "Core" GET_REC_ATTR_ROW_COUNT objid:(VAL s_processmodelid) attrid:(n_corthr_record_attrid) #--> RESULT ecode: intValue count: intValue . SET n_numberof_corrres_intproc:(count) FOR i from:0 to:(n_numberof_corrres_intproc-1) { CC "Core" GET_REC_ATTR_ROW_ID objid:(VAL s_processmodelid) attrid:(n_corthr_record_attrid) index:(i+1) #--> RESULT ecode: intValue rowid: id . SET n_rec_pref_rowid:(rowid) CC "Core" GET_ATTR_VAL objid:(n_rec_pref_rowid) attrname:("Preference_") SETL s_temp_pref:(val) IF (s_temp_pref = (s_preference)) { CC "Core" GET_ATTR_VAL objid:(n_rec_pref_rowid) attrname:("Lower bound") SET n_lowerb:(val) CC "Core" GET_ATTR_VAL objid:(n_rec_pref_rowid) attrname:("Upper bound") SET n_upperb:(val) BREAK } } }