cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2979
Views
6
Helpful
6
Replies

UCCX 11.6 upload document step unsuccessful

jconyers
Level 1
Level 1

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

Script-Debug.JPGupload-document.JPGkeyword-transform-document.JPGcreate-XML-document.JPG

1 Accepted Solution

Accepted Solutions

Sean Lynch
Level 7
Level 7

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:

Transform, Create, UploadTransform, Create, Upload

Transform Doc StepTransform Doc StepCreate XML Doc StepCreate XML Doc StepUpload Doc StepUpload Doc Step

Variables used:

VariablesVariables

Sample Transform Template:

Sample Template - XMLSample Template - XML

Final XML Document Uploaded:

Final Uploaded XML DocFinal Uploaded XML Doc

Again, my Authorized User is an Agent:

2021-0401-testAgentRole.png

 

Hope this helps.

-Sean

View solution in original post

6 Replies 6

nganvt
Level 1
Level 1

you check username is role admin CCX 

When action upload in system UCCX need role's user admin system UCCX

Sean Lynch
Level 7
Level 7

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:

Transform, Create, UploadTransform, Create, Upload

Transform Doc StepTransform Doc StepCreate XML Doc StepCreate XML Doc StepUpload Doc StepUpload Doc Step

Variables used:

VariablesVariables

Sample Transform Template:

Sample Template - XMLSample Template - XML

Final XML Document Uploaded:

Final Uploaded XML DocFinal Uploaded XML Doc

Again, my Authorized User is an Agent:

2021-0401-testAgentRole.png

 

Hope this helps.

-Sean

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.

 

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.

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.

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