How to auto-close and submit a form (without an User action)

Certified Senior Developer

Hello,

I would like to know how may I trigger a submit action to a form, without a manual User action please ?

(it could be in using a timer...  for example, submitting the form after 10 seconds)

I saw some related posts around Javascript, but is it possible to do this with Appian ?

Regards

  Discussion posts and replies are publicly visible

  • 0
    Certified Senior Developer
    in reply to Mike Schmitt

    Yes, I understand Mike... thank you for your advice.

  • Hi Cedric

    One different way of thinking about approaching this might be as follows:

    • your current form is in the middle of a process instance
    • that process instance was triggered from, say, a Record Summary page
    • when a Process instance synchronous thread comes to an end you are returned to where it was triggered i.e. the Record Summary page
    • so, in your Record Summary page you could have it auto-refreshing, and displaying a box layout with "Save in progress..." message
    • the auto-refresh is fetching data from the database where the status of the save is stored. Depending in what you're saving and how many you could be fetching the status (or statuses) every 30 seconds (that's the fastest auto-refresh rate) and once the status (or statuses) tell you that the save is complete you can then change the message to "Save Complete" or hide the box entirely

    As you've discovered the issue with User Input Tasks in process models is that they're expecting input from a User, rather than vehicles for telling you what's going on in the background.

    Hope this helps

    Stewart

  • 0
    Certified Senior Developer
    in reply to Stewart Burchell

    Hello Stewart,

    Thank you for these ideas.

    The Input task main form is a "start form" that the user has to submit at the beggining of the process, but my second form in a middle of the process is, as you said, just a "box" to display a message.

    You idea is great to display saving status to the user (and I will keep it), but does not help me (sorry if I'm wrong), to cut the whole process, into 2 sub process (each less of 50-nodes).

    Our process contains too much nodes, so the start form is never closed... but when we cut the process into 2 sub process, it works (if submitted by the user).

    But as said Mike... maybe my form (start form) is never closed, because of another issue independant of the 50-nodes limit...

  • 0
    Appian Employee
    in reply to cedric01

    I agree with Mike - in general activity chaining isn't necessary unless all the activites must be complete before the user returns to their previous page. If you just add a message near the submit button something like "It may take a few minutes for all data from this form to update" or something similar, that would probably do the trick without a more complex process.

    The other thing I'm wondering - do you really need 70 nodes to update data in a database? If you use the Write to Multiple Data Store Entities node, you can combine a bunch of writes to the database in a single transaction, which might reduce the number of nodes required in your process.

  • 0
    Certified Senior Developer
    in reply to Peter Lewis

    Thank you Peter.
    Yes, some of our processes has a lot of data to save and our form are functionaly very complex. Some of our other processes can be organized with kind of wizard, and could be cutted into multiple Input Tasks and subprocesses, but other ones can not (or would need to be completely re-designed).

    Yes, for the multiple Data store entities, we already have such a advices, since few weeks, we already have started the works to optimize some of our processes.

    (what a pleasure to have a reply directly from one of the Appian Instructor of training courses I've took ! ;-) )