Temenos Digital
R24 AMR | Min(s) read

Adding a New Section

This doc explains how to add a new section to an existing module.

Consider that you want to add an Office Details section to the Identity Module such that you can navigate to the Office Details section after providing your Address & Identification details. The Office Details sections contain Occupation, Employer Name, and Salary Amount fields already available in Transact.

Currently, the user flow for Start a New Application is as follows.

After adding the Office Details section, the enhancement in the user flow is as follows.

To achieve the scenario mentioned earlier, ensure that you implement navigation to the Office Details section appropriately. For more information about implementing the navigation, refer to the Form Controller Extension and Presentation Controller Extension sections.

To add the new section, you must make the following changes:

As the fields of the Office Details section are already available in Transact, you need not configure the DBX DB.

Client Application Extensions

This section provides information about the client-side changes that are required to add the Office Details section to the Identity module. Client Application Extensions involve configuring the following elements:

UI/UX Modifications:

UI/UX modifications represent the changes required to enable the Office Details module. In this case, you must create a new module and associate it with the required elements. To do so, make the following configurations in your Temenos DigitalOrigination Visualizer project.

  1. In Project Explorer, expand the Responsive Web/ Desktop section.
  2. Under Forms, open the IdentityModule module.
  3. Right-click the IdentityModule module and select New Form to create a new form.
  4. Rename the new form to frmOfficeDetails
  5. In the Properties tab of the frmOfficeDetails form, go to Look > General, and then change the Friendly Name to frmOfficeDetails.
  6. Create flex containers for the Header, Main Container, and Footer.
  7. Create flex containers in the Main Container for Content and Roadmap.
  8. Insert the following components into each of them.
    • Header: com.dbx.CustomHeaderNUO
    • Footer: com.dbx.customfooterNUO
    • Roadmap : com.nuo.Roadmap
  9. Add the required widgets for the roadmap, and the flex structure for Content is as follows.
  10. In the Properties tab of the frmOfficeDetails form, go to Form > General and select On in the Enable Idle Timeout field.
  11. After this, create the required i18n keys and map them to the respective labels.

To add i18n keys for the birth country field, follow these steps.

  1. In the main menu, go to Edit > Internationalization. The Configure Internationalization screen appears.
  2. To add new keys, click the plus (+) button.
  3. Add the following i18n keys for the corresponding elements:
    • Section Header: Temenos Digital.Onboarding.OfficeDetails
    • Section SubHeader: Temenos Digital.Onboarding.OfficeDetails.PleaseEnterOfficeDetails
    • Occupation field: Temenos Digital.Onboarding.OfficeDetails.Occupation
    • Employer Name field: Temenos Digital.Onboarding.OfficeDetails.EmployerName
    • Salary Amount field:Temenos Digital.Onboarding.OfficeDetails.SalaryAmount

  4. Add the following keys for the errors scenarios:
    • Occupation field: Temenos Digital.Onboarding.OfficeDetails.EnterValidOccupation
    • Employer Name field:Temenos Digital.Onboarding.OfficeDetails.EnterValidEmployerName
    • Salary Amount field: Temenos Digital.Onboarding.OfficeDetails.EnterValidSalaryAmount

  5. The final UI of the Savings Account is as follows.

The designers of the implementation team create the layout of the screens. Based on the layout design, the developers of the implementation team configure the layout properties.

Form Controller

For the Office Details section to work, you must configure the frmOfficeDetails Form Controller and define the functions such as preShow, postShow, navigation, data validations, button click functionality, log out, and idle timeout. You must also define function calls to Presentation Controller to update office information, success callback, and error callback.

The code for the required functions for the Form Controller is available here.

Form Controller Extension

To change a form, you cannot directly modify the code in the Form Controller. You must create a Form Controller Extension and modify the code as required. Form Controller Extension is required to validate the new fields. It includes operations such as the addition of a JSON payload, fetching the back-end response, and mapping the error modules.

In the case of adding the Office Details section, when you click Continue on the frmIdentityDetails form, the screen navigates to the frmOfficeDetails form. To do so, you must create a Form Controller Extension to extend the functionality of the frmIdentityDetails form. To create a Form Controller Extension, follow these steps in the Temenos DigitalOrigination Visualizer project.

  1. In Project explorer, expand the Modules section.
  2. Right-click the require tab and select the New Require module to create a new JS file.
  3. Rename the JS file to IdentityModuleExtn.
  4. Define the following exit function to navigate to the frmOfficeDetails form.
    exitIdentityModule: function() {
        kony.mvc.MDAApplication.getSharedInstance().getModuleManager().getModule("IdentityModule").presentationController.navigateToNextForm(this.context);
    }
  5. Link the new extension file to the ModuleConfig file of the Identity module. To do so, go to Project > Reference Architecture Extensions > IdentityModule > Config > ModuleConfig.
    Add the following line of code in the Forms method:
    "ControllerExtensions": ["IdentityModuleExtn"]

Presentation Controller Extension

After you create a new require module, you must create a presentation controller extension. Presentation Controller Extension overrides the business call made by the Presentation Controller. This means that the existing presentation controller contains a Presentation Logic 1 that executes Command 1. Creating a presentation controller extension can invoke another business logic and override Presentation Logic 1.

To do so, follow these steps.

  1. Open your Visualizer project.
  2. In Project explorer, expand the Reference Architecture Extensions section.
  3. Expand the module name to create an extension.
  4. Right-click the Presentation Controller and select Create New Extension > Presentation Controller.
    In this case, create a presentation controller extension for the IdentityModule module.
  5. To open the frmOfficeDetails form, define the following function:
    navigateToNextForm: function(context) {
        var appModule = require("AppModule");
        context = context || {};
        appModule.launchForm("frmOfficeDetails", context, this);
    }
  6. To open the frmIdentityDetails form when you click Back on the frmOfficeDetails form, define the following function:
    navigateToPrevForm: function(context) {
        var appModule = require("AppModule");
        context = context || {};
        appModule.launchForm("frmIdentityDetails", context, this);
    }
  7. To open the frmOfficeDetails form when you click Back on the frmEnterOTP form, define the following function:
    performLaunchActions: function(context) {
        var self = this;
        if (!context.isCoApplicantFlow) {
            self.updateSavedApplicantAddress({});
        }
        if (context.backFromOTP === true) {
            self.navigateToNextForm(context);
        } else {
            self.navigateToStartForm(context);
        }
    }
  8. To invoke a function call in the Business Controller to send the field data to the back-end, define the updateOfficeInfo function.
    updateOfficeInfo: function(payload, success, error) {
        var scopeObj = this;
    
        function successCallBack(res) {
            success(res);
        }
    
        function errorCallBack(err) {
            error(err);
        }
        var IndentityModule = kony.mvc.MDAApplication.getSharedInstance().getModuleManager().getModule("IdentityManager");
        IndentityModule.businessController.updateOfficeOnfo(payload, successCallBack, errorCallBack);
    },
  9. To invoke a function call in the Business Controller to receive the field data from the back-end, define the getOfficeInfo function.
    getOfficeInfo: function(payload, success, error) {
        var scopeObj = this;
    
        function successCallBack(res) {
            success(res);
        }
    
        function errorCallBack(err) {
            error(err);
        }
        var IndentityModule = kony.mvc.MDAApplication.getSharedInstance().getModuleManager().getModule("IdentityManager");
        IndentityModule.businessController.getOfficeInfo(payload, successCallBack, errorCallBack);
    }
  10. When you click Back on the frmEnterOTP form, it currently opens the frmIdentityDetails form. If you want to open the frmOfficeDetails form instead of the frmIdentityDetails form, define the following function to update the context variable:
    decideBackScreenForOTPScreen: function(subModuleOutContext) {
        var scopeObj = this;
        applicationManager.getPresentationUtility().dismissLoadingScreen();
        if (subModuleOutContext.isNewApplication && subModuleOutContext.isBack) {
            subModuleOutContext.backFromOTP = true;
            scopeObj.exit(subModuleOutContext);
        } else if (!subModuleOutContext.isNewApplication && subModuleOutContext.isBack) {
            appModule.launchForm("frmEnterPhoneNumber", subModuleOutContext, this);
        }
    };

Business Controller Extension

Business Controller Extension is required to create a new business implementation and override the existing ones.

To create a Business Controller Extension, follow these steps.

  1. Go to the location in your local system where the BusinessController.js file of the IdentityManager module is available.
  2. Create a .js file at the same location.
  3. Rename the js file to BusinessControllerExtn. This file reflects in your Temenos DigitalOrigination Visualizer Project.
  4. In Project explorer, go to Reference Architecture Extensions > Extensions > IdentityManager > Config > ModuleConfig.
  5. Add the BusinessExtensions key under the BusinessControllerConfig function.

  6. To send the field data to the back-end, define the updateOfficeInfo function. 
    updateOfficeInfo: function(params, presentationSuccess, presentationError) {
        var scope = this;
        var applicantModel = kony.mvc.MDAApplication.getSharedInstance().modelStore.getModelDefinition("OfficeInfo");
    
        function completionCallBack(status, data, error) {
            var srh = applicationManager.getServiceResponseHandler();
            var obj = srh.manageResponse(status, data, error);
            if (obj["status"] === true) {
                presentationSuccess(obj);
            } else {
                presentationError(obj);
            }
        }
        applicantModel.customVerb("updateOfficeInfo", params, completionCallBack);
    }
  7. To receive the field data from the back-end, define the getOfficeInfo function.
    getOfficeInfo: function(params, presentationSuccess, presentationError) {
        var scope = this;
        var applicantModel = kony.mvc.MDAApplication.getSharedInstance().modelStore.getModelDefinition("OfficeInfo");
    
        function completionCallBack(status, data, error) {
            var srh = applicationManager.getServiceResponseHandler();
            var obj = srh.manageResponse(status, data, error);
            if (obj["status"] === true) {
                presentationSuccess(obj);
            } else {
                presentationError(obj);
            }
        }
        applicantModel.customVerb("getOfficeInfo", params, completionCallBack);
    }

Configuring Spotlight

After you add a new section, you can define certain rules specific to the Office Details section in the Spotlight app. To do so, add the following fields to the Temenos DigitalOrigination Bundle:

  • Occupation
  • EmployerName
  • SalaryAmount

The Spotlight configurations required to add the Office Details section are similar to the Spotlight configurations described in the Adding a New Field to an Existing Section document. For more information about configuring the Spotlight app, refer to Data Validation for Adding a New Field.

The JSON for the DATA_VALIDATION_NUO key for the Office Details section is as follows:

{
  "PersonalInfo": {
    "FirstName": "FIRSTNAME",
    "LastName": "LASTNAME",
    "Age": "MINOR_AGE",
    "Email": "EMAIL",
    "MobileNumber": "MOBILE_NUMBER",
    "BirthCountry": "NAME",
    "CIF": "ID_ALPHANUMERIC",
    "DateOfBirth": "DATE",
    "IsExistentMember": "BOOLEAN"
  },
  "IdentityInfo": {
    "IdNum": "ID_ALPHANUMERIC"
  },
  "AddressInfo": {
    "Country": "NAME",
    "State": "NAME",
    "Zipcode": "ZIPCODE"
  },
  "OfficeInfo": {
  "Occupation": "NAME",
  "EmployerName": "NAME",
  "SalaryAmount": "NUMBER"
  }
}

The above code uses the NAME and NUMBER rules to validate the Occupation, EmployerName, and SalaryAmount fields. In the Spotlight app, you can associate each field with either a rule from the common rule set or a custom rule.

  • To create or use the rules for data validation, refer to Data Validation.
  • Origination Data Microservice

    After you create and configure new fields on the client side, you must extend the ODMS functionality.

    Update the ODMS

    1. Open Postman.
    2. From the left pane, expand the Storage-MS-API collection.
    3. Click Entity Definition By Code and then navigate to the Body tab.
    4. In the code, under the entityItemDefinitions, add a new entity item, OfficeDetails.
      "OfficeDetails": {
            "type": "JSON",
            "seed": "{\"Occupation\":\"\",\"EmployerName\":\"\",\"SalaryAmount\":\"\}”,
            "validationSchema": "",
            "applyValidation": false,
            "validateSeed": true,
            "validateEntry": true
          },
    5. Then, click Send.
      The new section has been added.

    Server-side Extensions

    This section provides information about the server-side changes required to add the Office Details section to the Identity module.

    After implementing the client application and extending the ODMS functionality, you must configure the server-side implementations to bind the UI elements with the back-end data. This involves configuring the following elements:

    Java Integration Service

    This section explains how to add a new module in DTO and store the new data in the back-end.

    Before configuring Java Integration Service, ensure to set up an IDE and configure the server-side code.

    To modify the required java service, follow these steps.

    1. Open your Eclipse project.
    2. Create a new java project similar to the base project that contains the resources such as business delegate and java service packages. Ensure to add the base project as a dependency.

    3. Add a new Business Delegate API Interface to the ClientStorageBusinessDelegate.java class and define the methods required to implement the data functionalities such as GET/ UPDATE data to the Origination Data Microservice.
      package com.implementation.onboarding.businessdelegate.api;
      
      import org.json.JSONObject;
      
      import com.dbp.core.api.BusinessDelegate;
      import com.temenos.onboarding.dto.PersonalInfoDTO;
      import com.temenos.onboarding.errorhandling.OnBoardingException;
      
      public interface ClientStorageBusinessDelegate extends BusinessDelegate {
      
      	JSONObject createOfficeInfo(String entityDefCode, String applicationId, JSONObject payload,String partyId)
      throws DBPApplicationException, Exception;
      	
      	JSONObject getOfficeEntityItem(String entityDefCode, String trackingCode, String sectionName)
      throws DBPApplicationException, Exception;
      
      }
      
    4. Implement the methods from the Business Delegate API Interface in the ClientStorageBusinessDelegateImpl.java class. You can use the available business delegate methods from the base Onboarding project to communicate with the backend/storage points.
      package com.implementation.onboarding.businessdelegate.impl;
      
      import java.util.HashMap;
      import java.util.Iterator;
      
      import org.apache.logging.log4j.LogManager;
      import org.apache.logging.log4j.Logger;
      import org.json.JSONArray;
      import org.json.JSONObject;
      
      import com.dbp.core.api.DBPDTO;
      import com.implementation.onboarding.businessdelegate.api.ClientStorageBusinessDelegate;
      import com.implementation.onboarding.dto.OfficeInfoDTO;
      import com.temenos.onboarding.dto.JMSessionDTO;
      import com.temenos.onboarding.dto.PersonalInfoDTO;
      import com.temenos.onboarding.errorhandling.ErrorCodeEnum;
      import com.temenos.onboarding.errorhandling.OnBoardingException;
      import com.temenos.onboarding.utils.Constants;
      import com.temenos.onboarding.businessdelegate.impl.StorageBusinessDelegateImpl;
      
      public class ClientStorageBusinessDelegateImpl implements ClientStorageBusinessDelegate {
      
          private static final Logger logger = LogManager.getLogger(ClientStorageBusinessDelegateImpl.class);
      
          @Override
          public JSONObject createOfficeInfo(String entityDefCode, String applicationId, JSONObject payload)
          throws DBPApplicationException, Exception {
              String partyId = payload.optString("Party_id");
              StorageBackendDelegate storageBackendDelegate = DBPAPIAbstractFactoryImpl
                  .getBackendDelegate(StorageBackendDelegate.class);
              JSONObject getResponse = new JSONObject();
              if (payload.has("EntityId"))
                  getResponse = storageBackendDelegate.getEntityItemById(payload.getString("EntityId").toString());
              else {
                  JSONObject createResponse = storageBackendDelegate.createEntityItem(entityDefCode, applicationId,
                      "OfficeDetails_" + partyId, "OfficeDetails", "");
                  getResponse = storageBackendDelegate.getEntityItemById(createResponse
                      .getJSONArray("standardEntityWithKeyIdResponses").getJSONObject(0).get("id").toString());
              }
              String entityItemId = getResponse.get("id").toString();
              JSONObject entry = new JSONObject(getResponse.getString("entry"));
              String[] names = entry.getNames(entry);
              for (String field: names)
                  if (payload.has(field))
                      entry.put(field, payload.getString(field));
              JSONObject response = storageBackendDelegate.updateEntityItemById(entityItemId, entry.toString());
              if (response.getInt("httpStatusCode") == 200)
                  response.put("id", applicationId);
              return response;
          }
      
      
          @Override
          public JSONObject getOfficeEntityItem(String entityDefCode, String trackingCode, String sectionName)
          throws DBPApplicationException, Exception {
              StorageBackendDelegate storageBackendDelegate = DBPAPIAbstractFactoryImpl
                  .getBackendDelegate(StorageBackendDelegate.class);
              JSONObject responseObj = storageBackendDelegate.getEntityItem(entityDefCode, trackingCode, sectionName);
              if (responseObj.has("entityItems"))
                  if (responseObj.getJSONArray("entityItems").length() != 0) {
                      JSONObject result = new JSONObject(
                          responseObj.getJSONArray("entityItems").getJSONObject(0).getString("entry"));
                      result.put("ID", responseObj.getJSONArray("entityItems").getJSONObject(0).get("id").toString());
                      return result;
                  }
              return new JSONObject();
          }
    5. Add a new Resource API Interface to the OfficeInfoResource.java class and define the following methods:
      package com.temenos.onboarding.resource.api;
      
      import com.dbp.core.api.Resource;
      import com.konylabs.middleware.controller.DataControllerRequest;
      import com.konylabs.middleware.controller.DataControllerResponse;
      import com.konylabs.middleware.dataobject.Result;
      
      public interface OfficeInfoResource extends Resource {
      
          Result UpdateOfficeInfo(String methodID, Object[] inputArray, DataControllerRequest request,
                  DataControllerResponse response);
      
          Result getOfficeInfoData(String methodID, Object[] inputArray, DataControllerRequest dcRequest,
      			DataControllerResponse dcResponse);
          
      }
    6. Implement the methods defined in the Resource API Interface of the OfficeInfoResource.java class to communicate with the Java operation and Business Delegate.
      package com.temenos.onboarding.resource.impl;
      
      import org.apache.logging.log4j.LogManager;
      import org.apache.logging.log4j.Logger;
      import org.json.JSONObject;
      
      import com.dbp.core.api.factory.BusinessDelegateFactory;
      import com.dbp.core.api.factory.impl.DBPAPIAbstractFactoryImpl;
      import com.implementation.onboarding.businessdelegate.api.ClientStorageBusinessDelegate;
      import com.implementation.onboarding.dto.OfficeInfoDTO;
      import com.konylabs.middleware.controller.DataControllerRequest;
      import com.konylabs.middleware.controller.DataControllerResponse;
      import com.konylabs.middleware.dataobject.Param;
      import com.konylabs.middleware.dataobject.Result;
      import com.konylabs.middleware.session.Session;
      import com.temenos.onboarding.errorhandling.ErrorCodeEnum;
      import com.temenos.onboarding.errorhandling.OnBoardingException;
      import com.temenos.onboarding.resource.api.OfficeInfoResource;
      import com.temenos.onboarding.utils.CommonUtils;
      import com.temenos.onboarding.utils.Constants;
      
      public class OfficeInfoResourceImpl implements OfficeInfoResource {
      
          private static final Logger logger = LogManager.getLogger(OfficeInfoResourceImpl.class);
      
          @
          Override
          public Result UpdateOfficeInfo(String methodID, Object[] inputArray, DataControllerRequest request,
              DataControllerResponse response) {
              Result result = new Result();
              try {
                  // Tracking code
                  String partyId = "";
                  String applicationId = SessionManager.APPLICATION_ID.retreiveFromSession(request);
                  String entityDefintionCode = SessionManager.FORM_CODE.retreiveFromSession(request);
                  // Construction of payload
                  JSONObject payload = new JSONObject();
                  Iterator < String > it = request.getParameterNames();
                  while (it.hasNext()) {
                      String key = it.next();
                      payload.put(key, request.getParameter(key));
                  }
                  if (payload.has(Constants.APPLICANTTYPE)) {
                      if (payload.get(Constants.APPLICANTTYPE).toString().equalsIgnoreCase(Constants.APPLICANT))
                          partyId = SessionManager.PARTY_ID.retreiveFromSession(request);
                      else if (payload.get(Constants.APPLICANTTYPE).toString().equalsIgnoreCase(Constants.COAPPLICANT))
                          partyId = SessionManager.CO_PARTY_ID.retreiveFromSession(request);
                  }
                  ClientStorageBusinessDelegate storageBusinessDelegate = DBPAPIAbstractFactoryImpl
                      .getBusinessDelegate(ClientStorageBusinessDelegate.class);
      
                  // Create Office info structure
                  JSONObject responseObj = storageBusinessDelegate.createOfficeInfo(entityDefintionCode, applicationId,
                      payload, partyId);
      
      
                  // Update MetaData entity item
                  storageBusinessDelegate.updateMetaData(entityDefintionCode, applicationId, payload, "OfficeDetails");
      
                  result.addParam("id", responseObj.get("id").toString());
                  return result;
              } catch (OnBoardingException onBoardingException) {
                  result = onBoardingException.updateResultObject(result);
              } catch (Exception exception) {
                  result = ErrorCodeEnum.ERR_73200.updateResultObject(result);
              }
              return result;
          }
      
          @
          Override
          public Result getOfficeInfoData(String methodID, Object[] inputArray, DataControllerRequest dcRequest,
              DataControllerResponse dcResponse) {
              Result result = new Result();
              try {
                  String partyId = "";
                  String applicationId = SessionManager.APPLICATION_ID.retreiveFromSession(dcRequest);
                  String entityDefintionCode = SessionManager.FORM_CODE.retreiveFromSession(dcRequest);
                  // Construction of payload
                  JSONObject payload = new JSONObject();
                  Iterator < String > it = dcRequest.getParameterNames();
                  while (it.hasNext()) {
                      String key = it.next();
                      payload.put(key, dcRequest.getParameter(key));
                  }
                  if (payload.has(Constants.APPLICANTTYPE)) {
                      if (payload.get(Constants.APPLICANTTYPE).toString().equalsIgnoreCase(Constants.APPLICANT))
                          partyId = SessionManager.PARTY_ID.retreiveFromSession(dcRequest);
                      else if (payload.get(Constants.APPLICANTTYPE).toString().equalsIgnoreCase(Constants.COAPPLICANT))
                          partyId = SessionManager.CO_PARTY_ID.retreiveFromSession(dcRequest);
                  }
                  ClientStorageBusinessDelegate storageBusinessDelegate = DBPAPIAbstractFactoryImpl
                      .getBusinessDelegate(ClientStorageBusinessDelegate.class);
                  JSONObject responseObj = storageBusinessDelegate.getSection(entityDefintionCode, applicationId,
                      "OfficeDetails_" + partyId);
                  return CommonUtils.getResultObjectFromJSONObject(responseObj);
              } catch (OnBoardingException onBoardingException) {
                  result = onBoardingException.updateResultObject(result);
              } catch (Exception exception) {
                  result = ErrorCodeEnum.ERR_73200.updateResultObject(result);
              }
              return result;
          }
      }
    7. Add new Java Service operations to update and get data from the Origination Data Microservice by using the resource methods defined earlier. To do so, create a new class named UpdateOfficeInfoOperation.java.
      package com.temenos.onboarding.javaservice;
      
      import com.temenos.onboarding.errorhandling.ErrorCodeEnum;
      import com.temenos.onboarding.resource.api.OfficeInfoResource;
      import org.apache.logging.log4j.LogManager;
      import org.apache.logging.log4j.Logger;
      
      import com.dbp.core.api.factory.ResourceFactory;
      import com.dbp.core.api.factory.impl.DBPAPIAbstractFactoryImpl;
      import com.konylabs.middleware.common.JavaService2;
      import com.konylabs.middleware.controller.DataControllerRequest;
      import com.konylabs.middleware.controller.DataControllerResponse;
      import com.konylabs.middleware.dataobject.Result;
      
      public class UpdateOfficeInfoOperation implements JavaService2 {
      
      	private static final Logger logger = LogManager.getLogger(UpdateOfficeInfoOperation.class);
      	
          @Override
          public Object invoke(String methodID, Object[] inputArray, DataControllerRequest request,
                  DataControllerResponse response) throws Exception {
          	Result result=new Result();
          	try{
          		OfficeInfoResource employmentInfoResource = DBPAPIAbstractFactoryImpl.getInstance().getFactoryInstance(ResourceFactory.class).getResource(OfficeInfoResource.class);
          		result=employmentInfoResource.UpdateOfficeInfo(methodID, inputArray, request, response);
          	}catch(Exception exception){
      			String errorMsg="Error : "+exception.toString()+"..."+exception.getStackTrace()[0].toString();
      				logger.error(errorMsg);
      			result=ErrorCodeEnum.ERR_71000.updateResultObject(result);
          	}
              return result;
          }
      }
      package com.temenos.onboarding.javaservice;
      
      import com.temenos.onboarding.errorhandling.ErrorCodeEnum;
      import com.temenos.onboarding.errorhandling.OnBoardingException;
      import com.temenos.onboarding.resource.api.OfficeInfoResource;
      import com.temenos.onboarding.resource.api.PersonalInfoResource;
      import com.temenos.onboarding.resource.impl.OfficeInfoResourceImpl;
      
      import org.apache.logging.log4j.LogManager;
      import org.apache.logging.log4j.Logger;
      
      import com.dbp.core.api.factory.ResourceFactory;
      import com.dbp.core.api.factory.impl.DBPAPIAbstractFactoryImpl;
      import com.konylabs.middleware.common.JavaService2;
      import com.konylabs.middleware.controller.DataControllerRequest;
      import com.konylabs.middleware.controller.DataControllerResponse;
      import com.konylabs.middleware.dataobject.Result;
      
      public class GetOfficeInfoOperation implements JavaService2 {
      
      	private static final Logger logger = LogManager.getLogger(GetOfficeInfoOperation.class);
      
          @Override
          public Object invoke(String methodID, Object[] inputArray, DataControllerRequest request,
                  DataControllerResponse response) throws Exception {
      
              Result result=new Result();
      		try{
      			OfficeInfoResource officeInfoResource = DBPAPIAbstractFactoryImpl.getInstance().getFactoryInstance(ResourceFactory.class).getResource(OfficeInfoResourceImpl.class);
      			result = officeInfoResource.getOfficeInfoData(methodID, inputArray, request, response);
      
      		}catch(Exception exception){
      			String errorMsg="Error in GetPersonalInfoOperation : "+exception.toString();
      				logger.error(errorMsg);
      			result=ErrorCodeEnum.ERR_71000.updateResultObject(result);
      		}
      		return result;
          }
      }
    8. In the case of adding a new form, to update the form details in the back end, you must invoke the following code snippet:
      DataValidator dataValidator=new DataValidator();
      dataValidator.validateData(inputArray, request, result);
    9. After invoking the mentioned code snippet, build the jar using maven commands.

    Experience API Changes in Quantum Fabric

    For the Office Details module to work, you must create the back-end data in Quantum Fabric and link it to the front-end data. To do so, follow these steps.

    1. Sign in to your Quantum Fabric Console. The applications page opens.

    2. Open the Origination app.
    3. Go to Integration > OnBoardingJavaServices.
    4. Add an operation for the Office Details section, OfficeInfo, and define the applicable parameters.

      For more information about creating an operation for a Java Integration Service, refer to Java Adapter.

    5. Now, in the Objects section, go to the Onboarding object service and create a new data model named, OfficeInfo.

      For more information about creating a data model, refer to Configuring a Data Model.

    6. In the Mapping tab, map the Update and GET services to the respective java services.

      For more information about mapping operations, refer to Mapping Operations to Back-end Methods.

    7. Save the changes and publish the application.

    Copyright © 2020- Temenos Headquarters SA

    Published on :
    Thursday, May 30, 2024 12:28:09 PM IST