class WorkflowRepository {

	public ProcessInstance startWorkflow(MarriageRegnRequest marriageRegnRequest) {

		ProcessInstanceRequest processInstanceRequest = getProcessInstanceRequest(marriageRegnRequest);

		String url = propertiesManager.getWorkflowServiceHostName() + propertiesManager.getWorkflowServiceStartPath();

		log.info("string url of the workflow appp : " + url + "WorkflowRepository processInstanceRequest : "
				+ processInstanceRequest);

		ProcessInstanceResponse processInstanceRes = null;
		try {
			processInstanceRes = restTemplate.postForObject(url, processInstanceRequest, ProcessInstanceResponse.class);
		} catch (Exception e) {
			log.info("the exception from workflow service call : " + e);
			throw e;
		}
		System.err.println("::::processInstanceRes:::"+processInstanceRes);
		log.info("the response object from workflow : " + processInstanceRes.getProcessInstance().getId());

		saveMarriageRegn(marriageRegnRequest, processInstanceRes.getProcessInstance().getId());
		return processInstanceRes.getProcessInstance();
	}

}