PLMSetupDataInterfaces Interface PLMIBusinessRuleExecutionManager
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface PLMIBusinessRuleExecutionManager
Interface used to trigger business rules declared by applications
Method Index
- o
CreateVolatileInstance(CATICkeObject_var&)
- Creates a volatile instance: an object with the type VolatileInstance.
- o
PerformComputation(CATUnicodeString&,CATICkeObject_var&,CATICkeObject_var&)
- To invoke a business rule with the intent of doing a special computation.
- o
PerformExecution(CATUnicodeString&,CATICkeObject_var&,CATICkeObject_var&)
- To invoke a business rule with the intent of doing an execution.
- o
PerformValidation(CATUnicodeString&,CATICkeObject_var&,CATICkeObject_var&,CATBoolean&,CATUnicodeString&,int&)
- To invoke a business rule with the intent of doing a validation.
- o
PopupMessage(CATUnicodeString&,CATICkeObject_var&,CATICkeObject_var&)
- This method can be used after the execution of a validation service, when it has failed to pop up a message to the end-user.
- o
ProduceBusinessRuleContext(CATUnicodeString&,CATLISTV(CATICkeParm_var)&,CATICkeObject_var&)
- This method is used to create an object that will be used to pass parameters to the business rule execution services.
- o
StandardErrorMessage()
- This method provides a text that can be used by the application to show that there was a problem in the rule execution.
Methods
o CreateVolatileInstance
public virtual CreateVolatileInstance( | | oInstance) |
-
Creates a volatile instance: an object with the type VolatileInstance.
- Parameters:
-
- oInstance
- Object created
- Returns:
- S_OK if the object has been created E_FAIL unsuccessful
o PerformComputation
public virtual PerformComputation( | const | iBusinessRuleOpeningIdentifier, |
| const | iFact, |
| const | iContext) |
-
To invoke a business rule with the intent of doing a special computation.
By computation, we mean that we will compute some parameters of the context object but that in no manner, we will enable the modification of the fact itself.
- Parameters:
-
- iBusinessRuleOpeningIdentifier
- Name of the business rule opening identifier (defined by your application)
The name shall not contain the "CAA" prefix. It will be added inside the service
- iFact
- The object on which the rule will be applied
- iContext
- An object that holds parameters that can be used inside the rules (in read or write mode). This object is generated by the ProduceBusinessRuleContext method.
- Returns:
- S_OK The business rule has been successfully executed (potentially, no rule was fired)
- Returns:
- S_FALSE The business rule was not successfully executed. The reason may be a rule that is not syntaxically valid or an evaluation error raised during the execution.
If you want to send a message to the end user, as he is not aware of the internal, please use StandardErrorMessage method to provide a consistent message
o PerformExecution
public virtual PerformExecution( | const | iBusinessRuleOpeningIdentifier, |
| const | iFact, |
| const | iContext) |
-
To invoke a business rule with the intent of doing an execution.
An execution is a context where the fact itself can be modified.
- Parameters:
-
- iBusinessRuleOpeningIdentifier
- Name of the business rule opening identifier (defined by your application)
The name shall not contain the "CAA" prefix. It will be added inside the service
- iFact
- The object on which the rule will be applied
- iContext
- An object that holds parameters that can be used inside the rules (in read or write mode). This object is generated by the ProduceBusinessRuleContext method.
- Returns:
- S_OK The business rule has been successfully executed (potentially, no rule was fired)
- Returns:
- S_FALSE The business rule was not successfully executed. The reason may be a rule that is not syntaxically valid or an evaluation error raised during the execution.
If you want to send a message to the end user, as he is not aware of the internal, please use StandardErrorMessage method to provide a consistent message
o PerformValidation
public virtual PerformValidation( | const | iBusinessRuleOpeningIdentifier, |
| const | iFact, |
| const | iContext, |
| | oValidationResult, |
| | oMessage, |
| | oSeverity) |
-
To invoke a business rule with the intent of doing a validation.
By validation, we mean that first of all, one critical result of the operation is a validation status but also we ensure that there won't be any modification authorized on the fact.
If the validation has failed, it is advised to use the PopupMessage method if you want to bring it to the end-user.
- Parameters:
-
- iBusinessRuleOpeningIdentifier
- Name of the business rule opening identifier (defined by your application)
The name shall not contain the "CAA" prefix. It will be added inside the service
- iFact
- The object on which the rule will be applied
- iContext
- An object that holds parameters that can be used inside the rules (in read or write mode). This object is generated by the ProduceBusinessRuleContext method.
- oValidationResult
- A boolean that hold the validation result.
- oMessage
- In case of invalidation, contains a message produced by the business rule to indicate the reason of the invalidation
- oSeverity
- In case of invalidation, returns a severity (produced by the business rule).
The severity is an integer produced within the rule by the customer. It is up to the caller of the BR service to decide how to interpret the severity.
However, we advise to consider that severity==2 means that the operation will be cancelled, whereas severity==1 means it is just a warning.
This is how the severity is interpreted in the PopupMessage method
- Returns:
- S_OK The business rule has been successfully executed (potentially, no rule was fired)
- Returns:
- S_FALSE The business rule was not successfully executed. The reason may be a rule that is not syntaxically valid or an evaluation error raised during the execution.
If you want to send a message to the end user, as he is not aware of the internal, please use StandardErrorMessage method to provide a consistent message
o PopupMessage
public virtual PopupMessage( | const | iBusinessRuleOpeningIdentifier, |
| const | iFact, |
| const | iContext) |
-
This method can be used after the execution of a validation service, when it has failed to pop up a message to the end-user.
In the BRContext, we use the information about the severity (2 to say if the operation is cancelled or 1 if it is just a warning).
And we raise the Message filled within the rule. If no message is defined within the rule, a generic message is sent.
- Parameters:
-
- iBusinessRuleOpeningIdentifier
- Name of the business rule opening identifier (defined by your application)
The name shall not contain the "CAA" prefix. It will be added inside the service
- iFact
- The fact
- iContext
- The BR Context on which we find the message and the severity
- Returns:
- S_OK if the message has been sent E_FAIL unsuccessful
o ProduceBusinessRuleContext
public virtual ProduceBusinessRuleContext( | const | iBusinessRuleOpeningIdentifier, |
| const | iListAttributeValuesForContext, |
| | oContextGenerated) |
-
This method is used to create an object that will be used to pass parameters to the business rule execution services.
- Parameters:
-
- iBusinessRuleOpeningIdentifier
- Name of the business rule opening identifier (defined by your application)
The name shall not contain the "CAA" prefix. It will be added inside the service
- iListAttributeValuesForContext
- List of parameters passed to the business rules: parameters must be created with the volatile factory (CATCkeGlobalFunctions::GetVolatileFactory())
- oContextGenerated
- Context object generated to be passed to the other services.
o StandardErrorMessage
public virtual StandardErrorMessage( | ) |
-
This method provides a text that can be used by the application to show that there was a problem in the rule execution.
The only objective of this method is to have the same text everywhere...
- Returns:
- a NLS translation of "The customization of your last operation failed due to a bad environment. Contact your administrator"
This object is included in the file: PLMIBusinessRuleExecutionManager.h
If needed, your Imakefile.mk should include the module: PLMSetupDataInterfaces
Copyright © 1999-2014, Dassault Systèmes. All rights reserved.