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.