Many times we get confuse whether we should be
using the Workflow Utilities or PRM ANI Utilities Business Services to Set
Property or Get Property in a message.
Few places where we feel Workflow utilities can be used more effectively than PRM ANI Utility Service.(Please refer to PRM ANI utility blog to learn about BS.)
Scenario1
In order to set multiple
properties in a message we need to define multiple ‘Set Property’ workflow
steps as we can only define one property name in ‘SetProperty’ Method of PRM
ANI Utility service.
Whereas in Workflow
Utilities we can set the multiple properties in one worklfow Step(Echo Method) itself
using dot notation as shown in screenshot below where we are setting both First
and Last Name in one Workflow Step.
Note: Workflow Utilities removes all other empty properties from message. Please see below scenario.
Scenario2
Requirement `- Need to send only part of message where properties are
being set and other part should be ignored.
When we set the properties
in a message using Workflow Utilities Echo method, the part of message which is
empty is being ignored in the output. Below screenshots clearly explains the
input and output of Set Property in workflow explained above.
Input of Set Property (Step
2of above workflow):
Output of Set Property (Step
2 of workflow):
While in PRM ANI Utility
Service we get complete message with empty properties as part of message too.
Output after setting the property using SetProperty Method of
PRM ANI Utility Service.
Same is true for Get
Property Method of PRM ANI Utility Service. We can retrieves only one property
in one workflow step whereas can retrieve multiple properties in single workflow
step in workflow utilities.
Scenario 3
While getting the property value from message using PRM ANI Utility Service , we usually come across an error Running Method 'Execute'(SBL_PRM_00104). even though we have provided the correct Hierarchy Path:
Try using Workflow Utilities to get the property in this scenario, you will be able to get the value with same hierarchy path.
Limitations
Scenario 3
While getting the property value from message using PRM ANI Utility Service , we usually come across an error Running Method 'Execute'(SBL_PRM_00104). even though we have provided the correct Hierarchy Path:
Try using Workflow Utilities to get the property in this scenario, you will be able to get the value with same hierarchy path.
Limitations
- Both Workflow Utilities and PRM ANI Utility service do not work for multiple records.
- We cannot retrieve the value of property in case of dynamic message( Message where we are not sure whether specific property will be coming in a message or not. For ex we might have Status as an xml attribute of contact for some incoming messages whereas for some message we might not even have xml Attribute 'Status' as part of Contact message.
I will be writing next blog to explain the way to accomplish the above limitations.
No comments:
Post a Comment