Listrecords is not regressing in process

Hello everyone

I am totally new in outsystem process.my secanrio is

I have one process in that process I have one human activity.based on one true decesion I am executing the human activity.based on false decesion I am executing one automatic activity.means in that automatic activity I updated status based on some criteria.


In web screen I have approve button.in that button I called the process with the help of launchprocess event.after execution process I called one list record page with help of destination.but after updating status with help of automatic activity ,I want to refresh the list records page which is called through destination.but entity status is updated but list records is not refreshed.but when I logged out and login again at that time list records are refreshed.


Plz help me to solve this

Hi Bharadwaj,

After going through the your description , i get to know your having the process flow similar to this

On Human activity you are traversing to the destination screen.and on automatic activity you are trying to refresh the list record status. If my assumption is correct. Then issue may be here ,On the human activity you are going to Destination screen then the page preparation calls and page renders, after  that in the process you are updating the list record status, Here the status is getting updated but your already render the page in human activity with old status, this is the reason for list is render with the old status.

When you are login again into the system then again the page preparation calls . That's why now its showing the list with the updated status.

Regards,

Koushik

Arkyadeep Bharadwaj wrote:

Hello everyone

I am totally new in outsystem process.my secanrio is

I have one process in that process I have one human activity.based on one true decesion I am executing the human activity.based on false decesion I am executing one automatic activity.means in that automatic activity I updated status based on some criteria.


In web screen I have approve button.in that button I called the process with the help of launchprocess event.after execution process I called one list record page with help of destination.but after updating status with help of automatic activity ,I want to refresh the list records page which is called through destination.but entity status is updated but list records is not refreshed.but when I logged out and login again at that time list records are refreshed.


Plz help me to solve this


Hi,

For entities to be in sync with the business process, you can use On Ready, On Open, On Close.

In your case, you can create an On Close() action(right click on the human activity and then add) for that particular activity and set the status which you want in that particular human activity.

Hope this helps you!!!

Solution

Hi Arkyadeep Bharadwaj,

Let me see if I got everything straight:

  • in your first screen you have a button that:
    • Starts your process
    • Goes to second screen
  • In your process you:
    • either run a human activity or;
    • run an automatic activity that updates the status of some record
  • on your second screen you display a list of records that include information about status.

Although I feel Koushik's description of your process doesn't match yours, what he's saying makes sense:

Your process doesn't start immediately, it's scheduled to be execute when possible. This means that navigating to your second screen will happen before the process runs/finishes, and will display the original status.

If you want your second screen to display up to date results you will have to use JavaScript to regularly request a refresh of the screen (something like: have a setTimeout() that clicks a hidden button with method Submit to a Screen Action that has no logic inside). But I'm curious why you need this setup? Can you explain a little bit more why you need to have a process like the one you described, and also want for its outcome to be immediately visible on screen?

Solution

Jorge Martins wrote:

Hi Arkyadeep Bharadwaj,

Let me see if I got everything straight:

  • in your first screen you have a button that:
    • Starts your process
    • Goes to second screen
  • In your process you:
    • either run a human activity or;
    • run an automatic activity that updates the status of some record
  • on your second screen you display a list of records that include information about status.

Although I feel Koushik's description of your process doesn't match yours, what he's saying makes sense:

Your process doesn't start immediately, it's scheduled to be execute when possible. This means that navigating to your second screen will happen before the process runs/finishes, and will display the original status.

If you want your second screen to display up to date results you will have to use JavaScript to regularly request a refresh of the screen (something like: have a setTimeout() that clicks a hidden button with method Submit to a Screen Action that has no logic inside). But I'm curious why you need this setup? Can you explain a little bit more why you need to have a process like the one you described, and also want for its outcome to be immediately visible on screen?

This is my  first screen dashboard_evaluator.clicking on hyperlink Case No i am opening next screen which contain Approve button.

from approve button i am calling one process


Priya Khade wrote:

Arkyadeep Bharadwaj wrote:

Hello everyone

I am totally new in outsystem process.my secanrio is

I have one process in that process I have one human activity.based on one true decesion I am executing the human activity.based on false decesion I am executing one automatic activity.means in that automatic activity I updated status based on some criteria.


In web screen I have approve button.in that button I called the process with the help of launchprocess event.after execution process I called one list record page with help of destination.but after updating status with help of automatic activity ,I want to refresh the list records page which is called through destination.but entity status is updated but list records is not refreshed.but when I logged out and login again at that time list records are refreshed.


Plz help me to solve this


Hi,

For entities to be in sync with the business process, you can use On Ready, On Open, On Close.

In your case, you can create an On Close() action(right click on the human activity and then add) for that particular activity and set the status which you want in that particular human activity.

Hope this helps you!!!

This is my  first screen dashboard_evaluator.clicking on hyperlink Case No i am opening next screen which contain Approve button.

from approve button i am calling one process



Jorge Martins wrote:

Hi Arkyadeep Bharadwaj,

Let me see if I got everything straight:

  • in your first screen you have a button that:
    • Starts your process
    • Goes to second screen
  • In your process you:
    • either run a human activity or;
    • run an automatic activity that updates the status of some record
  • on your second screen you display a list of records that include information about status.

Although I feel Koushik's description of your process doesn't match yours, what he's saying makes sense:

Your process doesn't start immediately, it's scheduled to be execute when possible. This means that navigating to your second screen will happen before the process runs/finishes, and will display the original status.

If you want your second screen to display up to date results you will have to use JavaScript to regularly request a refresh of the screen (something like: have a setTimeout() that clicks a hidden button with method Submit to a Screen Action that has no logic inside). But I'm curious why you need this setup? Can you explain a little bit more why you need to have a process like the one you described, and also want for its outcome to be immediately visible on screen?

This is my  first screen dashboard_evaluator.clicking on hyperlink Case No i am opening next screen which contain Approve button.

from approve button i am calling one process



The reason underlined above is why you are not getting the up-to-date results... your process isn't reaching the activity that updates the status before the second screen's preparation reads those values.

Most likely this will always be the case, even if your process was simpler, due to the asynchronous way in which processes are implemented.

Jorge Martins wrote: i did not understand.can you please tell me briefly.

The reason underlined above is why you are not getting the up-to-date results... your process isn't reaching the activity that updates the status before the second screen's preparation reads those values.

Most likely this will always be the case, even if your process was simpler, due to the asynchronous way in which processes are implemented.



Arkyadeep Bharadwaj wrote:how to resolve that issue.Today i have some client demo.but till its not working.

Jorge Martins wrote: i did not understand.can you please tell me briefly.

The reason underlined above is why you are not getting the up-to-date results... your process isn't reaching the activity that updates the status before the second screen's preparation reads those values.

Most likely this will always be the case, even if your process was simpler, due to the asynchronous way in which processes are implemented.





Arkyadeep Bharadwaj,

It is not "an issue" it's how business processes work... you initiate them and then they run independently.

If your dashboard is not too heavy, you could use an Expression. It should have the Escape Content property set to Yes and it's Value property set to something like this:

"function refreshScreen() {
    location.reload(true);
    setTimeout(refreshScreen, 5000);
 }
 setTimeout(refreshScreen, 5000);"

NOTE: 5000 is in milliseconds, corresponds to "reload every 5 seconds", the true value forces the page to be requested to the server again.

If your dashboard is heavy, you want to just refresh the relevant portion of the screen (let's say it is a TableRecords called MyTableRecords with a Source Record List set to an Aggregate called MyAggregate). In that case you need to:

  • add a Container to your dashboard.   
    • Set the Display property to False;
    • Inside add a Button (this button will refresh the MyTableRecords with up-to-date data):   
      • Set its Name property to "RefreshPartOfScreenButton";
      • Set its Destination to be a (New Screen Action);
      • On the new Screen Action, use the Data Refresh tool with your MyAggregate in order to get up-to-date data, followed by the Ajax Refresh tool with your MyTableRecords (so the up-to-date data gets displayed).
  • add an Expression.   
    • Set the Escape Content property set to Yes;
    • Set the Value property to something like this:
      "function refreshScreen() {
           $('#" + RefreshPartOfScreenButton.Id + "').click();
           setTimeout(refreshScreen, 5000);
       }
       setTimeout(refreshScreen, 5000);"
      NOTE: 5000 is in milliseconds, corresponds to "reload every 5 seconds", the true value forces the page to be requested to the server again.

If I didn't make any mistake, this should work and your data will be refreshed every 5 seconds.