Business Rules Management Service Contract Description
Business Rules Management Service
BusinessRulesManagementService | |
Dev (0.1) | Release Notes/History |
From KSS "Business Rules Management Service" contract. |
WIP
- Definitions taken from code repository
Included
Not included
Comments/Questions
- #fetchBusinessRuleEnglish Shouldn't op name be more generic, e.g. fetchBusinessRuleTranslation?
References
Business Rules Management Service Description and Assumptions
BRMS Entity Diagram - diagram used in the creation of BRMS
BRMS Core Technical Entity Diagram
BRMS Design Specification
BRMS stack describes the relationship between the BRMS and the run-time rules engine (Drools)
Conceptual model of the BRMS - See version 7
Service Basket 2 Operation Sandbox - remove link after migration to avoid confusion
Rules Capabilities
Operations
Agendas
#fetchAgendaInfoDeterminationStructure
#fetchAgendaInfo
#fetchBusinessRuleType
#fetchBusinessRuleInfoByAnchor
#fetchBusinessRuleInfoByAnchorList
Anchors
#findAnchorsByAnchorType
Business Rules
#findBusinessRuleIdsByBusinessRuleType
#fetchBusinessRuleInfo
#fetchDetailedBusinessRuleInfo
#fetchBusinessRuleEnglish
Setup
findAgendaTypes | ||
retrieves the list of agenda types known by this service | ||
None | None | No parameters |
agendaTypeKeyList | list of agenda type keys | |
OPERATION_FAILED | unable to complete request | |
Note that code returns List of Strings |
findBusinessRuleTypes | ||
retrieves the list of business rule types known by this service | ||
None | None | No parameters |
businessRuleTypeKeyList | list of business rule type keys | |
OPERATION_FAILED | unable to complete request | |
Note that code returns List of Strings |
findBusinessRuleTypesByAgendaType | ||
retrieves business rules types for the specified agenda type | ||
agendaTypeKey | agendaTypeKey | type of agenda |
businessRuleTypeKeyList | list of business rule type keys | |
DOES_NOT_EXIST | agendaType not found | |
INVALID_PARAMETER | invalid agendaType | |
MISSING_PARAMETER | missing agendaType | |
OPERATION_FAILED | unable to complete request | |
Note in code I/P parm is a String and return is List of Strings |
findAnchorTypes | ||
retrieves the list of anchor types known by this service | ||
None | None | No parameters |
anchorTypeKeyList | list of anchor type keys | |
OPERATION_FAILED | unable to complete request | |
Note that code returns List of Strings |
Fetch
fetchAgendaInfoDeterminationStructure | ||
retrieves the information needed to determine the agendaInfo. | ||
agendaTypeKey | agendaTypeKey | the context for the agenda of business rules, e.g., LuiPersonRelation, PersonPersonRelation or type of agenda? |
agendaDeterminationInfo | identifiers to be able to determine the agendaInfo (list of business rule types, anchor types, orchestration) for a given agendaTypeKey | |
DOES_NOT_EXIST | agendaContext not found | |
INVALID_PARAMETER | invalid agendaContext | |
MISSING_PARAMETER | missing agendaContext | |
OPERATION_FAILED | unable to complete request | |
Note that in code I/P parm is a String |
fetchAgendaInfo | ||
retrieves the information needed for the specified agenda type and agenda info determination structure. An agenda Info contains a list of business rule types, their anchor types and orchestration of business rule types. | ||
agendaTypeKey | agendaType | the agenda type |
agendaDeterminationInfo | AgendaInfoDeterminationStructure | list of zero or more keys that are required to determine a specific agendaInfo for with a given agendaTypeKey. |
agendaInfo | information about an agenda including output state set, list of business rules types, their anchor type keys, orchestration (XML with order, decision points, exit points). | |
DOES_NOT_EXIST | agendaType not found | |
INVALID_PARAMETER | invalid agendaType | |
MISSING_PARAMETER | missing agendaType | |
OPERATION_FAILED | unable to complete request | |
Note that in code I/P parm is a String |
fetchBusinessRuleType | ||
retrieves the information associated with a business rule type (business rule type key, anchor type key, fact structure list available for the rules of this type) | ||
businessRuleTypeKey | businessRuleTypeKey | the business rule type key |
anchorTypeKey | anchorTypeKey | the anchor type key |
businessRuleTypeInfo | information about the business rule type | |
DOES_NOT_EXIST | agendaType not found | |
INVALID_PARAMETER | invalid agendaType | |
MISSING_PARAMETER | missing agendaType | |
OPERATION_FAILED | unable to complete request | |
Note that in code I/P parms are Strings |
fetchBusinessRuleInfoByAnchor | ||
retrieves a list of specific business rules that belong to the given business rule type and anchor. | ||
businessRuleAnchorInfo | businessRuleAnchorInfo | Business rule type, anchor type key and anchor value. |
businessRuleInfoList | information about business rules including list of business rules types, their anchor type keys values, and fact structures (with the definition keys filled out for the business rule) ~abucior Just as a point of clarity, what should be returned about the Facts here should be enough to retrieve them. As such, it may be the id of the Fact in the Fact Finding Service as well as what type of id should be passed in, or the searchType in a richer search service along with the shape of the criteria structure (potentially partially filled in, depending on how much static information is included). | |
DOES_NOT_EXIST | agendaType not found | |
INVALID_PARAMETER | invalid agendaType | |
MISSING_PARAMETER | missing agendaType | |
OPERATION_FAILED | unable to complete request | |
Note that in code I/P parm is named BusinessRuleAnchor |
fetchBusinessRuleInfoByAnchorList | ||
retrieves a list of specific business rules that belong to the given business rule type and anchor. | ||
businessRuleAnchorInfoList | businessRuleAnchorInfoList | List of business rule types, anchor type keys and anchor values. |
businessRuleInfoList | information about business rules including list of business rules types, their anchor type keys values, and fact structures (with the definition keys filled out for the business rule) ~abucior Just as a point of clarity, what should be returned about the Facts here should be enough to retrieve them. As such, it may be the id of the Fact in the Fact Finding Service as well as what type of id should be passed in, or the searchType in a richer search service along with the shape of the criteria structure (potentially partially filled in, depending on how much static information is included). | |
DOES_NOT_EXIST | agendaType not found | |
INVALID_PARAMETER | invalid agendaType | |
MISSING_PARAMETER | missing agendaType | |
OPERATION_FAILED | unable to complete request | |
findAnchorsByAnchorType | ||
retrieves all identifiers for anchors of the specified type | ||
anchorTypeKey | anchorTypeKey | type of anchor |
anchorValueList | list of the anchors matching the specified type | |
DOES_NOT_EXIST | anchorType not found | |
INVALID_PARAMETER | invalid anchorType | |
MISSING_PARAMETER | missing anchorType | |
OPERATION_FAILED | unable to complete request | |
Note that in code I/P parm is a String and return is List of Strings |
findBusinessRuleIdsByBusinessRuleType | ||
retrieves all identifiers for business rules of the specified type | ||
businessRuleTypeKey | businessRuleTypeKey | type of business rule |
businessRuleIdList | list of identifiers for business rules matching the specified type | |
DOES_NOT_EXIST | businessRuleType not found | |
INVALID_PARAMETER | invalid businessRuleType | |
MISSING_PARAMETER | missing businessRuleType | |
OPERATION_FAILED | unable to complete request | |
Note that in code I/P parm is a String and return is List of Strings |
fetchBusinessRuleInfo | ||
retrieves information about the business rule. Rule elements are not present in the response. | ||
businessRuleId | businessRuleId | the business rule id |
businessRuleInfo | information needed to execute the business rule | |
DOES_NOT_EXIST | businessRuleId not found | |
INVALID_PARAMETER | invalid businessId | |
MISSING_PARAMETER | missing businessRuleId | |
OPERATION_FAILED | unable to complete request | |
Note in code I/P parm is a String |
fetchDetailedBusinessRuleInfo | ||
retrieves detailed information including the rule elements composing the business rules | ||
businessRuleId | businessRuleId | the business rule id |
businessRuleInfo | information needed by the GUI to render the business rule and update it. | |
DOES_NOT_EXIST | businessRuleId not found | |
INVALID_PARAMETER | invalid businessId | |
MISSING_PARAMETER | missing businessRuleId | |
OPERATION_FAILED | unable to complete request | |
Note in code I/P parm is a String |
fetchBusinessRuleEnglish | ||
retrieves english translation of a business rule | ||
businessRuleId | businessRuleId | the business rule id |
/wiki/spaces/collectionspace/pages/666274808 | english translation of a business rule | |
DOES_NOT_EXIST | businessRuleId not found | |
INVALID_PARAMETER | invalid businessId | |
MISSING_PARAMETER | missing businessRuleId | |
OPERATION_FAILED | unable to complete request | |
Shouldn't this operation be called something more generic, e.g. fetchBusinessRuleTranslation? Not everyone using KS will want an English translation.
Note in code I/P parm is a String |
Search
Maintenance
createBusinessRule | ||
Creates a Business Rule of a given type | ||
businessRuleInfo | businessRuleInfo | Information required to create the business rule |
/wiki/spaces/collectionspace/pages/666274808 | Status message | |
ALREADY_EXISTS | business rule already exists | |
INVALID_PARAMETER | invalid businessRuleType, businessRuleInfo | |
MISSING_PARAMETER | missing businessRuleType, businessRuleInfo | |
OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | |
This should return the new businessRuleInfo |
updateBusinessRule | ||
Updates a business rule record | ||
businessRuleId | businessRuleId | identifier for business rule to be updated |
businessRuleInfo | businessRuleUpdateInfo | information needed to update a business rule record |
/wiki/spaces/collectionspace/pages/666275040 | status of the operation (success or failure) | |
DOES_NOT_EXIST | businessRuleId not found | |
INVALID_PARAMETER | invalid businessRuleId, businessRuleUpdateInfo | |
MISSING_PARAMETER | missing businessRuleId, businessRuleUpdateInfo | |
READ_ONLY | attempted to update a read only attribute | |
OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | |
Note that code does not return READ_ONLY error
This should return an updated businessRuleInfo |
deleteBusinessRule | ||
Deletes a business rule record. | ||
businessRuleId | businessRuleId | identifier for business rule to be deleted |
/wiki/spaces/collectionspace/pages/666275040 | status of the operation (success or failure) | |
DOES_NOT_EXIST | business rule does not exist | |
INVALID_PARAMETER | invalid businessRuleId | |
MISSING_PARAMETER | missing businessRuleId | |
OPERATION_FAILED | unable to complete request | |
DEPENDENT_OBJECTS_EXIST | One or more objects linked to this rule id | |
PERMISSION_DENIED | authorization failure | |
createNewVersion | ||
Creates a new version from the input business rule keeping the originalRuleId as that of the provided business rule. The new version is created with DRAFT_IN_PRORGRESS state. New versions can be created only from ACTIVE or RETIRED rules. | ||
businessRuleInfo | businessRuleInfo | business rule |
businessRuleInfo | new business rule cloned from the input with new businessRuleId | |
DATA_VALIDATION_ERROR | new state is not valid | |
DOES_NOT_EXIST | business rule does not exist | |
INVALID_PARAMETER | invalid businessRuleId, brState | |
MISSING_PARAMETER | missing businessRuleId, brState | |
OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | |
updateBusinessRuleState | ||
Updates a business rule record's state. This is typically used to activate or retire a business rule. | ||
businessRuleId | businessRuleId | identifier for business rule |
/wiki/spaces/collectionspace/pages/666274808 | brState | new state for the business rule. Value is expected to be constrained to those in the brState enumeration. |
businessRuleInfo | updated business rule | |
DATA_VALIDATION_ERROR | new state is not valid | |
DOES_NOT_EXIST | business rule does not exist | |
INVALID_PARAMETER | invalid businessRuleId, brState | |
MISSING_PARAMETER | missing businessRuleId, brState | |
OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | |