cancel
Showing results for 
Search instead for 
Did you mean: 

Can you get session in a DataFlow in CDC?

0 Kudos
512

Hi!

1.I'm trying to fetch token & cookie in dataflow in CDC calling a SMC API and later use these to make a PUT call, but every time the DF runs for a new user, it gets a new token & cookie and this makes the DF fail after 15 users, but if I hard code these values in DF, it runs well for all users.

In Postman when I do a GET to fetch token & cookie it always returns the same values for aprox. 30min. How can I also get this behavior in DF, so not every time a new token & cookie is returned when DF runs for multiple users. Is there a way to get the session?

2.If the above is not possible, in a record.evaluate component, can you run a custom JavaScript to run API calls and move all the logic that I have in "datasource.write.external.generic" into this script, I can't find a way to make it work, apparenty the custom script can be used for basic operations but not to GET/PUT to SMC API ? Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

yan_nasonov
Discoverer
0 Kudos

Hi Robert,

Indeed, when the dataflow runs, in order to allow concurrency, each step runs independently, including each record within a certain step. Therefore information is not passed between records.

What you can do, and I don't necessarily recommend it but it's possible, is to use the shared variable system to write a shared variable with the token and only update it on each run, or if there is an error.

An example of how this can be done (broadly speaking) can be found in our Master Data Management > SAP Master Data Integration Service – Inbound template. This injects a delta token from a shared variable, though the write is done via the MDI step (you can write separately with the shared variable writer component).

Hope this helps!