Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Control is not calling activity and event sequencially

SA-3526

Summary



When a using a user created a control for calling an activity and close event via a Modal dialog, the order of the two events isn't always as defined in the control's javascript (observed in tracer and log events). The control appears to call activity first and then call the Event, but sometimes the order switched.

Error Messages



N/A

Steps to Reproduce

  1. Create one Modal Dialog window
  2. Create button in Modal Dialog window
  3. Call control from that button
below is the code for control.

<script>

function RunActLoad(){
handleClientEvent ('SERVER','LoadRequirementList','','-1',event);
RunActLoads();

}
function RunActLoads(){
doModalAction(pega.u.d.submitModalDlgParam,event);
}

</script>
<!-- simple HTML button definition
<input type="button" onclick="RunActLoad()" value="Done" />
-->

<!-- PEGA L&F button definition -->
<NOBR>
<BUTTON class=pzhc onclick="RunActLoad()" >
<DIV class=pzbtn-lft>
<DIV class=pzbtn-rgt>
<DIV class=pzbtn-mid data-click="...">
<IMG class=pzbtn-i>Done
</DIV>
</DIV>
</DIV>
</BUTTON>
</NOBR>
<pega:reference name="$save(BUTTON-caption)" />

Root Cause



The root cause of this problem is a defect in customer application code/rules. The user defined function launches an asynchronous activity which the system doesn't wait to be completed prior to proceeding.

Resolution



The explanation for this behavior is as follows:

The user defined function launches an asynchronous activity which the system doesn't wait to be completed prior to proceeding.

 

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us