Refreshing submit button

Hi,

I have several DB tasks shown in a to-do list, where it is possible to reassign these tasks to other users. I need to ensure, just before submitting any task, to check if meanwhile a user has been filling the form, anyone has reassigned that task to another user. In that case, if the user click into the "Complete" button, the task can´t be submitted and a warning must be shown in the form.

My approach was create a rule that check the if loggedInUser() match with the user in the column of these record, returning a boolean. When I clicked into the "Complete" button, the rule must be executed and decide if I can submit the task or not.The problem is that that rule is execute just once when the user open the task and I can't find a way to force the execution of therule every time I click into the button. In some tasks there is no option for the user to insert data, only display information and complete the task so refreshing that rule everytime the user change data in the form doesn´t work for that cases

Any ideas?

Thanks!

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Senior Developer

    My approach would be to get rid of the start form and the first node would be a XOR to check the assignee value if null, update the task details as assigned and then this would be visible as the task is assigned and the user will be aware. You would need a additional node here to update the assignee value which would be redirected from the UIT to this script by an exception flow. So this will allow user some time to complete the task and when unattended or not submitted it would automatically be updated to a null value for the assignee.


    If the assignee value is not null you would have another node a simple interface to show that the task is locked. 

    You will have to write down the assignee value before showing the form to the user, so that the task cannot be parallelly picked up y someone else. 

    Lets wait for the other ideas.

  • I think about this approach, it looks like the most reasonable way to go. I don't understand why Appian doesn't out-of-the-box allow usto do something like this, without using weird workarounds.

    Thanks for your response

  • 0
    Certified Lead Developer
    in reply to ab2370
    I don't understand why Appian doesn't out-of-the-box allow usto do something like this, without using weird workarounds.

    DB tasks are not a natural concept in Appian, and so, design decisions do not incorporate this use case.

  • the Appian consulting team always recommends us to use DB task to avoid "memory overload"...this is really confuse for me because I saw several time in this forum several leads devs recommend using "normal Appian tasks" instead of DB tasks

Reply Children