Skip to main content
September 16, 2024
Solved

How to Refresh an Interface After a Process Model ?

  • September 16, 2024
  • 3 replies
  • 0 views

I am working on a project where I need to refresh an entire interface after a process model has completed execution. I need to ensure that once this process model finishes executing, the associated interface is refreshed to reflect any changes.

I have tried using the onSuccess property to trigger a refresh, but unfortunately, I have not been successful with this approach.


I would appreciate any advice or examples on how to implement this. Specifically, I am looking for guidance on:

  • Using Appian components, plugins, or configurations
  • Any combinations of approaches that could achieve the desired outcome

Thank you in advance for your assistance!

Best answer by somasundaram.d

Make sure your all your nodes in the process model are activity chained. 

You can also try having all your local variable in the refreshVariable() with refresh on variable change configuration. On the Onsuccess parameter of start process change the value of the variable on which the interface's local variables are refreshed.

3 replies

September 19, 2024

Not sure if refreshing the whole interface is possible OOTB but if you need to get the data back from the process once it is finished you can do the following.

in the onSuccess do a list of a!save instead of a!refreshContent

Looking at the documentation you have access to the fv!processInfo, with this you can update any variables related to this for example if you are making a modification to ri!book and in the process you have a process variable pv!book. 

You can add a save to the onSuccess parameter as follows 

onSuccess: {
    a!save(
    ri!book, 
    fv!processInfo.pv.book
    )
}

which then the data will be updated in your interface. 

Read more on a!startProcessLink here -> docs.appian.com/.../Start_Process_Smart_Service.html

somasundaram.d
September 19, 2024

Make sure your all your nodes in the process model are activity chained. 

You can also try having all your local variable in the refreshVariable() with refresh on variable change configuration. On the Onsuccess parameter of start process change the value of the variable on which the interface's local variables are refreshed.

stefanhelzle0001
September 19, 2024

The trick with Appian is to not try to refresh "the interface", but refresh the data the interface displays. I assume that you store some values to local variables. You can use a!refreshVariable to make those refresh.

In such tricky situations, where I need very clear control on when something refreshes, I use a local variable "refreshCounter". For the locals I want refreshed, I use a!refreshVariable like this

a!localVariables(
  local!refreshCounter: 0,
  local!yourLocale: a!refreshVariable(
    value: 
    refreshOnVarChange: local!refreshCounter
  )
)

I can then use a!save() to increase that counter from anywhere within the interface.

BTW, how did you come up with "a!refreshContent"?