on 06-26-2020 4:03 PM
Dear Experts,
I have created a simple SAP iRPA bot in which i am calling an RFC. I have created Input and output structure in context and mapped the input/output and input manager under properties as shown below .
I have mapped the input parameters to the RFC fields like this
and imported the package in Cloud and created the API Trigger. Now i am trying to test it via postman. It is getting triggered
but getting failed with below error "Step GLOBAL.CAIPostJE.PostJE: TypeError, 'IO.Entry' is null or not an object
I am not sure, what is that i am doing wrong here. I also not sure if i can debug the postman trigger of the bot.
Please help with this if you can.
Tagging the experts with hope 🙂
stefan.schnell peter.engel chaitanyapriya.puvvada
Regards
Vijay
vijay.sharma4
Hi Vijay,
Are you mapping the user name from the your chat bot too ?
Regards,
Priya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
vijay.126 :
Hi Vijay,
Looks like the payload passed in post man and API trigger are same including the key word invocationcontext.
Your screen shot of postman doesnot show the invocationcontext key word.Hope it is included.
You had mentioned that the user name is not mapped .Can you elaborate on this?
Hope you are using OAuth authentication in POSTMAN to execute the call.Refer this link more details.https://help.sap.com/viewer/c836fab4182e45548b6c6c6d0d0a9146/Cloud/en-US/347ba172a8e64f1c8544f460264...
If yes, What is the output when you are executing the POST call in POSTMAN ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
vijay.126
Hi Vijay,
Can you please confirm you have exposed your parameters as Skills in Cloud Studio.
Please confirm if you have done step 5 in my blog.
If you expose them correctly ,you can test it postman by sending the input parameters.
Are you able to see your parameters in the Payload of API trigger.(Invocation context)?
Step no 6 ,3rd screen shot in my blog.
Please attach the screen shot of the payload of API trigger. We can check the input parameters mapping
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, the parameters are exposed as skills in Cloud Studio as shown below (so step is done)
In cloud Factory, the log looks like below
And from postman , i am sending the same data as as shown below
As you can see am sending username in invactionContext? could that be a problem as that is not mapped to anything
Regards
Vijay
vijay.126
Can you let me know when you tested the Application in Desktop Studio(Debug mode) if you had received the output data.
If you had faced any error ,let me know the error and attach the screen shot of the same.
Thanks
Priya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks chaitanyapriya.puvvada for your response.
First i tested my Bot in debug mode by setting the context variables with hardcoded values like below
rootData.IO.Entry.v_cc = "1810";
rootData.IO.Entry.Hdr_txt = "Test Header";
rootData.IO.Entry.docDate = "20200622";
rootData.IO.Entry.Fis_per = "06";
rootData.IO.Entry.Doc_typ = "SA";
rootData.IO.Entry.Xref_doc = "REF DOC1";
and mapped them to the target fields.
hdrdata("HEADER_TXT") = rootData_IO.Entry.Hdr_txt;
hdrdata("COMP_CODE") = rootData_IO.Entry.v_cc;
hdrdata("DOC_DATE") = rootData_IO.Entry.docDate;
hdrdata("PSTNG_DATE") = rootData_IO.Entry.docDate;
hdrdata("FIS_PERIOD") = rootData_IO.Entry.Fis_per;
hdrdata("DOC_TYPE") = rootData_IO.Entry.Doc_typ;
hdrdata("REF_DOC_NO") = rootData_IO.Entry.Xref_doc;
and it executed successfully without error.
Now as the input is supposed to come from API trigger input, i have removed the hardcodded population of context variable.
Bot gets triggered from postman, job gets created ,but fails with the error
"Step GLOBAL.CAIPostJE.PostJE: TypeError, 'IO.Entry' is null or not an object"
Regards
Vijay
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.