Submission Completed Processor Service

   Journey Manager (JM) The transaction engine for the platform. |   System Manager / DevOps |  All versions This feature is related to all versions.

Manager allows you to create a service of the submission completed processor type, which is called immediately after a form submission has progressed to form status Completed.

To configure the submission completed processor service:

  1. Select Services > All Services.
  2. Locate a service and click Edit.
  3. Configure the standard service settings.
  4. Click Save to update the changes.

For more information, see groovy-services-api/submission-completed-processor.html.

Task Cancellation Processor Service

You can create a service of the same type to cancel or abandon a task submission or a task that is a part of a collaboration job. This service will use the following job controller API:


/** 
* @see IJobController#cancelJob(Job) 
* @param job the job instance to cancel (required) 
* @return true if the job was cancelled, or false if the job was already finished 
*/ 
public boolean cancelJob(final Job job)

To configure the task cancellation processor service:

  1. Select Services > All Services.
  2. Locate a service and click Edit.
  3. Configure the standard service settings.
  4. Select the Groovy Script tab and update a GroovyGroovy is a powerful scripting language which runs on the Java Virtual Machine. Across theTemenos Journey Manager platform, Groovy is used to create services in Manager. These services are primarily used to create plug-in style systems that interact with Manager. script as shown below:
    
    import com.avoka.component.xml.XmlDoc
    import com.avoka.fc.core.dao.DaoFactory
    import com.avoka.fc.core.service.ServiceFactory
    import com.avoka.fc.core.entity.Job
    import com.avoka.fc.core.service.ServiceLocator
    
    
    def XPATH_TACKING_CODES = '//GettingStarted/TrackingCode/rptTrackingCode/TrackingCode'
    def PIPE_SEPARATOR = '||'
    def xmlDoc = new XmlDoc(submissionXml)
    def submissionDao = DaoFactory.getSubmissionDao()
    def jobControllerService = new JobControllerService()
    def abandonService = ServiceFactory.getAbandonmentService()
    def cancelledTasks = []
    def notCancelledTasks = []
    def trackingCodeNodes = xmlDoc.getNodeList(XPATH_TACKING_CODES)
    // Loop all given tracking codes
    
    for (def node : trackingCodeNodes) {
    	def isAbandoned = false
    	def taskSubject = ''
    	try {
    		// Get the submission object
    		def trackingCode = node.getTextContent()
    		def oSubmission = submissionDao.getSubmissionByTrackingNumber(trackingCode)
    		taskSubject = oSubmission.getTaskSubject()
    		// Get the job that the submission is part of, if any
    		def job = oSubmission.getJob()
    		// Check if submission is part of collaboratino job
    		if (job != null) {
    			// Submission is part of collaboration job
    			def jobController = ServiceLocator.getJobController(job)
    			isAbandoned = jobController.cancelJob(job)
    		} else {
    			// Submission is not part of collaboration job
    			isAbandoned = abandonService.performExplicitAdminAbandonment(oSubmission)
    		}
    	} catch (Exception e) {
    
    	} finally {
    
    	if (isAbandoned) {
    		cancelledTasks.add(taskSubject)
    	} else {
    		notCancelledTasks.add(taskSubject)
    	}
    }
    
  5. Configure the service in the Unit Test and Test Parameters tabs.
  6. Click Save to update the changes.

Next, learn how to view job services.