customize time out message

Hi,

We have set a timeout timer event in our user input node that whenever a user goes idle and does not complete a form within the specified period of time, the system closes the task in our process flow. Whenever that happens, a message is displayed to the user saying that the task was submitted successfully, even though nothing was entered in the form. Is there a way to customize this system notification in this case?

Thanks,

Roberta

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I would suggest using a local variable on the SAIL form, set to refresh periodically - it would calculate when a period of time close to the task timeout timer expiration has elapsed, and at that point, display an error message (one you create yourself), and prevent the user from submitting the form at all, since submitting the form doesn't work at all if the task has already closed due to timeout.  If you get creative, you could also show them a warning when there are only so many minutes left (like "less than 10 minutes remain...", then later "less than 5 minutes remain", etc).

  • Hi Mike, have you tried implementing this functionality? We are noticing that when using the code below and displaying local!elapsedSeconds and local!elapsedMinutes, the variables are NOT refreshing consistently every 30 seconds. Do you know if there is an issue with the a!refreshVariable function? 

    local!pageCurrentTime: a!refreshVariable(
    value: now(),
    refreshInterval: 0.5
    ),

    local!elapsedMinutes: a!refreshVariable(
    value: minute(local!pageCurrentTime-local!pageLoad)
    ),
    local!elapsedSeconds: a!refreshVariable(
    value: second(local!pageCurrentTime-local!pageLoad)
    )

  • 0
    Certified Lead Developer
    in reply to erickp0001

    When refresh variables were first introduced I found one bug that could affect your use case, and I'm not sure if it was ever fixed (though I did report it in a support case).  That is, if the *first* declared local variable has a refresh interval, it will not actually refresh on that interval.  I was able to get around this by declaring a different dummy local variable above it.

    In other words, THIS example will never refresh:

    a!localVariables(
      
      local!time: a!refreshVariable(
        value: now(),
        refreshInterval: 0.5
      ),
      
      a!textField(
        value: text(local!time, "hh:mm:ss"),
        readOnly: true()
      )
    )

    whereas this one will:

    a!localVariables(
    
      local!dummy: "asdf",
      
      local!time: a!refreshVariable(
        value: now(),
        refreshInterval: 0.5
      ),
      
      a!textField(
        value: text(local!time, "hh:mm:ss"),
        readOnly: true()
      )
    )

    I just tested it and the issue still seems to be present.  But at least the fix is super easy.

  • Hi Mike, I actually did see your other post where you provided a solution for that issue. However, that is not the problem that I am having. The problem is that even though I am specifying for the refresh interval to be 0.5 minutes, when you output local!elapsedSeconds to the screen, you will see that the variable is not updating consistently every 30 seconds. Instead it updates randomly at 19 seconds or 29 seconds, etc. etc. Do you now why this is happening?

  • 0
    Certified Lead Developer
    in reply to erickp0001

    Oh - I've observed that too, and I'm not exactly sure what's up (my guess is that it has to do with certain rendering mechanics in the back-end of SAIL that we don't get much specific insight into).

    I think for now we should just assume that "0.5" means the refresh will happen *at least* every 30 seconds, and sometimes *more* often.  If you have strong reasoning for the refresh to happen at exactly 30-second intervals, you might have good cause to take it up with Appian via a support case.  I think the "approximate" refresh times should satisfy the use cases for most people, though.

  • Thanks Mike. How would you implement what Roberta is asking if the refresh interval doesn't behave accurately? For example, assume a user input task goes through the exception node after 10 minutes and we want to display a message to the user 30 seconds before the form times something like: Your form will timeout in 30 seconds. I guess we wouldn't be able to do it like that but instead we will keep track of the minutes and seconds elapsed and when it is between 9 and 10 minutes, we display a message to the user? Is that how you would do it?

  • 0
    Certified Lead Developer
    in reply to erickp0001

    Yeah, pretty much what I said in my original reply still applies - i assume we just can't be as precise as "30 seconds", I would suggest that an initial warning be displayed several minutes out, and then another warning (if desired) a minute or more before the deadline; and of course the in-Task deadline should probably be somewhat less (by at least 20 or 30 seconds) than the task's timeout value, because otherwise the refresh might not line up correctly and the task's expiration timer could fire before the on-form time completely runs out.

Reply
  • 0
    Certified Lead Developer
    in reply to erickp0001

    Yeah, pretty much what I said in my original reply still applies - i assume we just can't be as precise as "30 seconds", I would suggest that an initial warning be displayed several minutes out, and then another warning (if desired) a minute or more before the deadline; and of course the in-Task deadline should probably be somewhat less (by at least 20 or 30 seconds) than the task's timeout value, because otherwise the refresh might not line up correctly and the task's expiration timer could fire before the on-form time completely runs out.

Children
No Data