The documentation from version 39.5.17 of PLANTA project can be found in the new PLANTA Online Help.

DT489 Process Rules

From DB 39.5.12

DI041217 Process rule ID

The ID of the process rule is generated automatically upon its creation.

Up to DB 39.5.12

DI041217 Process rule

The ID of the process rule is generated automatically upon its creation.

From DB 39.5.12

DI041228 Process rule

Name of the process rule which is defined in the Rule DI041230 field

Modifiable

  • in the Process Rules module,
  • provided that the modifying user possesses the required rights

Up to DB 39.5.12

DI041228 Process rule name

Name of the process rule which is defined in DI041230

Modifiable

  • in the Process Rules module,
  • provided that the modifying user possesses the required rights

DI041229 Comment

Comment on the process rule

Modifiable

  • in the Process Rules module,
  • provided that the modifying user possesses the required rights

From DB 39.5.12

DI057862 Class

Name (incarnation field) of the process rule class. Here, you can define whether the process rule is written in Python or SQL.

Modifiable

  • in the Process Rules module,
  • provided that the modifying user possesses the required rights

Note

Up to DB 39.5.12

DI057862 Class name

Name (incarnation field) of the rule class. Here, you can define whether the rule is written in Python or SQL.

Modifiable

  • in the Process Rules module,
  • provided that the modifying user possesses the required rights

Note

From DB 39.5.12

DI057966 Object type

Name (incarnation field) of the planning object type. Here, you can define whether the rule is available for projects, ideas, proposals or requests.

Modifiable

  • in the Process Rules module,
  • provided that the modifying user possesses the required rights

Note

Up to DB 39.5.12

DI057966 Object type name

Name (incarnation field) of the object type. Here, you can define whether the rule is available for projects, ideas, proposals or requests.

Modifiable

  • in the Process Rules module,
  • provided that the modifying user possesses the required rights

Note

From DB 39.5.15

DI059086 Rule type

Name (incarnation field) of the rule type. Here, you can define whether the process rule is a process action (e.g. create status report or change project type) or a check rule (e.g. the project manager field is filled).

Modifiable

  • in the Process Rules module,
  • provided that the modifying user possesses the required rights

Details

Note

From DB 39.5.12

DI059086 Rule type

Name (incarnation field) of the rule type. Here, you can define whether the process rule is a process action (e.g. create status report or change project type) or a check rule (e.g. the project manager field is filled).

Modifiable

  • in the Process Rules module,
  • provided that the modifying user possesses the required rights

Details

Note

Up to DB 39.5.12

DI059086 Rule type name

Name (incarnation field) of the rule type. Here, you can define whether the process rule is a process action (e.g. create status report or change project type) or a check rule (e.g. the project manager field is filled).

Modifiable

  • in the Process Rules module,
  • provided that the modifying user possesses the required rights

Details

Note

DI041230 Rule

Here, the process rule by which the completion of the process step is checked is defined.

Modifiable

  • in the Process Rules module,
  • provided that the modifying user possesses the required rights

Information

  • Process rules are provided by the customizer.
  • Rules are SQL statements or Python methods that are performed when a process step is being checked.
    • Process rules with ”Check rule” rule type can be written with SQL statements or python methods.
    • Process rules with ”Action” rule type, can only be written with Python methods.
  • For process rules that are written with Python methods, the Rule field is automatically filled with the default lines (initial line, return line and end line) for the particular rule type.

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.

  • Select {0} from DT461 WHERE DI001001='{1}'

    Details

    • The placeholder {0} is filled with the rule parameters of the process step master data
    • The placeholder {1} is filled with the current project number

If it is a quality or usage frequency check, a placeholder has to be defined for search criterion on project.

Example: Check rule VH risks. This rule checks whether risks are already defined for the current project.

  • SELECT count(DI007696) FROM DT810 p WHERE p.DI007696='{0}'

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,dtp_rec):
    • CONTENT of the method
    • return result
  • di.computeProcessRule = computeProcessRule
Example: Check rule Check on Project. This rule checks columns from the project table on the basis of rule parameters specified in the master data.
 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

  • di_to_check contains the columns of the process step master data rule parameter which are to be checked
  • object_id contains the ID of the project to be checked

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):
    • Various operations can be performed within these functions
      • These operations are defined individually for each rule
      • If an operation is to be used several times, it must be made available within a Python module and be started from this module
    • The function is made available in the PLANTA session dictionary upon execution and is assigned to a module object, provided that the process step action is performed in the operative data

  • ppms.get_session_dict()["planta_functions"]=[executeProcessAction]
Example: Create status report process action:
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]

Note

  • Several real load profiles are included in the scope of supply of PLANTA project.

         PLANTA project









 
  • Suche in Topic-Namen

  • Suche in Topic-Inhalten
This site is powered by the TWiki collaboration platform Powered by Perl