Question
Iris Global Soluciones
ES
Last activity: 5 Oct 2016 5:25 EDT
How to refresh a harness from an activity
Hi,
I need to do a refresh harness from an activity which is callled from a "Run activity" action configured in a link control. For instance: The user clicks on a link and the following action are triggered :
1. Local action is fired which opens up in an ootb modal dialog.
2. Run activity "TestA".
Activity TestA does a FinishAssignment call and change stage to a previous case stage. Everything in clipboard appears to be ok, the NewAssignPage corresponds with the previous assignment and pyWorkPage.pxFlows reference the correct previous flow where the process needs to go but the problem is that the harness does not get refreshed and the previous screen is not shown.
I have tried to call DisplayHarness, ReloadHHarness and Show-Harness methods from the activity after the FinishAssignment call step but i haven't suceeded.
Anyone has any idea how to achieve this.
Regards,
Israel
***Updated by moderator: Marissa to update categories***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Iris Global Soluciones
ES
I haven't tried your solution as we decided it to specialize an ootb pega modal template and create a button to set the corresponding actions on it but your answer or approach looks pretty good to me and also your collaboration and help make me understand a couple of things.
Thanks for your help. I really appreciated it.
Blue Rose Technologies GmbH
DE
Hi Israel,
"Run Activity" action is just used to execute an activity in the server side and update the pages in the clipboard. Please note that it doesn't bring any response back to the client. If you want the UI to be refreshed, you can either configure,
explicit refresh whens on the layout / section based on property changes (or) configure refresh current harness action.
Iris Global Soluciones
ES
Hi,
Actuallly i have configured a Refresh Current Harness action after the TestA activity run. For instance the way the action are set in the link control is as follows:
1. Local action is fired which opens up in an ootb modal dialog.
2. Run activity "TestA".
3. Refresh Current Harness.
But the problem is that as the first action launches a Local Action in a modal dialog, the Refresh Current Harness needs to be executed only when the user clicks on Submit from the Modal Dialog in the Local Action and not when the user cancel the modal dialog.
And there's no way to make the Refresh Current Harness action conditional.
Any other suggestion.
Regards,
Israel
Blue Rose Technologies GmbH
DE
Okay. So basically this is what happens when you configure actions after local action. Basically we wait for the modal dialog to be submitted or dismissed, then we fire all the remaining actions.
To accompolish your requirement, please do the following things,
1) save as pzModalTemplate section (@baseclass) to your application ruleset in a different name and use that section in the local action configuration (under override modal template).
2) Replace the Submit button in your custom modal template section with OOTB button and configure following actions,
a) Run activity
b) Run script -> "doModalAction",
Name : submitModalDlgParam value : script:pega.u.d.submitModalDlgParam
Name: event value : script: event
This action will actually take care of submitting the modal dialog and refreshing the section from where it was launched.
Note: If harness refresh is required, then you can configure 3rd action to refresh the harness.
Wells Fargo
IN
Hi,
I have a requirement where i need to launch local action from an activity can you help me out
Iris Global Soluciones
ES
Thanks for the quick response.
I think that should do the job, i will let you know how it goes.
I wanted to avoid to do a save as of pzModalTemplate section (@baseclass) to my application ruleset and create a button with actions on it but i can see there's no other way to do it.
Regards,
Israel
Blue Rose Technologies GmbH
DE
Yeah i can totally understand that. Thing is we don't have any OOTB actions for modal submit, so this is the only way to accompolish that atleast for now.
Accepted Solution
Iris Global Soluciones
ES
I haven't tried your solution as we decided it to specialize an ootb pega modal template and create a button to set the corresponding actions on it but your answer or approach looks pretty good to me and also your collaboration and help make me understand a couple of things.
Thanks for your help. I really appreciated it.