cancel
Showing results for 
Search instead for 
Did you mean: 

SAP iRPA Environment Variable - Cannot read properties of undefined Destination

Jana_dK
SAP Mentor
SAP Mentor
0 Kudos
1,279

Hi All!

We're trying to execute some automations wherein we use the "call webservice with destination" activity.

The destination itself is an environment variable, linked to an S4 cloud system and it has been set in the environment variables.

At some moments it can read the destination without problems, and at other moments it's unable to retrieve the destination configuration:

The only thing I can do to "fix" this, is changing the destination in the environment variables to something else and then change it again to the S4 destination. The workflow notifier attached to the trigger is also not working properly at that moment. The same fix is needed there : change the destination and then change it again...

Has anyone experienced this problem? Does someone know how to fix this or where it comes from?

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi,

I am facing similar issue with Destination in SBPA, although the error is "Detail: Invalid Argument: Type of destination must be HTTP." The error seems to be originating from env variable passing incorrect or old value to destination, esp when running the whole process (as opposed to testing individual automation). I have seen similar issues with Text variables where old value gets passed even after deploying the process with new value for env variable. I have asked a question for the same: Build Process Automation: Env Variables issue | SAP Community

Thanks,

Amit

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

We had problems with Environment variables in SAP Build process automation tenants but not with IRPA tenants.

The issues were fixed long back.Not sure which tenants are you using.

Jana_dK
SAP Mentor
SAP Mentor
0 Kudos

Hi chaitanyapriya.puvvada ,

We're using iRPA tenants. We have logged an SAP Ticket in the meantime, it's really unstable in our production tenant. I'm thinking it might be related to the unstability of the desktop agent which also losing connection frequently. (Desktop Agent 3.10)

Kr,

Jana

Jana_dK
SAP Mentor
SAP Mentor
0 Kudos

hi chaitanyapriya.puvvada ,

we're still having issues with the desktop agent that can't read environment variables at some moments..


This one for example: OrganisationID is a environment variable that has been filled in. Yesterday there was no issue, today it was undefined. After changing the environment variable to "test" and changing it again to the original value.. all is solved.


We're using iRPA & Desktop agent 3.15

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi jana_dk,

My understanding of BTP Destination is that it has both a configuration that has to be in place as well as an API to retrieve such configuration. I don't believe that you can enter a destination as an application environment variable as iRPA will try to retrieve the destination by name using the BTP Connectivity API. Thus, if iRPA is performing a call to retrieve a destination named 'S4_PROD' and no such destination existis on your sub-account with that name, it will probably throw an error.

Furthermore, the error you are getting looks like the above is happening as the result produced by an API call to the BTP Connectivity will contain a JSON string with 'owner' and 'destinationConfiguration' as keys. So, it looks like iRPA is trying to retrieve a CSRF Token, but since the destination wasn't found at all with that name, it is probably trying to find the key 'destinationConfiguration' on an empty JSON string. Hence you get the 'undefined' properties error message.

If I misunderstood you, and in fact you are using the BTP destination, than please check that you have the property "sap.processautomation.enabled" set tp be equal to "true". That could prevent the API from retrieving this destination as being part of the ones that are to be using by iRPA.

On the other hand, if you need information on how to add a destination to BTP, please read the chapter 6.10 "Manage BTP Destinations" on the iRPA manual:

https://help.sap.com/doc/ba928721bf7d4fd4b8a794faead5c51a/Cloud/en-US/loiod10fed49ebb24e2eb02fa94522...

Best regards,
Ivan

Jana_dK
SAP Mentor
SAP Mentor
0 Kudos

Hi ivan.mirisola ,

thank you for your answer. The destination has been used several times as an environment variable and this works. It has also been added to the environment we're testing it, it's possible to use the destination environment variable while testing, the properties are also correct (otherwise i wouldn't be able to get something working 😉 )

The problem is that it's rather unstable, sometimes the automation does find the environment variable (and everything works as designed) and sometimes it doesn't. I have lots of examples where the same automation works as desgined..
This also happens with other environment variables (string environment variables for example).

I've been using the destinations as environment variables ever since the possibility of doing so in SBPA / iRPA, but i've never experienced such instability of the environment variables.

Kind Regards,

Jana