- Some common tips - including some performance tips
- Integrator query shows as a bad query in Oracle
- About Integrator Caching
- IFD Field Class: EO Expression on child segment
- Do not store hard-coded values in integrator settings
- Restrictions on MOCA based Retrieve Method Implementations
- Integration by reading foreign databases
- Create files from communication methods that do not use files
- Some common tips - including some performance tips
- DO NOT use IFD Field algorithms to fetch event data.
- Use "Synchronous except send" rather than "Asynchronous" for result IFDs going to external systems.
- Use "Synchronous" for result IFDs going to DCS.
- Always set result IFD as synchronous
- Set "Always persist Event output" and "Always persist interface document" checkboxes to off
- Set "Persist event data" on event to on. You may turn it off if performance gain is significant. Keeping it on provides event argument data in event query
- Separate identification and processing for inbound data
- A separate sender slIFDGen for each external system
- Use CSV data layout for result IFDs if using XML, processing algorithm, or table based
- IFD Field Class: EO Expression on child segment
-
Please Please Please do not do it. It gives me a heart-burn every time
I see a result IFD algorithm pulling event data, e.g. If EO has a field like
"stoloc" and you need arecod of it, people will add arecod as a field in
result IFD with a field level algorithm to pull the arecod by a single select.
In worst cases I have seen 10s of such algorithms with single selects. It
creates a performance nightmare. In such cases you should add fields
to the corresponding EO.
So general rule should be that you must not select event related data in an IFD Field algorithm. It is ok to fetch some constants like policies, code descriptions, convert UOMs etc. but not this.
Also when looking for performance look at these IFD field algorithms and even if you are doing it right - e.g. policies etc. sheer number of these calls can have an adverse impact.
Imagine a full truck-load in SHIP_LOAD. You may have 1000s of segments - what if you had these selects in some of these fields; you can easily imagine the stress on the database. By employing a caching strategy or pushing them to a parent IFD segment or EO segment you could really improve performance.
-
Typical flow of an event that creates asynchronous result IFD is:
Event Status | Description |
EC | Event Output Created |
IC | Result IFD Created |
SC | Result IFD Sent |
The slIFDGen (A) can me multi-threaded but an ever better option is to simply use "Synchronous except send" rather than Asynchronous. This implies that when event is logged it will create EO and also create result IFDs. When user gets the prompt back, event will be in IC not EC. It may take slightly more time but that overhead will not be perceivable by the user. But the advantage will be that there will not be a single task responsible for moving so many events from EC to IC.
-
You should never use synchronous communication for transactions going to
external systems because that tightly couples the two systems and a
transaction will fail if the communication link is down.
But for transactions going to DCS, the work is done by processing algorithms and there is no communication link. For these result IFDs:
-
When we get downloads sent to integrator, we can configure the slInAdapter
task to either process all the way (download goes from NEW to EDONE or EERR)
or we can break it up such that slInAdapter only identifies the download
and slIFDEvt will log the events from it. In this case download will go
from NEW to ID. slIFDEvt will take it to EDONE or EERR.
This can help in performance. Furthermore we can start multiple instances of slIFDEvt which further improves the performance.
-
It is possible to have a single sender slIFDGen to send data to all systems.
But it is better to have a separate sender for each external system.
-
The data layout on result IFD defines how data is stored in sl_ifd_data_dtl
table. As you can see there is no option there for XML - the reason is that
XML is a communication detail. This implies that the result IFD layout could
be whatever you want in such cases.
So in such cases I recommend always using CSV rather than FIXED BYTE because it provides you the flexibility to change the lengths of the fields more easily.
-
This is a less known (documented) feature which comes in handy. Lets say that
you have Event Output data that looks like
ORDER: ordnum=A ORDER_LINE: ordlin=001, prtnum=A1, qty = 10 ORDER_LINE: ordlin=002, prtnum=A2, qty = 20 ORDER_LINE: ordlin=003, prtnum=A3, qty = 30Now lets say at the result IFD level your result IFD Segment which is at the ORDER level needs to access some data from the ORDER_LINE level; that is when this feature comes in. Lets say your result IFD Segment at the order level needs the first part number, or total ordered quantity. In these cases you can add a field to the result IFD Segment with class of "EO Expression on Child Segment". Then you can put something like:
-
<<EO_SEGMENT>> [SQL Group expression]
-
<<ORDER_LINE>> min(prtnum)
-
<<ORDER_LINE>> sum(qty)
-
<<ORDER_LINE>> count(*)
Often people do not use this option and end up changing the event output to provide additional data elements. Changing event output should be the last resort.
-
Often when we are dealing with a custom system to integrate with, the integration
discussion rapidly moves towards the other system creating files in a certain
format and RP consuming them. Or using a queuing mechanism. There is another
option.
- Create a new system in integrator This new system represents the host system.
- Create a notification table on host system Host will populate that to indicate an event occurred. It will create a single row per event and put in some key data that allows you to pull more information. This table will also indicate which event it maps to in RP, e.g. ORDER_MANAGEMENT or PART_MANAGEMENT etc.
- Create alternate event expressions in RP You will map the event argument to the column name in this queue table
- Create Retrieve Method implementation from the new system. You will use the standard event output but change the retrieve method implementation for the new system to pull extra data, such as order header, address, and line data.
- Standard result IFD to DCS should work Since you mapped to standard EO, result IFD should just work.
- Configure the standard table-to-event adapter
- No new system to create, same system as above would work
- Configure the ODBC communication method for this system
- Create new tables on host where you will populate all of the data
- Create custom result IFD in RP and send to this new system The result IFD should be based on standard EO if possible. Custom EO is ok as well. The result IFD will have a special field in each segment called "TABLE_NAME". This tells where this data goes. Fields within the segment correspond to columns in the table.
RP interfaces to Oracle Apps, JDE, and Great Plains use the strategy where no download is sent to RP, instead RP peaks into the host system's database. This strategy should always be considered when interfacing with a custom system. For the overall project, it saves a lot of time because the work of creating intermediate files is taken off the table. The project then becomes:
-
Infrastructure Needed
If RP is running on SQLServer, use linked servers to connect to host system
database (it could be any major database). If RP is running on oracle, you
will use Oracle heterogeneous connectivity option to create database link
to a foreign database. You could also employ any other mechanism offered
by the host system such as web services.
Host to RP
So be creative when discussing integration possibilities.
-
When creating a retrieve method implementation, you can use SQL or MOCA.
With SQL you use from and where clause and with MOCA you can put in a MOCA
command snippet.
- You cannot use expressions when putting in EO Field column data. With SQL, for example, you could say prtnum||'X' but something like that will not work for MOCA based retrieve methods. Similarly in SQL you have some bind variables available like :i_c_absent_ind_char etc. These cannot be used in MOCA based RMs This is important to note because the client applications automatically add these for missing fields and then you get a "No rows affected" error and it is hard to find out why. There is no net loss of functionality because you can put all of these expressions in the MOCA snippet quite easily with a "publish data"
- Order by and group by is not respected for MOCA based RM. For "order by" there is no loss of functionality because you can use sort moca command. Grouping is more difficult - you could use groovy.
With MOCA there are some restrictions.
-
Integrator has a lot of meta-data to support the integration flow. The events,
event outputs, Retrieve Methods, Algorithms, Result IFDs etc. are all in the
database.
- Bad SQLs in retrieve method implementations
- Expensive SQLs in blocking algorithms, processing algorithms, field level algorithms etc.
If you are analyzing performance, you need to realize that regardless of how much data is there, All of it is cached after the first access. So it is not worth your while to worry about these SQLs. Just make sure that sl_cache_parm table has large numbers as cache_siz. We expect all of the data to be cached so increasing the numbers is ok.
Often people trace a slow transaction and then go off on a tangent about these 100s of SQLs that are pulling data from integrator meta-data tables. If folks who are not familiar with integrator get involved (e.g. DBAs) then the discussion goes further off track because they keep coming back to these SQLs. You need to understand that these SQLs make no difference over the long run. For example if you are downloading an order - after first download, every other download will not read this meta-data.
Integration performance issues are always in one of the following places:
-
Lets say you are communicating to another system over sockets or over JMS.
In such cases what if the message is corrupted over the queue or the socket;
how would you troubleshoot? Similarly if data is sent to you how do you see
in raw format what was sent before it is processed.
- Create environment variable UC_SEND_OVER_QUEUE and UC_CREATE_FILE_FOR_MSG Idea is that if UC_SEND_OVER_QUEUE is F, I would not call the components that push message to the queue. This implies that if the development environment is not connected to the queue my events will still go to SC.
- Use this for inbound data as well For data coming into integrator, you cannot make a change in the communication method; instead override the "sl_handle inbound_data" command. In this case use the UC_CREATE_FILE_FOR_MSG environment variable to see if the functionality is enabled (you can also use the communication method attributes). At this time you have "dwnld_info" available along with "data". dwnld_info may have interesting information to create a file name (e.g. for JMS it has a signature of the message). data is the raw data.
People generally consider communication method as a sacred entity that no one should touch - in fact creating custom communication methods is quite easy and I always create a custom one to support the following ideas:
The UC_CREATE_FILE_FOR_MSG, if set to T, will write a file in a pre-defined location with the full message that the system was about to push to the queue.
These two help a lot because I can always see on my system what the message will look like. It helps in troubleshooting where the exact issue is.
To implement this you just have to modify the post algorithm of the communication method (and then create a custom communication method).
So you can create the file first and then call the "^sl_handle inbound_data" to call core functionality.
It's good you blog about integrator it's a bit of a black art with not many people knowing about it.
ReplyDeleteInvesting online has been a main source of income, that's why knowledge plays a very important role in humanity, you don't need to over work yourself for money.All you need is the right information, and you could build your own wealth from the comfort of your home! Binary trading is dependent on timely signals, assets or controlled strategies which when mastered increases chance of winning up to 90%-100% with trading. It’s possible to earn $10,000 to $20,000 trading weekly-monthly in cryptocurrency(bitcoin) investment, just get in contact with Mr Bernie Doran my broker. I had almost given up on everything about binary trading and never getting my lost funds back, till i met with him, with his help and guidance now i have my lost funds back to my bank account, gained more profit and I can now trade successfully with his profitable strategies and signals! Reach out to him on Gmail ( BERNIEDORANSIGNALS@GMAIL.COM ) , or his WhatsApp : +1(424)285-0682 for inquiries
DeleteI lost my job few months back and there was no way to get income for my family, things was so tough and I couldn’t get anything for my children, not until a met a recommendation on a page writing how Mr Bernie Doran helped a lady in getting a huge amount of profit every 6 working days on trading with his management
Is it possible to configure multiple instance RP Integrator pointing to Single Discrete Instance? Does RP Integrator support Window Clustering? (I am using RP 2011, DB: SQLSERVER)
ReplyDeleteYes it is possible to do that,
DeleteThe information given here is very useful. It explained most of the things in detail. If anyone is interested to take RedPrairie training (WMS, Discreet, Dispatcher) then visit http://www.maxmunus.com/ or you can mail at contact@maxmunus.com for more details.
ReplyDeleteI really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in RedPrairie, kindly contact us http://www.maxmunus.com/contact
ReplyDeleteMaxMunus Offer World Class Virtual Instructor led training on RedPrairie. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
For Demo Contact us:
Name : Nitesh Kumar
Email : nitesh@maxmunus.com
Skype id: nitesh_maxmunus
Contact No.-+91-8553912023
Company Website –http://www.maxmunus.com
I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor led live training in RedPrairie, kindly contact us http://www.maxmunus.com/contact
ReplyDeleteMaxMunus Offer World Class Virtual Instructor led training on RedPrairie. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
For Demo Contact us.
Nitesh Kumar
MaxMunus
E-mail: nitesh@maxmunus.com
Skype id: nitesh_maxmunus
Ph:(+91) 8553912023
http://www.maxmunus.com/
In my system communication method, I have SL_XML_TO_FILE_2 as outbound async. My xml files are created as expected originally. Now I will like to have the xml tag in the output file even if one specific field does not have a value. I do not know how to achieve it.
ReplyDeleteHi,
ReplyDeleteThank you for informations shared above. Is it posible to use file name to indicate the correct event to run?
Hi ,
ReplyDeleteThank you for above information ,its really a great help. Can we get the command name in which event is log just by knowing the event name? please help me
Hi,
ReplyDeleteWhat would be the approach to create XML tags with attributes?
e.g.: for shipfrom address, for shipto, etc.
Thanks
Hi,
ReplyDeleteWhat would be the approach to create XML tags with attributes?
e.g.: for shipfrom address tag 'ADR types:ADRTYP="SF"', for shipto tag 'ADR types:ADRTYP="ST"', etc
All thanks to Mr Anderson for helping with my profits and making my fifth withdrawal possible. I'm here to share an amazing life changing opportunity with you. its called Bitcoin / Forex trading options. it is a highly lucrative business which can earn you as much as $2,570 in a week from an initial investment of just $200. I am living proof of this great business opportunity. If anyone is interested in trading on bitcoin or any cryptocurrency and want a successful trade without losing notify Mr Anderson now.Whatsapp: (+447883246472 )
ReplyDeleteEmail: tdameritrade077@gmail.com
Something that has always annoyed me with reports and integration is why some variables feed in with a space character " " instead of a null value. Then when you use an NVL statement as an IFD expression - nvl(:srvlvl, uc_srvlvl) you end with a space and then a corresponding null in the processing algorithm. Any good tips to solve for this?
ReplyDelete