How to avoid PRRuntimeException in pxUploadCSVResults activity
I am using OOTB activity @baseclass.pxUploadCSVResults to upload a CSV file into page list. I placed a button to fire this activity as below screenshot and basically it works fine as long as I upload a CSV file onto memory first.
However, if I press this button before I upload a CSV file, Pega throws an Exception as below on user screen.
It is reasonable for Pega to throw an Exception because file does not exist, but I do not like displaying this Exception. There should be a couple of solutions that I can think of, for instance:
1. Disable button until user uploads CSV file onto memory
2. Press button, and nothing happens if CSV file does not exist (no exception is displayed)
3. Press button, and message shows or pops up if CSV file does not exist.
I am okay with any of above solution but simpler the better. What is the best approach? Minimum code is much appreciated.
***Updated by moderator: Lochan to update platform capability***
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
We have resolved the issue this way:
Screenshot 1) Button allocation
Screenshot 2) Button configuration - OnClick, fire your custom activity
Screenshot 3) Your custom activity sample looks like this.
Screenshot 4) Condition in Step 1 (before action)
Screenshot 5) Condition in Step 1 (after action)
Above configuration should give you an error message on screen as below, if you press Upload button before specifying a file.
Hope this helps.
Keep up to date on this post and subscribe to comments
- The Flow Action post-processing activity InitDataOptions failed: PRRuntimeException
- com.pega.pegarules.pub.PRRuntimeException: Unable to restore passivated requestor; error in authorization activation
- Mashup/IAC: PRRuntimeException: No failure response set by custom authentication activity
- PRRuntimeException: No failure response set by custom authentication activity
- How toCall activity fromShellScript To avoid Agent