Save document button

307 views
Skip to first unread message

somesh.m...@gmail.com

unread,
Sep 13, 2013, 1:07:01 AM9/13/13
to suppor...@runmyprocess.com, somesh. mukherjee
Hi,

We have a Save Document button on our web interface, which we use from different places on the Web Interface screen to save the data by using Javascript.

For example, there is a critical action (client side) on the screen, which needs us the update the process status to an appropriate status:

RMPApplication.set("process_status","Submitted");
RMPApplication.set("process_submit_date",getCurrentDateInDDMMMYYYY());

There is a continue button on the screen which navigates to a different section on the screen but there is a need to save the state of the web interface and hence we use the Save document button (hidden and available on the screen) as folows:

id_autosave_button.getElement().click();

But we have noticed that intermittently the data is not getting saved and sometimes there is a time lag.

Do you have any recommendations to the usage of this feature in the fashion we are trying?

Thanks!

Dimitri MELCHIOR Pro

unread,
Sep 13, 2013, 3:10:52 AM9/13/13
to RunMyProcess Support Forum, somesh. mukherjee
Hi Somesh,

To enable this possibility, you must ensure that the button (Save button) is Active (even if it's unvisible) at the screens you are using it for.

Other hand, I do not see why you are not making your continue button being a "Save document" one. You could set the pre-launch script with :

RMPApplication.set("process_status","Submitted");
RMPApplication.set("process_submit_date",getCurrentDateInDDMMMYYYY());
true;

Regards.

--

Dimitri MELCHIOR

PreSales Consultant

     

Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.



--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/b6feb16f-8220-469c-bccb-81553e3cc465%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/groups/opt_out.

somesh.m...@gmail.com

unread,
Sep 13, 2013, 10:21:21 AM9/13/13
to suppor...@runmyprocess.com, somesh. mukherjee, somesh.m...@gmail.com
Hi Dimitri,

Firstly, the button is active and available (just not visible)

Secondly, some more details about the use case: The above snippet is invoked on click of a button which is a final submit on the webform. This button needs to save the state of the form as is (we are clicking the save document button), on the first step; run business validation rules on all the form fields as the second step; if the second step is a success, send out the required notifications to the participants on the process and spawn the required processes as the third step and as a final step if the second step was a success update the process status to Submitted.

Even if I move the above logic into the pre-launch script of the button, I would still have to save the document twice in the lifecycle of the method for success scenarios.

Please let me know if the use case is clear or else I can give you more details. The problem that I noticed was that there is an intermittent issue and the "Save document" button click is not able to save the state of the form. Strangely, I have noticed that it almost never happens on Firfox, but is a frequent behavior on the Chrome (yet to test thoroughly on the infamous IE).

Thanks!

Dimitri MELCHIOR Pro

unread,
Sep 15, 2013, 8:52:38 PM9/15/13
to RunMyProcess Support Forum, somesh. mukherjee, Somesh Mukherjee
Hi Somesh,

It is possible that the ....getElement() does not work properly on all browsers.

The native Javascript function for that feature is document.getElementById("id_autosave_button").click();

Could you try this one?

Best regards

--

Dimitri MELCHIOR

PreSales Consultant

     

Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.



Thanks!


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.

somesh.m...@gmail.com

unread,
Sep 15, 2013, 9:37:37 PM9/15/13
to suppor...@runmyprocess.com, somesh. mukherjee, somesh.m...@gmail.com
Tried that suggestion: still does not work on Chrome.

The JS function (triggered on final submit) in this particular case is extensive and lengthy. Thinking out of the box - I am not sure if this is causing the issue (do you trigger the associated JS code snippet to a RMP button widget using a sync ajax call?). I have noticed that Chrome tends to hang until the complete JS script execution completes - I have some processing graphic (RMP spinner widget), for which I trigger setVisible(true) and that does not tend to show up either.

FF though, works fine!

somesh.m...@gmail.com

unread,
Sep 15, 2013, 11:23:44 PM9/15/13
to suppor...@runmyprocess.com, somesh. mukherjee, somesh.m...@gmail.com
Alternatively, I tried clicking the button using jQuery:

$j( "#id_autosave_button" ).click();

And voila! The save document works! I cannot explain why the first id_autosave_button.getElement().click() in the "submit" JS method works and it was not working towards the end of the "submit" JS method. If you guys want to investigate I can send in the use case and the code.

Reply all
Reply to author
Forward
0 new messages