The following business rules are used to unlink the items in a packaging hierarchy:
- Set Trigger when item to item relationship is deleted from UI: This BR will be triggered if there is any change in the relationships.
varIds:="";IIF[HaveRelationshipsChanged["itemtoitem"] OR AreRelationshipsDeleted["itemtoitem","item"],SetVariable["varIds",GetCurrentRelatedEntityIds["DELETED","self:self","itemtoitem","item"]],false] AND IIF[IsNullOrEmpty[varIds]=false,SetEntityAttributeValue["_DEFAULT","_DEFAULT",varIds,"item","itemreldelete",Now[]],false]
Keyword Information: |
Core Entity Keywords |
Description |
Link |
HaveRelationshipsChanged |
This keyword is used to verify changes occured in the relationship. |
HaveRelationshipsChanged |
AreRelationshipsDeleted |
This keyword is used to verify deleted relationships for a mentioned entity type. |
AreRelationshipsDeleted |
GetCurrentRelatedEntityIds |
This keyword is used to get a list of entity IDs for the mentioned scope, context, relationship type, and entity type. Here, for unlink feature we must use the scope as "DELETED". |
GetCurrentRelatedEntityIds |
SetEntityAttributeValue |
This keyword used to set the attribute value(s) for the mentioned entity in the given locale and source. Here, the itemreldelete is the system attribute. If any item is unlinked in a packaging hierarchy, then the ID of that Item will be saved in this attribute. |
HaveAttributesChanged |
- Item Unlink: This BR gets all the required information from the BR Set Trigger when item to item relationship is deleted from UI and calls the Invoke Connector Service.
IIF[HaveAttributesChanged["_DEFAULT","_DEFAULT","itemreldelete"],InvokeConnectorService["_DEFAULT","_DEFAULT","item","unlink","eds-csl","syndicate"],false]
Keyword Information: |
Core Entity Keywords |
Description |
Link |
HaveAttributesChanged |
This keyword used to verify if the mentioned attributes have changes for the specified locale and source. Here, it verifies if the system attribute itemreldelete has changes occured in the value. If any value changes observed, then it triggers the Unlink BR. |
HaveAttributesChanged |
InvokeConnectorService |
This keyword supports 'syndicate', withdraw', and 'category syndicate' actions for intended channels. |
Connector Service Keywords |