03-31-2021 07:58 AM
I have a subflow script that is being used to set an alert prompt to play or not depending on whether the alert setting is turned ON or OFF. This variable is updated by calling into a separate trigger on the application and ultimately routed to this attached subflow script. The script seems to be failing on the Keyword Transform Document step as the value that fills in is "BIN[3C3F786D...]". I thought it should put in the same value as is listed in the XMLCurrentState document variable.
The authenticate user step is successful so I know it is not a username/password problem. Seems like I am off on my context somewhere either above these steps when filling out the "mode" string, or in the XML steps filling out the %state% values. In any case, the upload document step always ends up going to the unsuccessful branch which is where it fails.
Any help is greatly appreciated.
Thanks,
James
Solved! Go to Solution.
04-01-2021 06:52 PM - edited 04-01-2021 07:16 PM
1. I disagree with the previous response that the Authenticated User role needs to be Admin. This is not true. I searched through the Admin and Scripting guides and could not find where this is stated. So I tested it. Turns out, the Agent role is able to upload successfully, once authenticate. ...and you really don't want to write a script with the Admin user and PIN (or Password) exposed in plain text--this is a bad practice from a security perspective [IMHO]). Now, there is a way to "hide" this, but that is outside the scope of this reply.
2. You were really close to getting this working!! You have an order of operations issue to resolve... Here's my sample script I wrote that does very close to the same thing for this section of the script:
Sample script:
Variables used:
Sample Transform Template:
Final XML Document Uploaded:
Again, my Authorized User is an Agent:
Hope this helps.
-Sean
04-01-2021 03:08 AM
you check username is role admin CCX
When action upload in system UCCX need role's user admin system UCCX
04-01-2021 06:52 PM - edited 04-01-2021 07:16 PM
1. I disagree with the previous response that the Authenticated User role needs to be Admin. This is not true. I searched through the Admin and Scripting guides and could not find where this is stated. So I tested it. Turns out, the Agent role is able to upload successfully, once authenticate. ...and you really don't want to write a script with the Admin user and PIN (or Password) exposed in plain text--this is a bad practice from a security perspective [IMHO]). Now, there is a way to "hide" this, but that is outside the scope of this reply.
2. You were really close to getting this working!! You have an order of operations issue to resolve... Here's my sample script I wrote that does very close to the same thing for this section of the script:
Sample script:
Variables used:
Sample Transform Template:
Final XML Document Uploaded:
Again, my Authorized User is an Agent:
Hope this helps.
-Sean
04-05-2021 01:20 PM
Yes, that is very helpful @Sean Lynch . I was able to get mine working with reconfiguring the steps as you outlined above. Also, just for FYI, the script I was using was built on version 10.X and I was trying to get it to work on 11.6. By all reason it should have worked, but I had to rebuild it from scratch all the way which was actually helpful so that I could clear out unused variables, etc.
I agree on the authentication steps you mentioned above as well, and was hoping to actually use this script as a subflow or as part of a switch step. In my script I have an authentication subscript that authenticates a supervisor agent with their telephone number and PIN and then my hope was to transfer any variables over to this subflow script so that I could just use the agent/supervisor credentials instead of using my admin credentials. I'll mess around with the input and output mappings on these scripts to see if I can carry any of those variables over so that I don't reveal my admin username and password.
09-21-2023 04:49 AM
Ok, my issue is now resolved, after changing the order described above my upload step continued to fail. I opened a TAC case and there is a undocumented bug, after upgrading to System version: 12.5.1.11003-511 there were two issues, TAC had to root in twice, once to fix a file management issue and the second time for this issue, which was a permission issue.
Failed to upload file with path:/en_US/SPMCurrentState.xml
3588757: Sep 21 12:59:32.216 CEST %MIVR-FILE_MGR-3-EXCEPTION:THREAD:MIVR_FILE_MGR_LOW_PRIORITY_UPLD_DOWNLD-200-0-UPLOAD:java.io.IOException: Permission denied
After rooting in the upload works fine.
09-21-2023 12:55 AM
I am having a difficult time following the solution. I have the same exact script as the original poster. Where users select to change the condition from automatic to closed and then confirm that they want it updated to closed, then authenticate a user, then create xml document, then do keyword transform, which is where it failes with the same BIN error, then the next step is to upload. We are not using a subflow. I am not opposed to using a subflow, I am just not clear what needs to be re-organized to make this work.
09-21-2023 01:57 AM
There is an inconsistency above in the solution or I am not following it, where you show the upload document step it says doc to string variable. is the string variable the name of the saved document? I am getting this far, then it fails on upload doc
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide