Method | Definition |
---|---|
SQL-Statement | If it is a quantity check of multiple fields on the project level, the columns of the select statement have to be filled with a placeholder since they are readout from the rule parameters. Example: Check rule Check on project. This rule checks columns from the project table on the basis of rule parameters stored in the master data. |
Python Method | The "computeProcessRule" method is used for the check rule and handed down to the data item object. General Check Rule Structure:
def computeProcessRule(result,di_to_check,object_id,dtpRec): di_list=di_to_check.split(",") for attribute in ppms.db_select(ppms.get_query("000357").format(di_to_check,object_id))[0]: if attribute in ("",0): result+=1 return result di.computeProcessRule = computeProcessRule Details
The "executeProcessAction" method is used for the process action and is handed down to the data item object. General Action Structure:
def executeProcessAction (mts_rec=None,object_id=None): from ppms import create_report from ppms import processes from ppms import project_rights #create report mapping_dict=project_rights.get_report_mapping_definition() vzh = create_report.Versionizer_helper(mapping_dict["source_dt"], mapping_dict["target_dt"], mapping_dict["data_items"], object_id) processes.create_report_for_processes(processes.get_object_type_by_pr_id(object_id),object_id,vzh.report_id) project_rights.set_report_title(object_id,vzh.report_id) return [mts_rec,object_id] ppms.get_session_dict()["planta_functions"]=[executeProcessAction] |