Class SubmissionTaskService


  • public class SubmissionTaskService
    extends CayenneService
    Provide service for creating Saved Submissions and Tasks.

    Groovy Example

    A Groovy script example is provided below.

     import com.avoka.fc.core.entity.*
     import com.avoka.fc.core.dao.*
     import com.avoka.fc.core.service.SubmissionTaskService
     import com.avoka.fc.core.service.SubmissionTaskService.SavedFormParam
    
     def portal = DaoFactory.getPortalDao().getPortalByName('Gov Assist')
     def form = DaoFactory.getFormDao().getFormByFormCode('CSA')
    
     def param = new SavedFormParam()
     param.portal = portal
     param.form = form
     param.saveChallengeAnswer = '0417918321'
     param.contactEmailAddress = '[email protected]'
     param.transRefNumber = 'CTR-4090-BC-001'
     param.sendEmailFlag = true
     param.submissionXml = '''
     <SmartForm>
     ..
     </SmartForm>
     '''
    
     def submissionTaskService = new SubmissionTaskService()
    
     def submission = submissionTaskService.createAnonymousSavedForm(param)
     
    Since:
    3.6.0
    • Constructor Detail

      • SubmissionTaskService

        public SubmissionTaskService()
    • Method Detail

      • createAnonymousSavedForm

        public Submission createAnonymousSavedForm​(SubmissionTaskService.SavedFormParam param)
        Create an anonymous saved form submission using the provided parameter data.
        Parameters:
        param - the saved from parameter data
        Returns:
        the newly create submission record
      • createFormTask

        public Submission createFormTask​(SubmissionTaskService.FormTaskParam param)
        Create a form task submission for a user or a user group to do. The task form can be merged and rendered either by the form schema seed or using the prefill data services. Note that form data XML and prefill data XML are mutually exclusive. Note that this method contains database transactions.
        Parameters:
        param - the form task parameter data
        Returns:
        the newly created task submission record
      • createReviewTask

        public Submission createReviewTask​(SubmissionTaskService.ReviewTask param)
        Create a review task submission for a user or a user group to do. A review task is based on an existing submission and can be pre-filled with schema seed data.
        Parameters:
        param - the review task parameter data
        Returns:
        the newly created task submission record