Posted: 28 Oct 2015 22:48 EDT Last activity: 29 Oct 2015 4:46 EDT
Conditional exit on UI Element Event based (clickable) actions
Have a scenario where I had to include a Cancel button in a screen flow when clicked on will withdraw the case. This Screen flow is part of a mashup on Customer portals through IAC.
1. When user clicks on cancel button, he needs to be warned of what he is doing (like "Are you sure you really want to cancel the application?") --> Have used a local action to popup, warning the user. When user clicks on "Ok", the logic to withdraw the case is implemented as part of the post action activity of the flow action.
2. As the second action for the click, used harness Action to replace with current screen with a harness advising user that his application is cancelled
Now, the issue is, despite user selecting "ok" or "cancel" in flowaction part of clickable first action, the second action is always executed. All I am looking for is if there is a way to conditionally exit from performing the rest of the actions.
Or if there is any other way of achieving this requirement by not getting into hand coded java scripts is very appreciable.
Few other things I tried,
1. In the second action, call an activity which conditionally calls Show-Harness method but it is not replacing the current screen with new harness
2. Get rid of second action and in the first action, call Show-Harness method which still does not work.
Got to know another way of achieving above requirement.
For the second action, instead of using Harness action, Use Refresh action with Current harness option and run "RefreshOnConflicts" OOTB activity which will replace with "Review" harness on Ok. Else leaves the screen in tact. If you need to replace with harness other than Review, then customize "RefreshOnConflicts" activity.
2. Why do you need to separate performing a local action and viewing harness in two actions? The reason I am asking this is that if "Look for an assignment to perform" check box is deselected in the action tab of flow action rule form, usually the confirm harness will display automatically and the harness you want to show instead of confirm harness is also configurable.