Package com.avoka.fc.core.service
Class SubmissionTaskService
- java.lang.Object
-
- com.avoka.fc.core.service.BaseService
-
- com.avoka.fc.core.service.CayenneService
-
- com.avoka.fc.core.service.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SubmissionTaskService.FormTaskParam
Provides a form task parameter object.static class
SubmissionTaskService.ReviewTask
Provides a review task parameter object.static class
SubmissionTaskService.SavedFormParam
Provides an anonymous saved form parameter object.
-
Constructor Summary
Constructors Constructor Description SubmissionTaskService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Submission
createAnonymousSavedForm(SubmissionTaskService.SavedFormParam param)
Create an anonymous saved form submission using the provided parameter data.Submission
createFormTask(SubmissionTaskService.FormTaskParam param)
Create a form task submission for a user or a user group to do.Submission
createReviewTask(SubmissionTaskService.ReviewTask param)
Create a review task submission for a user or a user group to do.-
Methods inherited from class com.avoka.fc.core.service.CayenneService
commitChanges, deleteObject, deleteObjects, findObject, getDataContext, getDataDomain, getObjectForPK, getObjectStore, newObject, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, refetchEntity, refetchObject, registerNewObject, rollbackChanges, toMap, toMap
-
Methods inherited from class com.avoka.fc.core.service.BaseService
getLogger
-
-
-
-
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
-
-