1
0
-1

Hi,

I'm trying to clone a submission. I have been able to seed the new submission with the previous submission's formXml (user entered data only of course), but I also need to copy attachments from the previous submission to the new one.

  • I've tried to use SubmissionDao.copyAttachmentToSubmission in a "Form Saved Processor" service, but I can't see how I can update the reference in the formXml on the Submission object. I've tried TxnUpdater.setFormXml().update() as well, and that doesn't seem to persist any changes to the formXml.
  • I've tried to do this in the prefill service, but I don't actually have a Submission object there. According to the script header comment, there is one passed in. But I get "No such property: submission for class: Script1" trying to access it.

Any idea how I can achieve this?

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hi So,

      Thanks for the background requirements.  This sound like a good candidate for a Collaboration Job where the subsequent quotes are pre-filled with data from the initial application. In Transact these are Tasks (pre-filled forms assigned to users) to complete.  Collaboration Jobs provide a user workflow capability to lead users through filling out a set of related tasks.

      We have people who can help tease out solution options for your requirements with you. Please shoot me an email medgar@avoka.com, and we can organize some discussions.

      regards Malcolm

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi So,

        Can you describe what you want to achieve here from a business perspective / use case. 

        regards Malcolm

        1. So Su

          Hi Malcolm,

          I have a system that generates quotes. Quotes then lead users to apply (via the form built in Maestro). A user may start filling out the application and then change their mind on some quote options. So they go back to the quote and re-run it with a few different options. At this point they have 2 quotes they can access.

          Re-run a quotes generally have the same application data, so I want to clone the application for the first quote to reduce their data entry. Some rules:

          • There is a 1-to-1 relationship between quote and application.
          • The first quote and application are still valid and can continue independently of the 2nd quote and 2nd application.
          • There is no need to keep the applications in sync after the initial clone.
        CommentAdd your comment...