Technical Articles
B2B UDFNodePool Explained in Easy Example
Introduction
In PI B2B add-on, there are one set of ESR design objects called B2B Mapping Kit. Under namespace MappingFunctions have a set of function libraries. I personally find that these set of function libraries are very useful to handle various tricky context handling and complex message mapping requirements between EDI/EDIFACT/X12 and IDOC. Content of EDI/IDOC are highly hierarchical in nature. These deep level of EDI/IDOC field nodes with possible non-existed fields added complexity to message mapping. Fortunately B2B add-on come with these libraries functions to greatly simplified the mapping effort. In this blog post I will explain about UDFNodePool which handle the context handling. It is a complement of standard NodeFunctions.
UDFNodePool Functions
These are list of UDFNodePool functions covered in this blog post and I explained in my own way 🙂
Function Name | Meaning ( I = source, You = target) |
---|---|
createIfHasValue | I only create you if I am non-empty value, otherwise you will not be created. |
createIfHasOneOfSuchValues | I only create you if my 1st input is one of these values in my 2nd input that separated by semicolon, otherwise you will not be created. |
passIfHasValue | I give you the same value if I am non-empty value, otherwise you got nothing. |
assignValueByCondition | I give you my 3rd input, if my 1st input is one of these values in my 2nd input that separated by semicolon, otherwise you got nothing. |
getFirstContextValue | I only give you the first value in my list that is non-empty, otherwise you got nothing. |
concatToOneQueue | I append all 5 inputs in sequence, then give you 1 list. |
concatContextValues | I combine all values in my 1st input separated by value from my 2nd input, then give you 1 string. |
splitValueStringToContextValues | I split string in my 1st input by delimiter in my 2nd input, then give you 1 list. |
getValueByIndex | I pick a value in my 1st input by position(starting at 1) specified in my 2nd input, then give that value to you. |
suppressMultipleContextValues | I only give you unique list of value, regardless how many time the value existed or in what order. Duplicated value are suppressed. |
deleteMultipleContextValues | I only give you unique list of value, regardless how many time the value existed or in what order. Duplicated value are deleted. |
createMultipleCopies | I duplicate myself from 1st input as many time as specify at 2nd input, then give you a list. |
fragmentSingleValue | I cut myself as string from 1st input into maximum pieces count specify at 2nd input where each piece is with length of 3rd input, then send you a list contain all pieces. The last piece might be shorter. |
contextHasOneOfSuchValues | I will tell you single answer “true” if my 1st input is one of these values in my 2nd input that separated by semicolon, otherwise single answer “false” |
useOneContextAsMany | I duplicate myself from 1st input separated with context change, as many time as context values count at my 2nd input, then give you duplicated list. |
createMultipleContextCopies | I duplicate myself from 1st input separated with context change, as many time as numeric value at my 2nd input, then give you duplicated list. |
useOneContextAsMany I duplicate myself from 1st input separated with context change, as many time as context values count at my 2nd input, then give you duplicated list. |
---|
Take an example from previous post: The output is exactly the same with previous post, if changed to use useOneContextAsMany like below: Below show queue at point 2: |
Thanks for viewing. This is my first blog post in B2B space, hope you find it useful and like it. 🙂
Kudos Yee Loon, very comprehensive explanation of the B2B Node functions! This is a valuable reference for those working on B2B scenarios.
Hi Eng Swee,
Good to see a comment. Thanks for your words of encouragement 🙂
Regards,
Yee Loon
>>>This is my first blog post in B2B space, hope you find it useful
Indeed useful. Thanks for your efforts.
Thanks for sharing this. Very much useful. I hope you come up with few more blogs.
Regards,
Suhale Shaik.
Excellent Explanation of B2B node functions really helps