Customize the business rule as explained in Installation and Setup | 3DEXPERIENCE Platform | 3DEXPERIENCE Configuration and Customization | Data Setup | Data Setup | Customization by Business Rules
Rules are mostly based on an P&O information and selected data:
All the P&O information along with the type of import/export, plus the list of filepaths and/or objects list are used as input parameter of the business logic. With these input parameters, you evaluate whether access should be granted or not. If the access is not granted: an error is reported to the end-user. Below is an example of a business logic that ensures that the maturity of the selected root objects for export is not defined as FROZEN, for a specific username and a specific format exchange. Let ctx_user_name(String)
Let authorized_user_name(String)
Let ctx_exchange_format(String)
authorized_user_name = "uxodtitp"
ctx_exchange_format = Parameters->GetAttributeString("ImportExportFormat")
ctx_user_name = Parameters->GetAttributeString("UserName")
Let has_access(Boolean)
has_access = TRUE
if ("STL" == ctx_exchange_format) {
if (authorized_user_name == ctx_user_name) {
Let ctx_listof_objects(List)
Let ctx_listof_attributes(List)
Let str_object_name(String)
Let str_object_type(String)
Let str_object_revision(String)
Let str_object_maturity(String)
ctx_listof_objects = Parameters->GetAttributeObject("ObjectList")
Let loop_idx(Integer)
loop_idx = 1
for loop_idx while loop_idx <= ctx_listof_objects.Size() {
ctx_listof_attributes = ctx_listof_objects[loop_idx]
if (ctx_listof_attributes.Size() == 4) {
str_object_name = ctx_listof_attributes[1]
str_object_type = ctx_listof_attributes[2]
str_object_revision = ctx_listof_attributes[3]
str_object_maturity = ctx_listof_attributes[4]
}
if ("FROZEN" == str_object_maturity) {
has_access = FALSE
break
}
}
}
}
Parameters->SetAttributeBoolean("AccessAllowed", has_access)
| |||||||