Hi All,Currently we are having a workflow which consists of a task which will be worked by a user. When any updates to the workflow occur from external system, we cannot show the updates to the user in the UI when user has the UI already open since the data cannot be refreshed. We are thinking of either cancelling and creating a new workflow with the latest updates or completing the task using smart service and recreating the task within the same workflow. Any insights on which will be better approach will be useful.
Discussion posts and replies are publicly visible
Instead of cancelling/completing the task can you consider adding a refresh icon in the UI and train users to click on it intermittently to fetch latest data into the UI. Basically on click query latest data into the form using link configuration. Additionally on Submit button of form you can compare the latest data in db with the UI data to confirm if data is up to date or not. Form submission can be restricted if data doesn't match.
If the above doesn't suit your use case then you can configure exception timer in the UI node to end the process and provide users with an action to retrigger the action.
Thanks for your reply Harsha. Business do not want do any additional clicks on the UI and again there is always a chance for updates after the last click and before task submission. We cannot perform the data comparison because there is a chance user might modify the data due to some reason and the data from external system might be something different. Exception timer also cannot be used since its not a start process and its a workflow so if exception was added, it will close the workflow which we do not want to occur. Again this is an insurance process so it might take some time for the user to complete the process.
You could add a banner message to the UI which is only shown if there is an update. Then allow the user to see what has changed and load the new data.
This is a bit more complex, but should result in a much better UX.
I think even to show the banner message, the data has to be refreshed to check if there is any update. But we can refresh data only after 30 secs as per the refresh variable configuration. Please correct me if I am wrong Stefan Helzle . Adding refreshAlways true might lead to performance issues since the number of users working is high and it will grow in future
Use a!refreshVariable() with a refreshInterval of about 30 seconds to poll a lightweight data source holding an update flag, avoiding full form reloads. Show a subtle banner to notify users of external changes without forcing refresh or extra clicks. For critical updates, use a smart service in the process model to complete and recreate tasks, keeping audit trails intact. Optimize performance by refreshing only essential data and avoiding refreshAlways=true.Clearly inform users about possible external updates and encourage frequent saving. Note that true real-time updates under 30 seconds aren’t natively supported in Appian.
Sure, but this timing issue is a problem you cannot solve. There could always be a situation where a user makes a decision based on stale data.
I think the important aspect is the UX.
Sarathkumar R said:We cannot perform the data comparison because there is a chance user might modify the data due to some reason and the data from external system might be something different
One way to do this is to keep populate a local variable with form data and not updating it at all anywhere in UI. Only use of this will be in comparing the data at load with data from database table. You can do a check every 30s using refreshVariable() or on Submit button action. If they don't match show the users a banner with action to refresh/load latest data.
That 30 second refreshing might cause performance issues which we do not want to happen. I am really not sure if this should be addressed as a technical workaround or a functional workaround. In other projects, does real time updates happen in the backend and if so how is it handled in the frontend? Are real time backend updates even allowed to the same workflow which is currently open and being worked by a user?Stefan Helzle Mathieu Drouin Harsha Sharma your inputs would be helpful
As I mentioned you can do this check during submit or button action also. Refresh variables can cause performance so try comparing data in a button saveinto and if mismatch is found then show a banner message to re load the form! You can setup variables to show information cards to users when mismatch is found using showwhen.
Generally amongst many options one easy solution is that users are informed that the data is outdated so they can refresh the form or cancel the current form and re open the task!
There is no OOTB information push to the UI in Appian.
Sarathkumar R said:might cause performance issues
... well, it might, or might not. This is something to investigate.
In general, updates pushed into the system from elsewhere are a problem. Making any kind of automated or manual decision based on data that can change at any given time is problematic. But whether this is a problem or not, is a business decision, not a technical one.