on 10-29-2019 4:30 PM
Dear All,
We have one requirement in which we are polling data from a WebService by passing the yesterday's date in URL !!
Sample URL is as : https://<hostname>?date_req={incrementalToken}. We simple kept the initial value as previous date in incrementalToken value and it worked fine. Now we are having an additional requirement in which we need to handle the situation for any maintenance time frame, during which communication channel will be stopped and will be started after a scheduled date.
We are facing challenge, when again channel will be started; channel should take again the yesterday's date value(Date on which channel will be started) in incremental token rather than Initial Value !!
Highly appreciate your support on the same !!
Hi Ashutosh,
We faced exactly same issue, the incremental token value gets reset to initial value in REST sender polling channel when the channel gets restarted. We created incidents and argued with SAP on this for many months and finally changed our design 🙂
As per SAP, it's normal behavior of the REST Polling Sender channel to delete the saved value for the "Timestamp of Last Call" whenever the channel is stopped or restarted. Currently the incremental ID/timestamp is stored into the ID Map Table(XI_AFW_SVC_ID_MAP) with persist until value with 24h validity value. The incremental ID is cleared from the upper table on channel start/stop which occurs when the server is restarted. This was made by SAP in order to make sure in case of changes of the channel configuration the old values are not taken into account.
For example, if we want to poll the URL with a different date, we adjust the initial value in channel and restart it to take the changes effective. This made sense for me.
We later asked SAP, if there is any way to check what was the URL that was polled last time(may be in dynamic config parameters just like how we have the file name polled in file adapter) so that we can implement some logic in mapping to check whether it's required date or not.
Unfortunately, SAP replied saying there is no such feature as of now and they can consider it for development in next SP releases. We're not sure how long it'll take and ended changing our design instead of waiting for SAP. It's a long story but in short I can suggest you the below 2 options.
Option1: Stop the REST sender channel before the system goes down. As soon as the system is up, before starting the channel, adjust the date to current date/required date & then start. This requires manual effort by support during every maintenance and also this applies only incase of planned outages. If it is an unplanned outage, you'll end up polling data for incorrect date.
Option2: Change the design with a dummy sender. For example we added dummy JDBC sender, scheduled it as per required frequency. Then, in message mapping create the polling URL with required date and perform lookup. We've implemented this and is working fine.
Refer SAP note # 2352872. Also, see any alternatives other experts suggest or reach out to SAP.
--Priyanka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Priyanka,
Thanks alot for such a detailed explanation.
I have two more query, first can we anyhow manipulate the value of TimeStamp of Last Call and make it dynamic, such as on this value can we apply custom calendar logic and provide manipulation on it ?
Second can we pass two incremental token for two dynamic parameters in URL ?
In REST sender polling, there is no feasibility to customize timestamp of last call as it's standard parameter. If your requirement is to only fetch data from URL, you can perform REST look up as I mentioned earlier i.e. replace you REST sender with any dummy sender(Ex: JDBC sender - run dummy command/ File - Pick Dummy File), then in mapping prepare dynamic URL & perform REST lookup.
--Priyanka
Hi Priyanka,
Good evening!!
Option2: Change the design with a dummy sender. For example we added dummy JDBC sender, scheduled it as per required frequency. Then, in message mapping create the polling URL with required date and perform lookup. We've implemented this and is working fine.
I am working on the same requirement. And wanted to make sure there should not be any issues in future during maintenance window.
Could you please kindly give some more inputs about the option 2 specified by you mentioned using REST Polling sender. How we can develop the flow.?
Thanks in advance!!
--
With Warm Regards
Raj
Hi Raj,
Sorry for the delayed response. There won't be any any issues for option2 as this approach doesn't require any manual effort during the maintenance.
The Option2 that I mentioned was not REST polling, replace the REST sender polling with JDBC sender. In the JDBC sender select query, pick yesterday's date or the date you required and then in message mapping use the selected date, dynamically create the URL and then call that URL using REST lookup. That means, you are replacing REST sender poller with (JDBC sender+REST lookup). I hope this is clear now.
--Priyanka
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.