• Cancelled documents getting created

    By Colin Williams 2 decades ago

    Using Notes Client workflow, if a user creates a workflow document but then decides to cancel/close the form without saving/submitting, the workflow engine is creating a document in the database. The form field of the document is set to blank.



    This may be something I'm doing wrong and it also may have existed in previous versions - I've only noticed after adding an "all documents" view categorised by "form name" to our databases for easier debugging.

    • Cancel that - was my issue

      By Colin Williams 2 decades ago

      Cancel that - was my issue. I see a resolution was discussed previously in the "discussion" area.

      • Not solved

        By Thomas Gamradt 2 decades ago

        It saw that it has been discussed, but I think the problem is not solved.

        When you create a new document and use the suggested version for queryclose, it still creates a document in the database if you hit escape and say "I don't want to save". The new document doesn't even have a form field. So there needs to be some special handling for new documents.



        Thomas

        • Answer

          By Phillip A Kahrl 2 decades ago

          The agent (RWF DOC QUERYCLOSE) will save the document in notes client. The agent can usually be called from the queryclose event but it does not have to be.



          To avoid the problem you have described, do not call the agent from the queryclose event, instead call it directly from the buttons, if you have a "cancel" button, do not call the agent and the document will not be saved.



          Alternately, you can put logic in the formula for the queryclose event to not call the agent.



          I think there is a sample app, that has an example of this.


          • Phil
          • It's still a bug

            By Thomas Gamradt 2 decades ago

            Thanks for the workaround tip, but it's still a bug, isn't it?

            The agent is called "queryclose" after all. It shouldn't save the document if I hit escape to get out of the document. You will always have people who create a new document and then decide that they don't want to save it at all. Plus, the new document isn't even valid. It has no form field.



            Thomas

            • Not a bug.

              By Phillip A Kahrl 2 decades ago

              The agent (RWF DOC QUERYCLOSE) will always save the backend document in Notes client, because if it didn't, any changes that the agent made would not be saved.



              If you have a case where you do not want the backend document saved, then you have to take care of that on the UI side by not calling the agent.