├── README.md ├── debug ├── TaxCalculation.o ├── PreAndPostBillWrapper.o └── PreAndPostBillWrapperMain.o ├── makefiles ├── create_preAndPostBillCheckLib_linux ├── create_preAndPostBillCheckLib_solaris ├── makefile_preAndPostBillCheck_solaris └── makefile_preAndPostBillCheck_linux ├── conf └── PreAndPostBillWrapper.conf ├── .github └── workflows │ └── msbuild.yml ├── confirm.conf ├── include ├── PreAndPostBillWrapper.h ├── InvoicePosting.h ├── AutoDebit.h ├── CycleSummaryStatus.h ├── DisablePrepaidBilling.h ├── AutoAdjustment.h ├── BillCycleChange.h ├── Confirmation.h ├── Dunning.h ├── AccountTermination.h ├── CreditNote.h ├── CreditControlComponent.h ├── AdvancePayCreditNote.h ├── ConfirmStatusMarker.h └── TaxCalculation.h └── source ├── PreAndPostBillWrapperMain.cpp └── PreAndPostBillWrapper.cpp /README.md: -------------------------------------------------------------------------------- 1 | # ML-based-RFID-Blocking 2 | ML based RFID Blocking 3 | -------------------------------------------------------------------------------- /debug/TaxCalculation.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sroycho4/ML-based-RFID-Blocking/HEAD/debug/TaxCalculation.o -------------------------------------------------------------------------------- /debug/PreAndPostBillWrapper.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sroycho4/ML-based-RFID-Blocking/HEAD/debug/PreAndPostBillWrapper.o -------------------------------------------------------------------------------- /debug/PreAndPostBillWrapperMain.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sroycho4/ML-based-RFID-Blocking/HEAD/debug/PreAndPostBillWrapperMain.o -------------------------------------------------------------------------------- /makefiles/create_preAndPostBillCheckLib_linux: -------------------------------------------------------------------------------- 1 | make -f${BASE_PATH}/billing/preAndPostBillCheck/makefiles/makefile_preAndPostBillCheck_linux clean 2 | make -f${BASE_PATH}/billing/preAndPostBillCheck/makefiles/makefile_preAndPostBillCheck_linux application UNIT=NO_TEST EXE="preAndPostBillCheck" EXED="preAndPostBillCheckd" OBJS="PreAndPostBillWrapperMain.o PreAndPostBillWrapper.o" DEP_LIBS=" -lmsgformat -lUtils " DEP_LIBSD=" -lmsgformatd -lUtilsd " 3 | -------------------------------------------------------------------------------- /conf/PreAndPostBillWrapper.conf: -------------------------------------------------------------------------------- 1 | DB_CONNECTION = db1:DB_USER_NAME:DB_PASSWD:SCHEMA_NAME: 1 :20 : oracle : 12 : 1 | 2 | DB_SHARED_LIBRARIES = liborcl.1.3.6.so | 3 | LOGGER_PATH = ../logs/${INSTANCE_ID}_testLog_ : 0 4 | MONITOR_CONFIGURATION_FILE = N 5 | PIPES = p1 6 | BILL_DB_ID = db1 7 | ORCH_DB_ID = db1 8 | PRE_POST_CHECK_STOP_SIGNAL = ../logs/${INSTANCE_ID}_stopSignal 9 | SLEEP_TIME = 5 10 | -------------------------------------------------------------------------------- /makefiles/create_preAndPostBillCheckLib_solaris: -------------------------------------------------------------------------------- 1 | make -f ${BASE_PATH}/billing/preAndPostBillCheck/makefiles/makefile_preAndPostBillCheck_solaris clean 2 | make -f ${BASE_PATH}/billing/preAndPostBillCheck/makefiles/makefile_preAndPostBillCheck_solaris .cpp.o UNIT=NO_TEST OBJFILE="PreAndPostBillWrapperMain.o" SOURCEFILE="PreAndPostBillWrapperMain.cpp" 3 | make -f ${BASE_PATH}/billing/preAndPostBillCheck/makefiles/makefile_preAndPostBillCheck_solaris .cpp.o UNIT=NO_TEST OBJFILE="PreAndPostBillWrapper.o" SOURCEFILE="PreAndPostBillWrapper.cpp" 4 | make -f ${BASE_PATH}/billing/preAndPostBillCheck/makefiles/makefile_preAndPostBillCheck_solaris application UNIT=NO_TEST EXE="preAndPostBillCheck" EXED="preAndPostBillCheckd" DEP_LIBS=" -lmsgformat -lUtils " DEP_LIBSD=" -lmsgformatd -lUtilsd " 5 | -------------------------------------------------------------------------------- /.github/workflows/msbuild.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | 6 | name: MSBuild 7 | 8 | on: 9 | push: 10 | branches: [ "main" ] 11 | pull_request: 12 | branches: [ "main" ] 13 | 14 | env: 15 | # Path to the solution file relative to the root of the project. 16 | SOLUTION_FILE_PATH: . 17 | 18 | # Configuration type to build. 19 | # You can convert this to a build matrix if you need coverage of multiple configuration types. 20 | # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix 21 | BUILD_CONFIGURATION: Release 22 | 23 | permissions: 24 | contents: read 25 | 26 | jobs: 27 | build: 28 | runs-on: windows-latest 29 | 30 | steps: 31 | - uses: actions/checkout@v3 32 | 33 | - name: Add MSBuild to PATH 34 | uses: microsoft/setup-msbuild@v1.0.2 35 | 36 | - name: Restore NuGet packages 37 | working-directory: ${{env.GITHUB_WORKSPACE}} 38 | run: nuget restore ${{env.SOLUTION_FILE_PATH}} 39 | 40 | - name: Build 41 | working-directory: ${{env.GITHUB_WORKSPACE}} 42 | # Add additional options to the MSBuild command line here (like platform or verbosity level). 43 | # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference 44 | run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} 45 | -------------------------------------------------------------------------------- /confirm.conf: -------------------------------------------------------------------------------- 1 | DB_CONNECTION = db1:DB_USER_NAME:DB_PASSWD:SCHEMA_NAME:1:20:oracle:12:1| 2 | DB_SHARED_LIBRARIES = liborcl.1.3.6.so | 3 | LOGGER_PATH = ../logs/${INSTANCE_ID}_confLog_ : 0:DEFAULT:104857600:200 4 | MONITOR_CONFIGURATION_FILE = N 5 | PIPES = p1 6 | INPUT_PIPES = p1 : DataFetchAgent | 7 | PROCESSING_PIPES = p1 : 5 : ProcessingAgent| 8 | OUTPUT_PIPES = p1 : DBUpdateAgent| 9 | STOP_SIGNAL_PATH = StopEngine 10 | SUBSCRIBERS_PER_JOB = 100 11 | JOB_LEVEL_CONNECTION_REQUIRED = N 12 | LOCK_SIGNAL = spawn_engine_lock 13 | BILL_DB_ID = db1 14 | ORCH_DB_ID = db1 15 | DATA_OBJECTS = ArticleCache:ControlArticlesCache:ArticleGLCodesCache:PackageCache:ProfitCostCenterCache:DunningScheduleDtlsCache:SubServiceParamsCache 16 | DUPLICATE_CHECK = N 17 | OBJ_REP_INIT_LOAD = 50 18 | OBJ_REP_SECONDARY_LOAD = 25 19 | OBJ_REP_MAINTAIN_LOAD = 50 20 | REFRESH_MODE = Y 21 | POLLING_INTERVAL = 1 22 | BILL_STOP_SIGNAL = ../logs/${INSTANCE_ID}_stopEngine.txt 23 | MAINTABLE_TRANSACTION_NUM_LOAD = 150 24 | STAT_UPDATE_FREQUENCY = 2 25 | -------------------------------------------------------------------------------- /makefiles/makefile_preAndPostBillCheck_solaris: -------------------------------------------------------------------------------- 1 | APPROOT=${BASE_PATH}/billing/preAndPostBillCheck 2 | ABL_INC_PATH=${BASE_PATH}/depends/servicesLayer/v1.3.6/include/ 3 | ABL_LIB_PATH=${BASE_PATH}/depends/servicesLayer/v1.3.6/lib/Solaris/ 4 | AMQP_INC_PATH=${BASE_PATH}/depends/amqpWrapper/include 5 | AMQP_LIB_PATH=${RELEASE_PATH}/billing/common/lib 6 | ORCH_MESG_INC_PATH=${BASE_PATH}/billing/common/messageFormat/include 7 | ORCH_MESG_REL_LIB_PATH=${RELEASE_PATH}/common/lib 8 | ORCH_MESG_DEB_LIB_PATH=${RELEASE_PATH}/common/lib 9 | UTILS_INC_PATH=${BASE_PATH}/billing/common/utils/include 10 | UTILS_REL_LIB_PATH=${RELEASE_PATH}/common/lib 11 | UTILS_DEB_LIB_PATH=${DEBUG_PATH}/common/lib 12 | REL_LIB_PATH=${RELEASE_PATH}/preAndPostBillCheck/bin 13 | DEB_LIB_PATH=${DEBUG_PATH}/preAndPostBillCheck/bin 14 | 15 | CCFLAGS= -m64 -D BULK_FETCH_COUNT=512 -I${ABL_INC_PATH} -I${AMQP_INC_PATH} -I${UTILS_INC_PATH} -I${ORCH_MESG_INC_PATH} -I${APPROOT}/include -fpermissive -c -fPIC 16 | DLNFLAGS=-m64 -lpthread -shared -Wl,-soname,$(LIBNAME).$(VER).so 17 | DLNFLAGSD=-m64 -lpthread -shared -Wl,-soname,$(LIBNAMED).$(VER).so 18 | UNIT_TEST=-D $(UNIT) 19 | 20 | 21 | 22 | all: dynamic test 23 | 24 | application: 25 | g++ -m64 $(UNIT_TEST) -L${ABL_LIB_PATH} -L${REL_LIB_PATH} -L${ORCH_MESG_REL_LIB_PATH} -L${UTILS_REL_LIB_PATH} -o ${REL_LIB_PATH}/${EXE} ${APPROOT}/objectfiles/*.o ${DEP_LIBS} -labl -lpthread -ldl 26 | g++ -g -m64 $(UNIT_TEST) -L${ABL_LIB_PATH} -L${DEB_LIB_PATH} -L${ORCH_MESG_DEB_LIB_PATH} -L${UTILS_DEB_LIB_PATH} -o ${DEB_LIB_PATH}/${EXED} ${APPROOT}/objectfiles/debug/*.o ${DEP_LIBSD} -labld -lpthread -ldl 27 | 28 | dynamic: 29 | g++ ${DLNFLAGS} -o ${REL_LIB_PATH}/$(LIBNAME).$(VER).so ${APPROOT}/objectfiles/*.o -L${ABL_LIB_PATH} ${DEP_LIBS} -labl 30 | g++ -g ${DLNFLAGSD} -o ${DEB_LIB_PATH}/$(LIBNAMED).$(VER).so ${APPROOT}/objectfiles/debug/*.o -L${ABL_LIB_PATH} ${DEP_LIBSD} -labld 31 | ln -s $(LIBNAME).$(VER).so ${REL_LIB_PATH}/$(LIBNAME).so 32 | ln -s $(LIBNAMED).$(VER).so ${DEB_LIB_PATH}/$(LIBNAMED).so 33 | 34 | test: 35 | g++ -m64 -g $(UNIT_TEST) -L${ABL_LIB_PATH} -o ${APPROOT}/bin/${EXE} ${APPROOT}/objectfiles/debug/*.o -labld -lpthread 36 | 37 | .cpp.o: 38 | g++ $(UNIT_TEST) $(CCFLAGS) -o ${APPROOT}/objectfiles/${OBJFILE} ${APPROOT}/source/${SOURCEFILE} 39 | g++ -g $(UNIT_TEST) $(CCFLAGS) -o ${APPROOT}/objectfiles/debug/${OBJFILE} ${APPROOT}/source/${SOURCEFILE} 40 | 41 | clean: 42 | rm ${APPROOT}/objectfiles/*.o 43 | rm ${APPROOT}/objectfiles/debug/*.o 44 | -------------------------------------------------------------------------------- /makefiles/makefile_preAndPostBillCheck_linux: -------------------------------------------------------------------------------- 1 | APPROOT:=${BASE_PATH}/billing/preAndPostBillCheck 2 | ABL_INC_PATH:=${BASE_PATH}/depends/servicesLayer/v1.3.6/include/ 3 | ABL_LIB_PATH:=${BASE_PATH}/depends/servicesLayer/v1.3.6/lib/Linux/ 4 | AMQP_INC_PATH:=${BASE_PATH}/depends/amqpWrapper/include 5 | AMQP_LIB_PATH:=${RELEASE_PATH}/billing/common/lib 6 | ORCH_MESG_INC_PATH:=${BASE_PATH}/billing/common/messageFormat/include 7 | ORCH_MESG_REL_LIB_PATH:=${RELEASE_PATH}/common/lib 8 | ORCH_MESG_DEB_LIB_PATH:=${RELEASE_PATH}/common/lib 9 | UTILS_INC_PATH:=${BASE_PATH}/billing/common/utils/include 10 | UTILS_REL_LIB_PATH:=${RELEASE_PATH}/common/lib 11 | UTILS_DEB_LIB_PATH:=${DEBUG_PATH}/common/lib 12 | REL_LIB_PATH:=${RELEASE_PATH}/preAndPostBillCheck/bin 13 | DEB_LIB_PATH:=${DEBUG_PATH}/preAndPostBillCheck/bin 14 | 15 | CCFLAGS:= -D BULK_FETCH_COUNT=512 -I${ABL_INC_PATH} -I${AMQP_INC_PATH} -I${UTILS_INC_PATH} -I${ORCH_MESG_INC_PATH} -I${APPROOT}/include -fpermissive -c -fPIC 16 | DLNFLAGS:=-lpthread -shared -Wl,-soname,$(LIBNAME).$(VER).so 17 | DLNFLAGSD:=-lpthread -shared -Wl,-soname,$(LIBNAMED).$(VER).so 18 | UNIT_TEST=-D $(UNIT) 19 | 20 | vpath %.cpp ${APPROOT}/source 21 | vpath %.h ${APPROOT}/include 22 | vpath %.o ${APPROOT}/objectfiles 23 | 24 | .SUFFIXES: .cpp .o .typ .h 25 | 26 | all: dynamic test 27 | 28 | application: ${OBJS} 29 | g++ $(UNIT_TEST) -L${ABL_LIB_PATH} -L${REL_LIB_PATH} -L${ORCH_MESG_REL_LIB_PATH} -L${UTILS_REL_LIB_PATH} -o ${REL_LIB_PATH}/${EXE} ${APPROOT}/objectfiles/*.o ${DEP_LIBS} -labl -lpthread -ldl 30 | g++ -g $(UNIT_TEST) -L${ABL_LIB_PATH} -L${DEB_LIB_PATH} -L${ORCH_MESG_DEB_LIB_PATH} -L${UTILS_DEB_LIB_PATH} -o ${DEB_LIB_PATH}/${EXED} ${APPROOT}/objectfiles/debug/*.o ${DEP_LIBSD} -labld -lpthread -ldl 31 | 32 | dynamic: ${OBJS} 33 | g++ ${DLNFLAGS} -o ${REL_LIB_PATH}/$(LIBNAME).$(VER).so ${APPROOT}/objectfiles/*.o -L${ABL_LIB_PATH} ${DEP_LIBS} -labl 34 | g++ -g ${DLNFLAGSD} -o ${DEB_LIB_PATH}/$(LIBNAMED).$(VER).so ${APPROOT}/objectfiles/debug/*.o -L${ABL_LIB_PATH} ${DEP_LIBSD} -labld 35 | ln -s $(LIBNAME).$(VER).so ${REL_LIB_PATH}/$(LIBNAME).so 36 | ln -s $(LIBNAMED).$(VER).so ${DEB_LIB_PATH}/$(LIBNAMED).so 37 | 38 | test: ${OBJS} 39 | g++ -g $(UNIT_TEST) -L${ABL_LIB_PATH} -o ${APPROOT}/bin/${EXE} ${APPROOT}/objectfiles/debug/*.o -labld -lpthread 40 | 41 | .cpp.o: %.h 42 | g++ $(UNIT_TEST) $(CCFLAGS) -o ${APPROOT}/objectfiles/$*.o ${APPROOT}/source/$*.cpp 43 | g++ -g $(UNIT_TEST) $(CCFLAGS) -o ${APPROOT}/objectfiles/debug/$*.o ${APPROOT}/source/$*.cpp 44 | 45 | clean: 46 | rm ${APPROOT}/objectfiles/*.o 47 | rm ${APPROOT}/objectfiles/debug/*.o 48 | -------------------------------------------------------------------------------- /include/PreAndPostBillWrapper.h: -------------------------------------------------------------------------------- 1 | #ifndef PREANDPOSTBILLWRAPPER_H 2 | #define PREANDPOSTBILLWRAPPER_H 3 | 4 | #include "OrchMessenger.h" 5 | #include "ABL_Service.h" 6 | #include "MessageQueue.h" 7 | 8 | /********************************************************************* 9 | # File : PreAndPostBillWrapper.h 10 | # Abstract : Class to call the pre and post bill cheack procedure. 11 | # Date : 31st May 2013 12 | # Author(s) : Srinivasan V 13 | # Code Size : lines 14 | # Design : 15 | # References : 16 | # Module : Commom 17 | ====================================================================== 18 | # Revision History 19 | ====================================================================== 20 | # SI Edited by Date Area Edited 21 | ====================================================================== 22 | **********************************************************************/ 23 | 24 | class PreAndPostBillWrapper 25 | { 26 | 27 | ABL_String m_confFile; 28 | ABL_Service *m_ABL_ServicePtr; 29 | ABL_String m_billDbID; 30 | ABL_Connection *m_billDbConnectionPtr; 31 | 32 | ABL_String m_inputQueue; 33 | ABL_String m_currentBillRunType; 34 | ABL_String m_currentBillRunMode; 35 | std::vector m_vecOfTags; 36 | OrchMessenger *m_orchMessengerPtr; 37 | ABL_String m_execName; 38 | 39 | MessageRepository* m_msgToOrchestrator;// repository to send message 40 | MessageRepository* m_msgFromOrchestrator; //repository to read Message 41 | 42 | 43 | //Will be used by BatchPrep for getting the input and output queues 44 | ABL_String m_receiveMessageFormat; //Receive the batch preparation request from task allocator at batch prep Q 45 | ABL_String m_batchCountMessageFormat; //Send the status of the batch to dispatcher Q 46 | ABL_String m_statsUpdatorMessageFormat; //Send the metrics of the batch to stats updator 47 | ABL_String m_taskAlMessageFormat; //Send the Task al 48 | ABL_String m_pauseActionMessageFormat; //Send the PAUSE ACK 49 | 50 | public: 51 | PreAndPostBillWrapper(); 52 | PreAndPostBillWrapper(ABL_String p_currentBillRunType, ABL_String p_currentBillRunMode, ABL_String p_confFile); 53 | PreAndPostBillWrapper(const PreAndPostBillWrapper& p_preAndPostBillWrapper); 54 | virtual ~PreAndPostBillWrapper(); 55 | bool mb_init(); 56 | bool mb_process(); 57 | bool mb_validRequest(ABL_String p_runMode, ABL_String p_billTypeInMsg); 58 | }; 59 | 60 | #endif /* PREANDPOSTBILLWRAPPER_H */ -------------------------------------------------------------------------------- /source/PreAndPostBillWrapperMain.cpp: -------------------------------------------------------------------------------- 1 | #include "PreAndPostBillWrapper.h" 2 | /********************************************************************* 3 | # File : PreAndPostBillWrapperMain.cpp 4 | # Abstract : Implementation of Pre and post bill check wrapper. 5 | # 6 | # Date : 18th Jul, 2013 7 | # Author(s) : Srinivasan V 8 | # Code Size : lines 9 | # Design : 10 | # References : 11 | # Module : 12 | ====================================================================== 13 | # Revision History 14 | ====================================================================== 15 | # SI Edited by Date Area Edited 16 | ====================================================================== */ 17 | 18 | ABL_String m_execName; 19 | int main(int argc, char** argv) 20 | { 21 | ABL_String l_runMode =" "; 22 | ABL_String l_runType = " "; //'P're or p'O'st 23 | ABL_String l_confFile; 24 | //Check the commmand line argument. 25 | if(argc != 3) 26 | { 27 | std::cerr << "Usage: " << argv[0] << "[S/N] [P/O]" << std::endl; 28 | return 1; 29 | } 30 | 31 | //Get the run mode from the 1st argument 32 | l_runType[0] = toupper(argv[1][0]); 33 | 34 | if(!(l_runType == "S" || l_runType == "N")) 35 | { 36 | std::cerr << "Usage: " << argv[0] << "[S/N] [P/O]" << std::endl; 37 | return 1; 38 | } 39 | 40 | 41 | //Get the run type from the 2nd argument 42 | l_runMode[0] = toupper(argv[2][0]); 43 | 44 | if(!(l_runMode == "P" || l_runMode == "O")) 45 | { 46 | std::cerr << "Usage: " << argv[0] << "[S/N] [P/O]" << std::endl; 47 | return 1; 48 | } 49 | 50 | if(l_runMode == "P") 51 | { 52 | m_execName = "PREBILL"; 53 | } 54 | else 55 | { 56 | m_execName = "POSTBILL"; 57 | } 58 | 59 | l_confFile = "../conf/PreAndPostBillWrapper.conf"; 60 | 61 | //std::cerr< 28 | 29 | /********************************************************************* 30 | # File : InvoicePosting.h 31 | # Abstract : This component is used to prepare for Invoice Posting 32 | # Date : 11th Aug 2015 33 | # Author(s) : Shriraj 34 | # Code Size : 35 | # Design : 36 | # References 37 | # Module : Component 38 | ====================================================================== 39 | # Revision History 40 | ====================================================================== 41 | # SI Edited by Date Area Edited 42 | ====================================================================== 43 | # 1 Shriraj G. 11-08-2015 Initial Version 44 | 45 | ====================================================================== 46 | # Base Class : CBase 47 | ====================================================================== 48 | # member 49 | # Variables : 50 | ====================================================================== 51 | # member 52 | # Functions : 53 | # 54 | ====================================================================== 55 | Libraries: framework,components 56 | **********************************************************************/ 57 | 58 | /** @class InvoicePosting 59 | * @ingroup Components 60 | * @brief prepare for posting 61 | * @details 62 | */ 63 | 64 | class EXPORT InvoicePosting : public CBaseComponent 65 | { 66 | 67 | protected: 68 | 69 | /** ABL_Service pointer 70 | */ 71 | ABL_Service *m_ABL_ServicePtr 72 | ; 73 | ObjectManager *m_objectManager; 74 | 75 | _int64 m_billCycleFullCode; 76 | 77 | public: 78 | /** Default InvoicePosting default constructor 79 | */ 80 | InvoicePosting(); 81 | 82 | /** Default InvoicePosting default destructor 83 | */ 84 | virtual ~InvoicePosting(); 85 | 86 | /** Default InvoicePosting copy constructor 87 | */ 88 | InvoicePosting(const InvoicePosting &p_InvoicePosting); 89 | 90 | /** Interface to clone the InvoicePosting object. 91 | */ 92 | virtual Base_Registry* mb_clone(){return (Base_Registry*) new InvoicePosting(*this);} 93 | 94 | /** Interface for getting thread specific Object manager 95 | */ 96 | virtual void mb_setObjectManager(ObjectManager *p_objectManager) 97 | { 98 | m_objectManager = p_objectManager; 99 | } 100 | 101 | /** This function is invoked by the framework. 102 | * @param p_servicePtr -> ABL_Service pointer provided by Framework 103 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 104 | */ 105 | virtual bool mb_initComponent(ABL_Service *p_servicePtr = NULL); 106 | 107 | 108 | /** This function is invoked by the framework 109 | * @param p_ABL_JobPtr -> ABL_Job 110 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 111 | */ 112 | 113 | virtual bool mb_process(ABL_Job* &p_ABL_JobPtr); 114 | 115 | virtual bool mb_refreshComponent(MessageRepository *p_messageRepository,LocalCacheManager *p_localCacheManagerPtr); 116 | 117 | /** This function is invoked by the framework 118 | * @param p_ABL_CacheManagerPtr -> ABL_CacheManager. 119 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 120 | */ 121 | virtual bool mb_getCache(ABL_CacheManager* p_ABL_CacheManagerPtr); 122 | 123 | virtual void mb_addCharge(BillJob * p_jobPtr,double p_accountCode,ABL_String ChargeName,ProcessedCharge* p_processedChargePtr); 124 | 125 | };//Dunning 126 | 127 | extern "C" {EXPORT Base_Registry* gb_getInvoicePosting();} 128 | 129 | #endif //INV_POST_H 130 | 131 | 132 | /********************************************************************* 133 | # 134 | # Copyright 2015 - 2016 135 | # Tecnotree Convergence Pvt. Ltd. 136 | # 137 | *********************************************************************/ 138 | -------------------------------------------------------------------------------- /include/AutoDebit.h: -------------------------------------------------------------------------------- 1 | /** @file AutoDebit.h 2 | * @brief AutoDebit Component 3 | */ 4 | 5 | ////////////////////////////////////////////////////////////////////// 6 | // AutoDebit.h: Interface for doing AutoDebit 7 | // 8 | ////////////////////////////////////////////////////////////////////// 9 | 10 | 11 | #ifndef AUTO_DEBIT_H 12 | #define AUTO_DEBIT_H 13 | 14 | #include "Base_Registry.h" 15 | #include "ABL_String.h" 16 | #include "ABL_Job.h" 17 | #include "ABL_Service.h" 18 | #include "ABL_CacheManager.h" 19 | #include "CBaseComponent.h" 20 | #include "ErrorDetails.h" 21 | #include "ErrorCodes.h" 22 | #include "BillJob.h" 23 | #include "ConfigParams.h" 24 | #include "ObjectManager.h" 25 | #include "Utils.h" 26 | #include 27 | 28 | /********************************************************************* 29 | # File : AutoDebit.h 30 | # Abstract : This component is used for doing AutoDebit 31 | # Date : 18th Sep 2013 32 | # Author(s) : Ralph 33 | # Code Size : 34 | # Design : 35 | # References 36 | # Module : Component 37 | ====================================================================== 38 | # Revision History 39 | ====================================================================== 40 | # SI Edited by Date Area Edited 41 | ====================================================================== 42 | # 1 Ralph 25-10-2013 Added Setter for Object Manager 43 | and modified error logging 44 | ====================================================================== 45 | # Base Class : CBase 46 | ====================================================================== 47 | # member 48 | # Variables : 49 | ====================================================================== 50 | # member 51 | # Functions : 52 | # 53 | ====================================================================== 54 | Libraries: framework,components 55 | **********************************************************************/ 56 | 57 | /** @class AutoDebit 58 | * @ingroup Components 59 | * @brief Pass credit note 60 | * @details 61 | */ 62 | 63 | class EXPORT AutoDebit : public CBaseComponent 64 | { 65 | 66 | protected: 67 | 68 | /** ABL_Service pointer 69 | */ 70 | ABL_Service *m_ABL_ServicePtr; 71 | 72 | ConfigParams *m_configParams; 73 | 74 | ObjectManager *m_objectManager; 75 | 76 | //Parameters from the Queue 77 | _int64 m_billCycleFullCode; 78 | 79 | public: 80 | /** Default AutoDebit default constructor 81 | */ 82 | AutoDebit(); 83 | 84 | /** Default AutoDebit default destructor 85 | */ 86 | virtual ~AutoDebit(); 87 | 88 | /** Default AutoDebit copy constructor 89 | */ 90 | AutoDebit(const AutoDebit &p_AutoDebit); 91 | 92 | /** Interface to clone the AutoDebit object. 93 | */ 94 | virtual Base_Registry* mb_clone(){return (Base_Registry*) new AutoDebit(*this);} 95 | 96 | /** Interface for getting thread specific Object manager 97 | */ 98 | virtual void mb_setObjectManager(ObjectManager *p_objectManager) 99 | { 100 | m_objectManager = p_objectManager; 101 | } 102 | 103 | /** This function is invoked by the framework. 104 | * @param p_servicePtr -> ABL_Service pointer provided by Framework 105 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 106 | */ 107 | virtual bool mb_initComponent(ABL_Service *p_servicePtr = NULL); 108 | 109 | 110 | /** This function is invoked by the framework 111 | * @param p_ABL_JobPtr -> ABL_Job 112 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 113 | */ 114 | 115 | virtual bool mb_process(ABL_Job* &p_ABL_JobPtr); 116 | 117 | virtual bool mb_refreshComponent(MessageRepository *p_messageRepository,LocalCacheManager *p_localCacheManagerPtr); 118 | 119 | /** This function is invoked by the framework 120 | * @param p_ABL_CacheManagerPtr -> ABL_CacheManager. 121 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 122 | */ 123 | virtual bool mb_getCache(ABL_CacheManager* p_ABL_CacheManagerPtr); 124 | 125 | virtual void mb_addCharge(BillJob * p_jobPtr,double p_accountCode,ABL_String ChargeName,ProcessedCharge* p_processedChargePtr); 126 | 127 | };//AutoDebit 128 | 129 | extern "C" {EXPORT Base_Registry* gb_getAutoDebit();} 130 | 131 | #endif //AUTO_DEBIT_H 132 | 133 | 134 | /********************************************************************* 135 | # 136 | # Copyright 2012 - 2013 137 | # Tecnotree Convergence Ltd. 138 | # 139 | *********************************************************************/ 140 | 141 | 142 | -------------------------------------------------------------------------------- /include/CycleSummaryStatus.h: -------------------------------------------------------------------------------- 1 | /** @file CycleSummaryStatus.h 2 | * @brief CycleSummaryStatus Component 3 | */ 4 | 5 | ////////////////////////////////////////////////////////////////////// 6 | // CycleSummaryStatus.h: Interface for doing CycleSummaryStatus 7 | // 8 | ////////////////////////////////////////////////////////////////////// 9 | 10 | 11 | #ifndef CYCLE_SUMMARY_STATUS_H 12 | #define CYCLE_SUMMARY_STATUS_H 13 | 14 | #include "Base_Registry.h" 15 | #include "ABL_String.h" 16 | #include "ABL_Job.h" 17 | #include "ABL_Service.h" 18 | #include "ABL_CacheManager.h" 19 | #include "CBaseComponent.h" 20 | #include "ErrorDetails.h" 21 | #include "ErrorCodes.h" 22 | #include "BillJob.h" 23 | #include "ConfigParams.h" 24 | #include "ObjectManager.h" 25 | #include "Utils.h" 26 | #include 27 | 28 | /********************************************************************* 29 | # File : CycleSummaryStatus.h 30 | # Abstract : This component is used for doing CycleSummaryStatus 31 | # Date : 05th Feb,2014 32 | # Author(s) : Ralph 33 | # Code Size : 34 | # Design : 35 | # References 36 | # Module : Component 37 | ====================================================================== 38 | # Revision History 39 | ====================================================================== 40 | # SI Edited by Date Area Edited 41 | ====================================================================== 42 | # 43 | ====================================================================== 44 | # Base Class : CBase 45 | ====================================================================== 46 | # member 47 | # Variables : 48 | ====================================================================== 49 | # member 50 | # Functions : 51 | # 52 | ====================================================================== 53 | Libraries: framework,components 54 | **********************************************************************/ 55 | 56 | /** @class CycleSummaryStatus 57 | * @ingroup Components 58 | * @brief Cycle Summary Status 59 | * @details 60 | */ 61 | 62 | class EXPORT CycleSummaryStatus : public CBaseComponent 63 | { 64 | 65 | protected: 66 | 67 | /** ABL_Service pointer 68 | */ 69 | ABL_Service *m_ABL_ServicePtr; 70 | 71 | ConfigParams *m_configParams; 72 | 73 | ObjectManager *m_objectManager; 74 | 75 | //Parameters from the Queue 76 | _int64 m_billCycleFullCode; 77 | 78 | 79 | public: 80 | /** Default CycleSummaryStatus default constructor 81 | */ 82 | CycleSummaryStatus(); 83 | 84 | /** Default CycleSummaryStatus default destructor 85 | */ 86 | virtual ~CycleSummaryStatus(); 87 | 88 | /** Default CycleSummaryStatus copy constructor 89 | */ 90 | CycleSummaryStatus(const CycleSummaryStatus &p_BillCycleChange); 91 | 92 | /** Interface to clone the CycleSummaryStatus object. 93 | */ 94 | virtual Base_Registry* mb_clone(){return (Base_Registry*) new CycleSummaryStatus(*this);} 95 | 96 | /** Interface for getting thread specific Object manager 97 | */ 98 | virtual void mb_setObjectManager(ObjectManager *p_objectManager) 99 | { 100 | m_objectManager = p_objectManager; 101 | } 102 | 103 | /** This function is invoked by the framework. 104 | * @param p_servicePtr -> ABL_Service pointer provided by Framework 105 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 106 | */ 107 | virtual bool mb_initComponent(ABL_Service *p_servicePtr = NULL); 108 | 109 | 110 | /** This function is invoked by the framework 111 | * @param p_ABL_JobPtr -> ABL_Job 112 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 113 | */ 114 | 115 | virtual bool mb_process(ABL_Job* &p_ABL_JobPtr); 116 | 117 | virtual bool mb_refreshComponent(MessageRepository *p_messageRepository,LocalCacheManager *p_localCacheManagerPtr); 118 | 119 | /** This function is invoked by the framework 120 | * @param p_ABL_CacheManagerPtr -> ABL_CacheManager. 121 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 122 | */ 123 | virtual bool mb_getCache(ABL_CacheManager* p_ABL_CacheManagerPtr); 124 | 125 | virtual void mb_addCharge(BillJob * p_jobPtr,double p_accountCode,ABL_String ChargeName,ProcessedCharge* p_processedChargePtr); 126 | 127 | };//CycleSummaryStatus 128 | 129 | extern "C" {EXPORT Base_Registry* gb_getCycleSummaryStatus();} 130 | 131 | #endif //CYCLE_SUMMARY_STATUS_H 132 | 133 | 134 | /********************************************************************* 135 | # 136 | # Copyright 2012 - 2013 137 | # Tecnotree Convergence Ltd. 138 | # 139 | *********************************************************************/ 140 | 141 | 142 | -------------------------------------------------------------------------------- /include/DisablePrepaidBilling.h: -------------------------------------------------------------------------------- 1 | /** @file DisablePrepaidBilling.h 2 | * @brief DisablePrepaidBilling Component 3 | */ 4 | 5 | ////////////////////////////////////////////////////////////////////// 6 | // DisablePrepaidBilling.h: Interface for DisablePrepaidBilling 7 | // 8 | ////////////////////////////////////////////////////////////////////// 9 | 10 | 11 | #ifndef DISABLE_PREPAID_BILLING_H 12 | #define DISABLE_PREPAID_BILLING_H 13 | 14 | #include "Base_Registry.h" 15 | #include "ABL_String.h" 16 | #include "ABL_Job.h" 17 | #include "ABL_Service.h" 18 | #include "ABL_CacheManager.h" 19 | #include "CBaseComponent.h" 20 | #include "ErrorDetails.h" 21 | #include "ErrorCodes.h" 22 | #include "BillJob.h" 23 | #include "ObjectManager.h" 24 | #include "Utils.h" 25 | #include 26 | 27 | /********************************************************************* 28 | # File : DisablePrepaidBilling.h 29 | # Abstract : This component is used for doing DisablePrepaidBilling 30 | # Date : 15th Jul,2015 31 | # Author(s) : Ralph 32 | # Code Size : 33 | # Design : 34 | # References 35 | # Module : Component 36 | ====================================================================== 37 | # Revision History 38 | ====================================================================== 39 | # SI Edited by Date Area Edited 40 | ====================================================================== 41 | # 42 | ====================================================================== 43 | # Base Class : CBase 44 | ====================================================================== 45 | # member 46 | # Variables : 47 | ====================================================================== 48 | # member 49 | # Functions : 50 | # 51 | ====================================================================== 52 | Libraries: framework,components 53 | **********************************************************************/ 54 | 55 | /** @class DisablePrepaidBilling 56 | * @ingroup Components 57 | * @brief Disables billing for prepaid accounts 58 | * @details 59 | */ 60 | 61 | class EXPORT DisablePrepaidBilling : public CBaseComponent 62 | { 63 | 64 | protected: 65 | 66 | /** ABL_Service pointer 67 | */ 68 | ABL_Service *m_ABL_ServicePtr; 69 | 70 | ObjectManager *m_objectManager; 71 | 72 | //Parameters from the Queue 73 | _int64 m_billCycleFullCode; 74 | ABL_Date m_cycleEndDate; 75 | 76 | public: 77 | /** Default DisablePrepaidBilling default constructor 78 | */ 79 | DisablePrepaidBilling(); 80 | 81 | /** Default DisablePrepaidBilling default destructor 82 | */ 83 | virtual ~DisablePrepaidBilling(); 84 | 85 | /** Default DisablePrepaidBilling copy constructor 86 | */ 87 | DisablePrepaidBilling(const DisablePrepaidBilling &p_DisablePrepaidBilling); 88 | 89 | /** Interface to clone the DisablePrepaidBilling object. 90 | */ 91 | virtual Base_Registry* mb_clone(){return (Base_Registry*) new DisablePrepaidBilling(*this);} 92 | 93 | /** Interface for getting thread specific Object manager 94 | */ 95 | virtual void mb_setObjectManager(ObjectManager *p_objectManager) 96 | { 97 | m_objectManager = p_objectManager; 98 | } 99 | 100 | /** This function is invoked by the framework. 101 | * @param p_servicePtr -> ABL_Service pointer provided by Framework 102 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 103 | */ 104 | virtual bool mb_initComponent(ABL_Service *p_servicePtr = NULL); 105 | 106 | 107 | /** This function is invoked by the framework 108 | * @param p_ABL_JobPtr -> ABL_Job 109 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 110 | */ 111 | 112 | virtual bool mb_process(ABL_Job* &p_ABL_JobPtr); 113 | 114 | virtual bool mb_refreshComponent(MessageRepository *p_messageRepository,LocalCacheManager *p_localCacheManagerPtr); 115 | 116 | /** This function is invoked by the framework 117 | * @param p_ABL_CacheManagerPtr -> ABL_CacheManager. 118 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 119 | */ 120 | virtual bool mb_getCache(ABL_CacheManager* p_ABL_CacheManagerPtr); 121 | 122 | virtual void mb_addCharge(BillJob * p_jobPtr,double p_accountCode,ABL_String ChargeName,ProcessedCharge* p_processedChargePtr); 123 | 124 | };//DisablePrepaidBilling 125 | 126 | extern "C" {EXPORT Base_Registry* gb_getDisablePrepaidBilling();} 127 | 128 | #endif 129 | 130 | 131 | /********************************************************************* 132 | # 133 | # Copyright 2015 - 2016 134 | # Tecnotree Convergence Ltd. 135 | # 136 | *********************************************************************/ 137 | 138 | 139 | -------------------------------------------------------------------------------- /include/AutoAdjustment.h: -------------------------------------------------------------------------------- 1 | /** @file AutoAdjustment.h 2 | * @brief AutoAdjustment Component 3 | */ 4 | 5 | ////////////////////////////////////////////////////////////////////// 6 | // AutoAdjustment.h: Interface for doing AutoAdjustment 7 | // 8 | ////////////////////////////////////////////////////////////////////// 9 | 10 | 11 | #ifndef AUTO_ADJUSTMENT_H 12 | #define AUTO_ADJUSTMENT_H 13 | 14 | #include "Base_Registry.h" 15 | #include "ABL_String.h" 16 | #include "ABL_Job.h" 17 | #include "ABL_Service.h" 18 | #include "ABL_CacheManager.h" 19 | #include "CBaseComponent.h" 20 | #include "ErrorDetails.h" 21 | #include "ErrorCodes.h" 22 | #include "BillJob.h" 23 | #include "ConfigParams.h" 24 | #include "ObjectManager.h" 25 | #include "Utils.h" 26 | #include 27 | 28 | /********************************************************************* 29 | # File : AutoAdjustment.h 30 | # Abstract : This component is used for doing AutoAdjustment 31 | # Date : 12th Aug 2013 32 | # Author(s) : Ralph 33 | # Code Size : 34 | # Design : 35 | # References 36 | # Module : Component 37 | ====================================================================== 38 | # Revision History 39 | ====================================================================== 40 | # SI Edited by Date Area Edited 41 | ====================================================================== 42 | # 1 Ralph 25-10-2013 Added Setter for Object Manager 43 | and modified error logging 44 | ====================================================================== 45 | # Base Class : CBase 46 | ====================================================================== 47 | # member 48 | # Variables : 49 | ====================================================================== 50 | # member 51 | # Functions : 52 | # 53 | ====================================================================== 54 | Libraries: framework,components 55 | **********************************************************************/ 56 | 57 | /** @class AutoAdjustment 58 | * @ingroup Components 59 | * @brief Pass credit note 60 | * @details 61 | */ 62 | 63 | class EXPORT AutoAdjustment : public CBaseComponent 64 | { 65 | 66 | protected: 67 | 68 | /** ABL_Service pointer 69 | */ 70 | ABL_Service *m_ABL_ServicePtr; 71 | 72 | ConfigParams *m_configParams; 73 | 74 | ObjectManager *m_objectManager; 75 | 76 | //Parameters from the Queue 77 | _int64 m_billCycleFullCode; 78 | ABL_Date m_cycleEndDate; 79 | 80 | public: 81 | /** Default AutoAdjustment default constructor 82 | */ 83 | AutoAdjustment(); 84 | 85 | /** Default AutoAdjustment default destructor 86 | */ 87 | virtual ~AutoAdjustment(); 88 | 89 | /** Default AutoAdjustment copy constructor 90 | */ 91 | AutoAdjustment(const AutoAdjustment &p_AutoAdjustment); 92 | 93 | /** Interface to clone the AutoAdjustment object. 94 | */ 95 | virtual Base_Registry* mb_clone(){return (Base_Registry*) new AutoAdjustment(*this);} 96 | 97 | /** Interface for getting thread specific Object manager 98 | */ 99 | virtual void mb_setObjectManager(ObjectManager *p_objectManager) 100 | { 101 | m_objectManager = p_objectManager; 102 | } 103 | 104 | /** This function is invoked by the framework. 105 | * @param p_servicePtr -> ABL_Service pointer provided by Framework 106 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 107 | */ 108 | virtual bool mb_initComponent(ABL_Service *p_servicePtr = NULL); 109 | 110 | 111 | /** This function is invoked by the framework 112 | * @param p_ABL_JobPtr -> ABL_Job 113 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 114 | */ 115 | 116 | virtual bool mb_process(ABL_Job* &p_ABL_JobPtr); 117 | 118 | virtual bool mb_refreshComponent(MessageRepository *p_messageRepository,LocalCacheManager *p_localCacheManagerPtr); 119 | 120 | /** This function is invoked by the framework 121 | * @param p_ABL_CacheManagerPtr -> ABL_CacheManager. 122 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 123 | */ 124 | virtual bool mb_getCache(ABL_CacheManager* p_ABL_CacheManagerPtr); 125 | 126 | virtual void mb_addCharge(BillJob * p_jobPtr,double p_accountCode,ABL_String ChargeName,ProcessedCharge* p_processedChargePtr); 127 | 128 | };//AutoAdjustment 129 | 130 | extern "C" {EXPORT Base_Registry* gb_getAutoAdjustment();} 131 | 132 | #endif //AUTO_ADJUSTMENT_H 133 | 134 | 135 | /********************************************************************* 136 | # 137 | # Copyright 2012 - 2013 138 | # Tecnotree Convergence Ltd. 139 | # 140 | *********************************************************************/ 141 | 142 | 143 | -------------------------------------------------------------------------------- /include/BillCycleChange.h: -------------------------------------------------------------------------------- 1 | /** @file BillCycleChange.h 2 | * @brief BillCycleChange Component 3 | */ 4 | 5 | ////////////////////////////////////////////////////////////////////// 6 | // BillCycleChange.h: Interface for doing BillCycleChange 7 | // 8 | ////////////////////////////////////////////////////////////////////// 9 | 10 | 11 | #ifndef BILL_CYC_CHNG_H 12 | #define BILL_CYC_CHNG_H 13 | 14 | #include "Base_Registry.h" 15 | #include "ABL_String.h" 16 | #include "ABL_Job.h" 17 | #include "ABL_Service.h" 18 | #include "ABL_CacheManager.h" 19 | #include "CBaseComponent.h" 20 | #include "ErrorDetails.h" 21 | #include "ErrorCodes.h" 22 | #include "BillJob.h" 23 | #include "ConfigParams.h" 24 | #include "ObjectManager.h" 25 | #include "Utils.h" 26 | #include 27 | 28 | /********************************************************************* 29 | # File : BillCycleChange.h 30 | # Abstract : This component is used for doing BillCycleChange 31 | # Date : 05th Feb,2014 32 | # Author(s) : Ralph 33 | # Code Size : 34 | # Design : 35 | # References 36 | # Module : Component 37 | ====================================================================== 38 | # Revision History 39 | ====================================================================== 40 | # SI Edited by Date Area Edited 41 | ====================================================================== 42 | # 43 | ====================================================================== 44 | # Base Class : CBase 45 | ====================================================================== 46 | # member 47 | # Variables : 48 | ====================================================================== 49 | # member 50 | # Functions : 51 | # 52 | ====================================================================== 53 | Libraries: framework,components 54 | **********************************************************************/ 55 | 56 | /** @class BillCycleChange 57 | * @ingroup Components 58 | * @brief Terminate Accounts 59 | * @details 60 | */ 61 | 62 | class EXPORT BillCycleChange : public CBaseComponent 63 | { 64 | 65 | protected: 66 | 67 | /** ABL_Service pointer 68 | */ 69 | ABL_Service *m_ABL_ServicePtr; 70 | 71 | ConfigParams *m_configParams; 72 | 73 | ObjectManager *m_objectManager; 74 | 75 | //Parameters from the Queue 76 | _int64 m_billCycleFullCode; 77 | _int64 m_nextBillCycleFullCode; 78 | ABL_Date m_cycleEndDate; 79 | 80 | //Config params 81 | ABL_String m_activeStatusCode; 82 | ABL_String m_suspendedStatusCode; 83 | 84 | public: 85 | /** Default BillCycleChange default constructor 86 | */ 87 | BillCycleChange(); 88 | 89 | /** Default BillCycleChange default destructor 90 | */ 91 | virtual ~BillCycleChange(); 92 | 93 | /** Default BillCycleChange copy constructor 94 | */ 95 | BillCycleChange(const BillCycleChange &p_BillCycleChange); 96 | 97 | /** Interface to clone the BillCycleChange object. 98 | */ 99 | virtual Base_Registry* mb_clone(){return (Base_Registry*) new BillCycleChange(*this);} 100 | 101 | /** Interface for getting thread specific Object manager 102 | */ 103 | virtual void mb_setObjectManager(ObjectManager *p_objectManager) 104 | { 105 | m_objectManager = p_objectManager; 106 | } 107 | 108 | /** This function is invoked by the framework. 109 | * @param p_servicePtr -> ABL_Service pointer provided by Framework 110 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 111 | */ 112 | virtual bool mb_initComponent(ABL_Service *p_servicePtr = NULL); 113 | 114 | 115 | /** This function is invoked by the framework 116 | * @param p_ABL_JobPtr -> ABL_Job 117 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 118 | */ 119 | 120 | virtual bool mb_process(ABL_Job* &p_ABL_JobPtr); 121 | 122 | virtual bool mb_refreshComponent(MessageRepository *p_messageRepository,LocalCacheManager *p_localCacheManagerPtr); 123 | 124 | /** This function is invoked by the framework 125 | * @param p_ABL_CacheManagerPtr -> ABL_CacheManager. 126 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 127 | */ 128 | virtual bool mb_getCache(ABL_CacheManager* p_ABL_CacheManagerPtr); 129 | 130 | virtual void mb_addCharge(BillJob * p_jobPtr,double p_accountCode,ABL_String ChargeName,ProcessedCharge* p_processedChargePtr); 131 | 132 | };//BillCycleChange 133 | 134 | extern "C" {EXPORT Base_Registry* gb_getBillCycleChange();} 135 | 136 | #endif //BILL_CYC_CHNG_H 137 | 138 | 139 | /********************************************************************* 140 | # 141 | # Copyright 2012 - 2013 142 | # Tecnotree Convergence Ltd. 143 | # 144 | *********************************************************************/ 145 | 146 | 147 | -------------------------------------------------------------------------------- /include/Confirmation.h: -------------------------------------------------------------------------------- 1 | /** @file Confirmation.h 2 | * @brief Confirmation Component 3 | */ 4 | 5 | ////////////////////////////////////////////////////////////////////// 6 | // Confirmation.h: Interface for making dunning entry for the subscriber 7 | // 8 | ////////////////////////////////////////////////////////////////////// 9 | 10 | 11 | #ifndef CONFIRMATION_H 12 | #define CONFIRMATION_H 13 | 14 | #include "Base_Registry.h" 15 | #include "ABL_String.h" 16 | #include "ABL_Job.h" 17 | #include "ABL_Service.h" 18 | #include "ABL_CacheManager.h" 19 | #include "CBaseComponent.h" 20 | #include "ErrorDetails.h" 21 | #include "ErrorCodes.h" 22 | #include "BillJob.h" 23 | #include "ConfigParams.h" 24 | #include "ObjectManager.h" 25 | #include "Utils.h" 26 | 27 | #include 28 | 29 | /********************************************************************* 30 | # File : Confirmation.h 31 | # Abstract : This component for doing confirmation process 32 | # Date : 23rd Oct 2013 33 | # Author(s) : Ralph 34 | # Code Size : 35 | # Design : 36 | # References 37 | # Module : Component 38 | ====================================================================== 39 | # Revision History 40 | ====================================================================== 41 | # SI Edited by Date Area Edited 42 | ====================================================================== 43 | # 1 Ralph 25-10-2013 Added Setter for Object Manager 44 | and modified error logging 45 | ====================================================================== 46 | # Base Class : CBase 47 | ====================================================================== 48 | # member 49 | # Variables : 50 | ====================================================================== 51 | # member 52 | # Functions : 53 | # 54 | ====================================================================== 55 | Libraries: framework,components 56 | **********************************************************************/ 57 | 58 | /** @class Confirmation 59 | * @ingroup Components 60 | * @brief Pass credit note 61 | * @details 62 | */ 63 | 64 | class EXPORT Confirmation : public CBaseComponent 65 | { 66 | 67 | protected: 68 | 69 | /** ABL_Service pointer 70 | */ 71 | ABL_Service *m_ABL_ServicePtr; 72 | 73 | ConfigParams *m_configParams; 74 | 75 | ObjectManager *m_objectManager; 76 | 77 | //Parameters from the Queue 78 | _int64 m_billCycleFullCode; 79 | ABL_Date m_cycleStartDate; 80 | ABL_Date m_cycleEndDate; 81 | ABL_String m_billRunType; 82 | 83 | //Deduced parameters 84 | _int64 m_nextBillCycleFullCode; 85 | 86 | 87 | public: 88 | /** Default Confirmation default constructor 89 | */ 90 | Confirmation(); 91 | 92 | /** Default Confirmation default destructor 93 | */ 94 | virtual ~Confirmation(); 95 | 96 | /** Default Confirmation copy constructor 97 | */ 98 | Confirmation(const Confirmation &p_Confirmation); 99 | 100 | /** Interface to clone the Confirmation object. 101 | */ 102 | virtual Base_Registry* mb_clone(){return (Base_Registry*) new Confirmation(*this);} 103 | 104 | /** Interface for getting thread specific Object manager 105 | */ 106 | virtual void mb_setObjectManager(ObjectManager *p_objectManager) 107 | { 108 | m_objectManager = p_objectManager; 109 | } 110 | 111 | /** This function is invoked by the framework. 112 | * @param p_servicePtr -> ABL_Service pointer provided by Framework 113 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 114 | */ 115 | virtual bool mb_initComponent(ABL_Service *p_servicePtr = NULL); 116 | 117 | 118 | /** This function is invoked by the framework 119 | * @param p_ABL_JobPtr -> ABL_Job 120 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 121 | */ 122 | virtual bool mb_process(ABL_Job* &p_ABL_JobPtr); 123 | 124 | virtual bool mb_refreshComponent(MessageRepository *p_messageRepository,LocalCacheManager *p_localCacheManagerPtr); 125 | 126 | /** This function is invoked by the framework 127 | * @param p_ABL_CacheManagerPtr -> ABL_CacheManager. 128 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 129 | */ 130 | virtual bool mb_getCache(ABL_CacheManager* p_ABL_CacheManagerPtr); 131 | 132 | virtual void mb_addCharge(BillJob * p_jobPtr,double p_accountCode,ABL_String ChargeName,ProcessedCharge* p_processedChargePtr); 133 | 134 | };//Confirmation 135 | 136 | extern "C" {EXPORT Base_Registry* gb_getConfirmation();} 137 | 138 | #endif //CONFIRMATION_H 139 | 140 | 141 | /********************************************************************* 142 | # 143 | # Copyright 2012 - 2013 144 | # Tecnotree Convergence Ltd. 145 | # 146 | *********************************************************************/ 147 | 148 | 149 | -------------------------------------------------------------------------------- /include/Dunning.h: -------------------------------------------------------------------------------- 1 | /** @file Dunning.h 2 | * @brief Dunning Component 3 | */ 4 | 5 | ////////////////////////////////////////////////////////////////////// 6 | // Dunning.h: Interface for making dunning entry for the subscriber 7 | // 8 | ////////////////////////////////////////////////////////////////////// 9 | 10 | 11 | #ifndef DUNNING_H 12 | #define DUNNING_H 13 | 14 | #include "Base_Registry.h" 15 | #include "ABL_String.h" 16 | #include "ABL_Job.h" 17 | #include "ABL_Service.h" 18 | #include "ABL_CacheManager.h" 19 | #include "CBaseComponent.h" 20 | #include "ErrorDetails.h" 21 | #include "ErrorCodes.h" 22 | #include "BillJob.h" 23 | #include "ConfigParams.h" 24 | #include "ObjectManager.h" 25 | #include "Utils.h" 26 | 27 | #include "DunningScheduleDtlsCache.h" 28 | 29 | #include 30 | 31 | /********************************************************************* 32 | # File : Dunning.h 33 | # Abstract : This component is used for making dunning entry for the subscriber 34 | # Date : 19th Oct 2013 35 | # Author(s) : Ralph 36 | # Code Size : 37 | # Design : 38 | # References 39 | # Module : Component 40 | ====================================================================== 41 | # Revision History 42 | ====================================================================== 43 | # SI Edited by Date Area Edited 44 | ====================================================================== 45 | # 1 Ralph 25-10-2013 Added Setter for Object Manager 46 | and modified error logging 47 | ====================================================================== 48 | # Base Class : CBase 49 | ====================================================================== 50 | # member 51 | # Variables : 52 | ====================================================================== 53 | # member 54 | # Functions : 55 | # 56 | ====================================================================== 57 | Libraries: framework,components 58 | **********************************************************************/ 59 | 60 | /** @class Dunning 61 | * @ingroup Components 62 | * @brief Pass credit note 63 | * @details 64 | */ 65 | 66 | class EXPORT Dunning : public CBaseComponent 67 | { 68 | 69 | protected: 70 | 71 | /** ABL_Service pointer 72 | */ 73 | ABL_Service *m_ABL_ServicePtr; 74 | 75 | ConfigParams *m_configParams; 76 | 77 | ObjectManager *m_objectManager; 78 | 79 | //Parameters from the Queue 80 | _int64 m_billCycleFullCode; 81 | ABL_Date m_cycleEndDate; 82 | 83 | /*Define a data_container for DunningScheduleDtlsCache*/ 84 | data_container *m_dunningScheduleDtlsContainer; 85 | 86 | /* Define a Search Object for DunningScheduleDtlsCache*/ 87 | DunningScheduleDtlsCache *m_dunningScheduleDtlsSearchObj; 88 | 89 | public: 90 | /** Default Dunning default constructor 91 | */ 92 | Dunning(); 93 | 94 | /** Default Dunning default destructor 95 | */ 96 | virtual ~Dunning(); 97 | 98 | /** Default Dunning copy constructor 99 | */ 100 | Dunning(const Dunning &p_Dunning); 101 | 102 | /** Interface to clone the Dunning object. 103 | */ 104 | virtual Base_Registry* mb_clone(){return (Base_Registry*) new Dunning(*this);} 105 | 106 | /** Interface for getting thread specific Object manager 107 | */ 108 | virtual void mb_setObjectManager(ObjectManager *p_objectManager) 109 | { 110 | m_objectManager = p_objectManager; 111 | } 112 | 113 | /** This function is invoked by the framework. 114 | * @param p_servicePtr -> ABL_Service pointer provided by Framework 115 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 116 | */ 117 | virtual bool mb_initComponent(ABL_Service *p_servicePtr = NULL); 118 | 119 | 120 | /** This function is invoked by the framework 121 | * @param p_ABL_JobPtr -> ABL_Job 122 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 123 | */ 124 | 125 | virtual bool mb_process(ABL_Job* &p_ABL_JobPtr); 126 | 127 | virtual bool mb_refreshComponent(MessageRepository *p_messageRepository,LocalCacheManager *p_localCacheManagerPtr); 128 | 129 | /** This function is invoked by the framework 130 | * @param p_ABL_CacheManagerPtr -> ABL_CacheManager. 131 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 132 | */ 133 | virtual bool mb_getCache(ABL_CacheManager* p_ABL_CacheManagerPtr); 134 | 135 | virtual void mb_addCharge(BillJob * p_jobPtr,double p_accountCode,ABL_String ChargeName,ProcessedCharge* p_processedChargePtr); 136 | 137 | };//Dunning 138 | 139 | extern "C" {EXPORT Base_Registry* gb_getDunning();} 140 | 141 | #endif //DUNNING_H 142 | 143 | 144 | /********************************************************************* 145 | # 146 | # Copyright 2012 - 2013 147 | # Tecnotree Convergence Ltd. 148 | # 149 | *********************************************************************/ 150 | 151 | 152 | -------------------------------------------------------------------------------- /include/AccountTermination.h: -------------------------------------------------------------------------------- 1 | /** @file AccountTermination.h 2 | * @brief AccountTermination Component 3 | */ 4 | 5 | ////////////////////////////////////////////////////////////////////// 6 | // AccountTermination.h: Interface for doing AccountTermination 7 | // 8 | ////////////////////////////////////////////////////////////////////// 9 | 10 | 11 | #ifndef ACCOUNT_TERMINATION_H 12 | #define ACCOUNT_TERMINATION_H 13 | 14 | #include "Base_Registry.h" 15 | #include "ABL_String.h" 16 | #include "ABL_Job.h" 17 | #include "ABL_Service.h" 18 | #include "ABL_CacheManager.h" 19 | #include "CBaseComponent.h" 20 | #include "ErrorDetails.h" 21 | #include "ErrorCodes.h" 22 | #include "BillJob.h" 23 | #include "ConfigParams.h" 24 | #include "ObjectManager.h" 25 | #include "Utils.h" 26 | #include 27 | 28 | /********************************************************************* 29 | # File : AccountTermination.h 30 | # Abstract : This component is used for doing AccountTermination 31 | # Date : 18th Sep 2013 32 | # Author(s) : Ralph 33 | # Code Size : 34 | # Design : 35 | # References 36 | # Module : Component 37 | ====================================================================== 38 | # Revision History 39 | ====================================================================== 40 | # SI Edited by Date Area Edited 41 | ====================================================================== 42 | # 1 Ralph 25-10-2013 Added Setter for Object Manager 43 | and modified error logging 44 | ====================================================================== 45 | # Base Class : CBase 46 | ====================================================================== 47 | # member 48 | # Variables : 49 | ====================================================================== 50 | # member 51 | # Functions : 52 | # 53 | ====================================================================== 54 | Libraries: framework,components 55 | **********************************************************************/ 56 | 57 | /** @class AccountTermination 58 | * @ingroup Components 59 | * @brief Terminate Accounts 60 | * @details 61 | */ 62 | 63 | class EXPORT AccountTermination : public CBaseComponent 64 | { 65 | 66 | protected: 67 | 68 | /** ABL_Service pointer 69 | */ 70 | ABL_Service *m_ABL_ServicePtr; 71 | 72 | ConfigParams *m_configParams; 73 | 74 | ObjectManager *m_objectManager; 75 | 76 | //Parameters from the Queue 77 | _int64 m_billCycleFullCode; 78 | ABL_Date m_cycleEndDate; 79 | 80 | //Config params 81 | ABL_String m_eraseStatusCode; 82 | ABL_String m_preErasureStatus; 83 | ABL_String m_activeStatusCode; //TT-PP-13796 84 | 85 | public: 86 | /** Default AccountTermination default constructor 87 | */ 88 | AccountTermination(); 89 | 90 | /** Default AccountTermination default destructor 91 | */ 92 | virtual ~AccountTermination(); 93 | 94 | /** Default AccountTermination copy constructor 95 | */ 96 | AccountTermination(const AccountTermination &p_AccountTermination); 97 | 98 | /** Interface to clone the AccountTermination object. 99 | */ 100 | virtual Base_Registry* mb_clone(){return (Base_Registry*) new AccountTermination(*this);} 101 | 102 | /** Interface for getting thread specific Object manager 103 | */ 104 | virtual void mb_setObjectManager(ObjectManager *p_objectManager) 105 | { 106 | m_objectManager = p_objectManager; 107 | } 108 | 109 | /** This function is invoked by the framework. 110 | * @param p_servicePtr -> ABL_Service pointer provided by Framework 111 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 112 | */ 113 | virtual bool mb_initComponent(ABL_Service *p_servicePtr = NULL); 114 | 115 | 116 | /** This function is invoked by the framework 117 | * @param p_ABL_JobPtr -> ABL_Job 118 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 119 | */ 120 | 121 | virtual bool mb_process(ABL_Job* &p_ABL_JobPtr); 122 | 123 | virtual bool mb_refreshComponent(MessageRepository *p_messageRepository,LocalCacheManager *p_localCacheManagerPtr); 124 | 125 | /** This function is invoked by the framework 126 | * @param p_ABL_CacheManagerPtr -> ABL_CacheManager. 127 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 128 | */ 129 | virtual bool mb_getCache(ABL_CacheManager* p_ABL_CacheManagerPtr); 130 | 131 | virtual void mb_addCharge(BillJob * p_jobPtr,double p_accountCode,ABL_String ChargeName,ProcessedCharge* p_processedChargePtr); 132 | 133 | };//AccountTermination 134 | 135 | extern "C" {EXPORT Base_Registry* gb_getAccountTermination();} 136 | 137 | #endif //ACCOUNT_TERMINATION_H 138 | 139 | 140 | /********************************************************************* 141 | # 142 | # Copyright 2012 - 2013 143 | # Tecnotree Convergence Ltd. 144 | # 145 | *********************************************************************/ 146 | 147 | 148 | -------------------------------------------------------------------------------- /include/CreditNote.h: -------------------------------------------------------------------------------- 1 | /** @file CreditNote.h 2 | * @brief Credit Note Component 3 | */ 4 | 5 | ////////////////////////////////////////////////////////////////////// 6 | // CreditNote.h: Interface for passing credit note 7 | // 8 | ////////////////////////////////////////////////////////////////////// 9 | 10 | 11 | #ifndef CREDIT_NOTE_H 12 | #define CREDIT_NOTE_H 13 | 14 | #include "Base_Registry.h" 15 | #include "ABL_String.h" 16 | #include "ABL_Job.h" 17 | #include "ABL_Service.h" 18 | #include "ABL_CacheManager.h" 19 | #include "CBaseComponent.h" 20 | #include "ErrorDetails.h" 21 | #include "ErrorCodes.h" 22 | #include "BillJob.h" 23 | #include "ConfigParams.h" 24 | #include "ObjectManager.h" 25 | #include "Utils.h" 26 | #include "TransactionNumbers.h" 27 | #include "SubsRefundCharge.h" 28 | #include 29 | 30 | /********************************************************************* 31 | # File : CreditNote.h 32 | # Abstract : This component is used for passing credit note 33 | # Date : 20th Aug 2013 34 | # Author(s) : Ralph 35 | # Code Size : 36 | # Design : 37 | # References 38 | # Module : Component 39 | ====================================================================== 40 | # Revision History 41 | ====================================================================== 42 | # SI Edited by Date Area Edited 43 | ====================================================================== 44 | # 1 Ralph 25-10-2013 Added Setter for Object Manager 45 | and modified error logging 46 | ====================================================================== 47 | # Base Class : CBase 48 | ====================================================================== 49 | # member 50 | # Variables : 51 | ====================================================================== 52 | # member 53 | # Functions : 54 | # 55 | ====================================================================== 56 | Libraries: framework,components 57 | **********************************************************************/ 58 | 59 | /** @class CreditNote 60 | * @ingroup Components 61 | * @brief Pass credit note 62 | * @details 63 | */ 64 | 65 | class EXPORT CreditNote : public CBaseComponent 66 | { 67 | 68 | protected: 69 | 70 | /** ABL_Service pointer 71 | */ 72 | ABL_Service *m_ABL_ServicePtr; 73 | 74 | ConfigParams *m_configParams; 75 | 76 | ObjectManager *m_objectManager; 77 | 78 | TransactionNumbers *m_transNumbers; 79 | 80 | //Parameters from the Queue 81 | _int64 m_billCycleFullCode; 82 | ABL_Date m_cycleEndDate; 83 | ABL_String m_additionalAction; 84 | 85 | //Insufficient transaction numbers flag 86 | bool m_insufficientTransNosFlag; 87 | ABL_String m_errorMsg; 88 | long m_errorCode; 89 | 90 | public: 91 | /** Default CreditNote default constructor 92 | */ 93 | CreditNote(); 94 | 95 | /** Default CreditNote default destructor 96 | */ 97 | virtual ~CreditNote(); 98 | 99 | /** Default CreditNote copy constructor 100 | */ 101 | CreditNote(const CreditNote &p_CreditNote); 102 | 103 | /** Interface to clone the CreditNote object. 104 | */ 105 | virtual Base_Registry* mb_clone(){return (Base_Registry*) new CreditNote(*this);} 106 | 107 | /** Interface for getting thread specific Object manager 108 | */ 109 | virtual void mb_setObjectManager(ObjectManager *p_objectManager) 110 | { 111 | m_objectManager = p_objectManager; 112 | } 113 | 114 | /** This function is invoked by the framework. 115 | * @param p_servicePtr -> ABL_Service pointer provided by Framework 116 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 117 | */ 118 | virtual bool mb_initComponent(ABL_Service *p_servicePtr = NULL); 119 | 120 | 121 | /** This function is invoked by the framework 122 | * @param p_ABL_JobPtr -> ABL_Job 123 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 124 | */ 125 | 126 | virtual bool mb_process(ABL_Job* &p_ABL_JobPtr); 127 | 128 | /** This function is for implementing the stop logic...Called when framework receives stop signal 129 | * @param 130 | * @return -> boolean -> True on successfully stopping the component 131 | */ 132 | virtual bool mb_stop(); 133 | 134 | virtual bool mb_refreshComponent(MessageRepository *p_messageRepository,LocalCacheManager *p_localCacheManagerPtr); 135 | 136 | /** This function is invoked by the framework 137 | * @param p_ABL_CacheManagerPtr -> ABL_CacheManager. 138 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 139 | */ 140 | virtual bool mb_getCache(ABL_CacheManager* p_ABL_CacheManagerPtr); 141 | 142 | virtual void mb_addCharge(BillJob * p_jobPtr,double p_accountCode,ABL_String ChargeName,ProcessedCharge* p_processedChargePtr); 143 | 144 | };//CreditNote 145 | 146 | extern "C" {EXPORT Base_Registry* gb_getCreditNote();} 147 | 148 | #endif //CREDIT_NOTE_H 149 | 150 | 151 | /********************************************************************* 152 | # 153 | # Copyright 2012 - 2013 154 | # Tecnotree Convergence Ltd. 155 | # 156 | *********************************************************************/ 157 | 158 | 159 | -------------------------------------------------------------------------------- /include/CreditControlComponent.h: -------------------------------------------------------------------------------- 1 | /** @file CreditControlComponent.h 2 | * @brief CreditControlComponent Component 3 | */ 4 | 5 | ////////////////////////////////////////////////////////////////////// 6 | // CreditControlComponent.h: Interface for making CreditControl entry for the service 7 | // 8 | ////////////////////////////////////////////////////////////////////// 9 | 10 | 11 | #ifndef CREDIT_CONTROL_COMPONENT_H 12 | #define CREDIT_CONTROL_COMPONENT_H 13 | 14 | #include "Base_Registry.h" 15 | #include "ABL_String.h" 16 | #include "ABL_Job.h" 17 | #include "ABL_Service.h" 18 | #include "ABL_CacheManager.h" 19 | #include "CBaseComponent.h" 20 | #include "ErrorDetails.h" 21 | #include "ErrorCodes.h" 22 | #include "BillJob.h" 23 | #include "ConfigParams.h" 24 | #include "ObjectManager.h" 25 | #include "Utils.h" 26 | 27 | #include "SubServiceParamsCache.h" 28 | 29 | #include 30 | 31 | /********************************************************************* 32 | # File : CreditControlComponent.h 33 | # Abstract : This component is used for making credit control entry for the service code 34 | # Date : 23rd Mar, 2015 35 | # Author(s) : Ralph 36 | # Code Size : 37 | # Design : 38 | # References 39 | # Module : Component 40 | ====================================================================== 41 | # Revision History 42 | ====================================================================== 43 | # SI Edited by Date Area Edited 44 | ====================================================================== 45 | # 46 | ====================================================================== 47 | # Base Class : CBase 48 | ====================================================================== 49 | # member 50 | # Variables : 51 | ====================================================================== 52 | # member 53 | # Functions : 54 | # 55 | ====================================================================== 56 | Libraries: framework,components 57 | **********************************************************************/ 58 | 59 | /** @class CreditControlComponent 60 | * @ingroup Components 61 | * @brief Makes an entry for crdit control schedule to be triggered for the account 62 | * @details 63 | */ 64 | 65 | class EXPORT CreditControlComponent : public CBaseComponent 66 | { 67 | 68 | protected: 69 | 70 | /** ABL_Service pointer 71 | */ 72 | ABL_Service *m_ABL_ServicePtr; 73 | 74 | ConfigParams *m_configParams; 75 | 76 | ObjectManager *m_objectManager; 77 | 78 | /*Define a data_container for SubServiceParamsCache*/ 79 | data_container *m_SubServiceParamsCacheContainer; 80 | 81 | /* Define a Search Object for SubServiceParamsCache*/ 82 | SubServiceParamsCache *m_SubServiceParamsSearchObj; 83 | 84 | //Configuration params 85 | ABL_String m_accountLevelCreditControlFlag; 86 | 87 | public: 88 | /** Default CreditControlComponent default constructor 89 | */ 90 | CreditControlComponent(); 91 | 92 | /** Default CreditControlComponent default destructor 93 | */ 94 | virtual ~CreditControlComponent(); 95 | 96 | /** Default CreditControlComponent copy constructor 97 | */ 98 | CreditControlComponent(const CreditControlComponent &p_CreditControlComponent); 99 | 100 | /** Interface to clone the CreditControlComponent object. 101 | */ 102 | virtual Base_Registry* mb_clone(){return (Base_Registry*) new CreditControlComponent(*this);} 103 | 104 | /** Interface for getting thread specific Object manager 105 | */ 106 | virtual void mb_setObjectManager(ObjectManager *p_objectManager) 107 | { 108 | m_objectManager = p_objectManager; 109 | } 110 | 111 | /** This function is invoked by the framework. 112 | * @param p_servicePtr -> ABL_Service pointer provided by Framework 113 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 114 | */ 115 | virtual bool mb_initComponent(ABL_Service *p_servicePtr = NULL); 116 | 117 | 118 | /** This function is invoked by the framework 119 | * @param p_ABL_JobPtr -> ABL_Job 120 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 121 | */ 122 | 123 | virtual bool mb_process(ABL_Job* &p_ABL_JobPtr); 124 | 125 | virtual bool mb_refreshComponent(MessageRepository *p_messageRepository,LocalCacheManager *p_localCacheManagerPtr); 126 | 127 | /** This function is invoked by the framework 128 | * @param p_ABL_CacheManagerPtr -> ABL_CacheManager. 129 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 130 | */ 131 | virtual bool mb_getCache(ABL_CacheManager* p_ABL_CacheManagerPtr); 132 | 133 | virtual void mb_addCharge(BillJob * p_jobPtr,double p_accountCode,ABL_String ChargeName,ProcessedCharge* p_processedChargePtr); 134 | 135 | };//CreditControlComponent 136 | 137 | extern "C" {EXPORT Base_Registry* gb_getCreditControlComponent();} 138 | 139 | #endif //CREDIT_CONTROL_COMPONENT_H 140 | 141 | 142 | /********************************************************************* 143 | # 144 | # Copyright 2014 - 2015 145 | # Tecnotree Convergence Ltd. 146 | # 147 | *********************************************************************/ 148 | 149 | 150 | -------------------------------------------------------------------------------- /include/AdvancePayCreditNote.h: -------------------------------------------------------------------------------- 1 | /** @file AdvancePayCreditNote.h 2 | * @brief Credit Note from the paid advance amount 3 | */ 4 | 5 | ////////////////////////////////////////////////////////////////////// 6 | // AdvancePayCreditNote.h: Interface for passing credit note from paid advance 7 | // 8 | ////////////////////////////////////////////////////////////////////// 9 | 10 | 11 | #ifndef ADV_PAY_CREDIT_NOTE_H 12 | #define ADV_PAY_CREDIT_NOTE_H 13 | 14 | #include "Base_Registry.h" 15 | #include "ABL_String.h" 16 | #include "ABL_Job.h" 17 | #include "ABL_Service.h" 18 | #include "ABL_CacheManager.h" 19 | #include "CBaseComponent.h" 20 | #include "ErrorDetails.h" 21 | #include "ErrorCodes.h" 22 | #include "BillJob.h" 23 | #include "ConfigParams.h" 24 | #include "ObjectManager.h" 25 | #include "Utils.h" 26 | #include "TransactionNumbers.h" 27 | #include "SubsRefundCharge.h" 28 | #include 29 | 30 | /********************************************************************* 31 | # File : AdvancePayCreditNote.h 32 | # Abstract : This component is used for passing credit note from paid advance 33 | # Date : 7th May 2013 34 | # Author(s) : Ralph 35 | # Code Size : 36 | # Design : 37 | # References 38 | # Module : Component 39 | ====================================================================== 40 | # Revision History 41 | ====================================================================== 42 | # SI Edited by Date Area Edited 43 | ====================================================================== 44 | # 45 | ====================================================================== 46 | # Base Class : CBase 47 | ====================================================================== 48 | # member 49 | # Variables : 50 | ====================================================================== 51 | # member 52 | # Functions : 53 | # 54 | ====================================================================== 55 | Libraries: framework,components 56 | **********************************************************************/ 57 | 58 | /** @class AdvancePayCreditNote 59 | * @ingroup Components 60 | * @brief Pass credit note from paid advance 61 | * @details 62 | */ 63 | 64 | class EXPORT AdvancePayCreditNote : public CBaseComponent 65 | { 66 | 67 | protected: 68 | 69 | /** ABL_Service pointer 70 | */ 71 | ABL_Service *m_ABL_ServicePtr; 72 | 73 | ConfigParams *m_configParams; 74 | 75 | ObjectManager *m_objectManager; 76 | 77 | TransactionNumbers *m_transNumbers; 78 | 79 | //Parameters from the Queue 80 | _int64 m_billCycleFullCode; 81 | ABL_Date m_cycleEndDate; 82 | 83 | //Insufficient transaction numbers flag 84 | bool m_insufficientTransNosFlag; 85 | ABL_String m_errorMsg; 86 | long m_errorCode; 87 | 88 | public: 89 | /** Default AdvancePayCreditNote default constructor 90 | */ 91 | AdvancePayCreditNote(); 92 | 93 | /** Default AdvancePayCreditNote default destructor 94 | */ 95 | virtual ~AdvancePayCreditNote(); 96 | 97 | /** Default AdvancePayCreditNote copy constructor 98 | */ 99 | AdvancePayCreditNote(const AdvancePayCreditNote &p_AdvancePayCreditNote); 100 | 101 | /** Interface to clone the AdvancePayCreditNote object. 102 | */ 103 | virtual Base_Registry* mb_clone(){return (Base_Registry*) new AdvancePayCreditNote(*this);} 104 | 105 | /** Interface for getting thread specific Object manager 106 | */ 107 | virtual void mb_setObjectManager(ObjectManager *p_objectManager) 108 | { 109 | m_objectManager = p_objectManager; 110 | } 111 | 112 | /** This function is invoked by the framework. 113 | * @param p_servicePtr -> ABL_Service pointer provided by Framework 114 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 115 | */ 116 | virtual bool mb_initComponent(ABL_Service *p_servicePtr = NULL); 117 | 118 | 119 | /** This function is invoked by the framework 120 | * @param p_ABL_JobPtr -> ABL_Job 121 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 122 | */ 123 | 124 | virtual bool mb_process(ABL_Job* &p_ABL_JobPtr); 125 | 126 | /** This function is for implementing the stop logic...Called when framework receives stop signal 127 | * @param 128 | * @return -> boolean -> True on successfully stopping the component 129 | */ 130 | virtual bool mb_stop(); 131 | 132 | virtual bool mb_refreshComponent(MessageRepository *p_messageRepository,LocalCacheManager *p_localCacheManagerPtr); 133 | 134 | /** This function is invoked by the framework 135 | * @param p_ABL_CacheManagerPtr -> ABL_CacheManager. 136 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 137 | */ 138 | virtual bool mb_getCache(ABL_CacheManager* p_ABL_CacheManagerPtr); 139 | 140 | virtual void mb_addCharge(BillJob * p_jobPtr,double p_accountCode,ABL_String ChargeName,ProcessedCharge* p_processedChargePtr); 141 | 142 | };//AdvancePayCreditNote 143 | 144 | extern "C" {EXPORT Base_Registry* gb_getAdvancePayCreditNote();} 145 | 146 | #endif //ADV_PAY_CREDIT_NOTE_H 147 | 148 | 149 | /********************************************************************* 150 | # 151 | # Copyright 2013 - 2014 152 | # Tecnotree Convergence Ltd. 153 | # 154 | *********************************************************************/ 155 | 156 | 157 | -------------------------------------------------------------------------------- /include/ConfirmStatusMarker.h: -------------------------------------------------------------------------------- 1 | /** @file ConfirmStatusMarker.h 2 | * @brief ConfirmStatusMarker for Confirmation 3 | */ 4 | 5 | ////////////////////////////////////////////////////////////////////// 6 | // ConfirmStatusMarker.h: Interface for Confirm Status Marker 7 | // 8 | ////////////////////////////////////////////////////////////////////// 9 | 10 | 11 | #ifndef CONF_STATUS_MARKER_H 12 | #define CONF_STATUS_MARKER_H 13 | 14 | #include "Base_Registry.h" 15 | #include "ABL_String.h" 16 | #include "ABL_Job.h" 17 | #include "ABL_Service.h" 18 | #include "ABL_CacheManager.h" 19 | #include "CBaseComponent.h" 20 | #include "Utils.h" 21 | 22 | #include "ErrorDetails.h" 23 | #include "ErrorCodes.h" 24 | #include "BillJob.h" 25 | 26 | #include "ConfigParams.h" 27 | #include "ObjectManager.h" 28 | #include "TransactionNumbers.h" 29 | 30 | 31 | const ABL_String m_invoiceStatusUpdate = "InvoiceAccountStatusMarker"; 32 | const ABL_String m_serviceStatusUpdate = "ServiceAccountStatusMarker"; 33 | 34 | /********************************************************************* 35 | # File : ConfirmStatusMarker.h 36 | # Abstract : This component is used for Marking the status of the 37 | # Invoice and service accounts 38 | # Date : 29th Aug 2013 39 | # Author(s) : Ralph 40 | # Code Size : 41 | # Design : 42 | # References 43 | # Module : 44 | ====================================================================== 45 | # Revision History 46 | ====================================================================== 47 | # SI Edited by Date Area Edited 48 | ====================================================================== 49 | # 1 Ralph 25-10-2013 Added Setter for Object Manager 50 | and modified error logging 51 | ====================================================================== 52 | # Base Class : CBase 53 | ====================================================================== 54 | # member 55 | # Variables : 56 | ====================================================================== 57 | # member 58 | # Functions : 59 | # 60 | ====================================================================== 61 | Libraries: framework,components 62 | **********************************************************************/ 63 | 64 | /** @class ConfirmStatusMarker 65 | * @ingroup Components 66 | * @brief Marks the accounts for error or success status 67 | * @details 68 | */ 69 | 70 | class EXPORT ConfirmStatusMarker : public CBaseComponent 71 | { 72 | 73 | protected: 74 | 75 | /** ABL_Service pointer 76 | */ 77 | ABL_Service *m_ABL_ServicePtr; 78 | 79 | /** MessageRepository Pointer 80 | */ 81 | MessageRepository *m_messageRepository; 82 | 83 | /* Transaction number pointer*/ 84 | TransactionNumbers *m_transactionNumbersPtr; 85 | 86 | int m_iprocessId; 87 | 88 | ObjectManager *m_objectManager; 89 | 90 | InvoiceAccountDetails::Iterator m_invIterator; 91 | InvoiceAccountDetails::Iterator m_invIteratorEnd; 92 | 93 | BillJob::Iterator m_billJobIterator; 94 | BillJob::Iterator m_billJobIteratorEnd; 95 | 96 | int m_iserviceAccCount; 97 | 98 | _int64 m_billCycleFullCode; // BillCycleFull Code 99 | ABL_String m_additionalAction; // Additional action 100 | 101 | 102 | public: 103 | /** Default ConfirmStatusMarker default constructor 104 | */ 105 | ConfirmStatusMarker(); 106 | 107 | /** Default ConfirmStatusMarker default destructor 108 | */ 109 | virtual ~ConfirmStatusMarker(); 110 | 111 | /** Default ConfirmStatusMarker copy constructor 112 | */ 113 | ConfirmStatusMarker(const ConfirmStatusMarker &p_ConfirmStatusMarker); 114 | 115 | virtual void mb_reset(); 116 | 117 | /** Interface to clone the ConfirmStatusMarker object. 118 | */ 119 | virtual Base_Registry* mb_clone(){return (Base_Registry*) new ConfirmStatusMarker(*this);} 120 | 121 | /** Interface for getting thread specific Object manager 122 | */ 123 | virtual void mb_setObjectManager(ObjectManager *p_objectManager) 124 | { 125 | m_objectManager = p_objectManager; 126 | } 127 | 128 | /** This function is invoked by the framework. 129 | * @param p_servicePtr -> ABL_Service pointer provided by Framework 130 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 131 | */ 132 | virtual bool mb_initComponent(ABL_Service *p_servicePtr); 133 | 134 | 135 | /** This function is invoked by the framework 136 | * @param p_ABL_JobPtr -> ABL_Job.Having the Processing Date. 137 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 138 | */ 139 | 140 | virtual bool mb_process(ABL_Job* &p_ABL_JobPtr); 141 | 142 | virtual bool mb_refreshComponent(MessageRepository *p_messageRepository,LocalCacheManager *p_localCacheManagerPtr); 143 | 144 | /** This function is invoked by the framework 145 | * @param p_ABL_CacheManagerPtr -> ABL_CacheManager. 146 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 147 | */ 148 | virtual bool mb_getCache(ABL_CacheManager* p_ABL_CacheManagerPtr); 149 | 150 | /** Function to add processed charges to the Job.Should be implemented by General and Mock Components 151 | */ 152 | virtual void mb_addCharge(BillJob *p_jobPtr,double p_accountCode,ABL_String p_chargeName,ProcessedCharge* p_processedChargePtr); 153 | 154 | };//ConfirmStatusMarker 155 | 156 | extern "C" {EXPORT Base_Registry* gb_getConfirmStatusMarker();} 157 | 158 | #endif //CONF_STATUS_MARKER_H 159 | /********************************************************************* 160 | # 161 | # Copyright 2012 - 2013 162 | # Tecnotree Convergence Ltd. 163 | # 164 | *********************************************************************/ 165 | 166 | 167 | -------------------------------------------------------------------------------- /include/TaxCalculation.h: -------------------------------------------------------------------------------- 1 | /** @file TaxCalculation.h 2 | * @brief Tax Calculation Component 3 | */ 4 | 5 | ////////////////////////////////////////////////////////////////////// 6 | // TaxCalculation.h: Interface for the Calculating the Tax. 7 | // 8 | ////////////////////////////////////////////////////////////////////// 9 | 10 | 11 | #ifndef TAX_CALC_H 12 | #define TAX_CALC_H 13 | 14 | #include "Base_Registry.h" 15 | #include "ABL_String.h" 16 | #include "ABL_Job.h" 17 | #include "ABL_Service.h" 18 | #include "ABL_CacheManager.h" 19 | #include "CBaseComponent.h" 20 | #include "TaxCharge.h" 21 | #include "CalculatedCharge.h" 22 | 23 | #include "ErrorDetails.h" 24 | #include "ErrorCodes.h" 25 | #include "BillJob.h" 26 | #include "InvoiceAccDetails.h" 27 | #include "ServiceAccountDetails.h" 28 | 29 | #include "ProfitCenterCodeAndGLSelector.h" 30 | #include "PackageCache.h" 31 | #include "ArticleCache.h" 32 | #include "ProfitCostCenterCache.h" 33 | #include "ArticleGLCodesCache.h" 34 | #include "ControlArticlesCache.h" 35 | 36 | #include "TaxCache.h" 37 | #include "CurrencyCache.h" 38 | #include "ConfigParams.h" 39 | #include "ObjectManager.h" 40 | #include "Utils.h" 41 | 42 | #include 43 | #include 44 | 45 | 46 | /********************************************************************* 47 | # File : TaxCalculation.h 48 | # Abstract : This component is used for Calculating the Tax while posting credit notes 49 | # Date : 23rd Aug 2013 50 | # Author(s) : Ralph 51 | # Code Size : 52 | # Design : 53 | # References 54 | # Module : Components 55 | ====================================================================== 56 | # Revision History 57 | ====================================================================== 58 | # SI Edited by Date Area Edited 59 | ====================================================================== 60 | # 1 Ralph 25-10-2013 Added Setter for Object Manager 61 | and modified error logging 62 | ====================================================================== 63 | # Base Class : CBase 64 | ====================================================================== 65 | # member 66 | # Variables : 67 | ====================================================================== 68 | # member 69 | # Functions : 70 | # 71 | ====================================================================== 72 | Libraries: framework,components 73 | **********************************************************************/ 74 | 75 | /** @class TaxCalculation 76 | * @ingroup Components 77 | * @brief Calculates the Tax for all the amounts under an invoice 78 | * @details Apart from OverallTax, this component calculates liable tax part 79 | */ 80 | 81 | class EXPORT TaxCalculation : public CBaseComponent 82 | { 83 | 84 | protected: 85 | 86 | /** ABL_Service pointer 87 | */ 88 | ABL_Service *m_ABL_ServicePtr; 89 | 90 | /*Define a data_container for Package*/ 91 | data_container *m_packageContainer; 92 | 93 | /*Define a data_container for Articles*/ 94 | data_container *m_articleContainer; 95 | 96 | /*Define a data_container for ProfitCostCenterCache*/ 97 | data_container *m_profitCenterContainer; 98 | 99 | /*Define a data_container for TaxPlanDetails*/ 100 | data_container *m_taxContainer; 101 | 102 | /*Define a data_container for CurrencyCache*/ 103 | data_container *m_currencyContainer; 104 | 105 | /*Define a data_container for ArticleGLCodesCache*/ 106 | data_container *m_articlesGlCodesContainer; 107 | 108 | /*Define a data_container for Control articles*/ 109 | data_container *m_controlArticlesContainer; 110 | 111 | /* Define a Search Object for Services*/ 112 | PackageCache *m_packageSearchObj; 113 | 114 | /* Define a Search Object for Articles*/ 115 | ArticleCache *m_articleCacheSearchObj; 116 | 117 | /* Define a Search Object for ProfitCostCenterCache*/ 118 | ProfitCostCenterCache *m_profitCenterSearchObj; 119 | 120 | /* Define a Search Object for ArticleGLCodesCache*/ 121 | ArticleGLCodesCache *m_articlesGlCodesSearchObj; 122 | 123 | /* Define a Search Object for TaxCache*/ 124 | TaxCache *m_taxSearchObj; 125 | 126 | /* Define a Search Object for CurrencyCache*/ 127 | CurrencyCache *m_currencyCacheSearchObj; 128 | 129 | /* Define a Search Object for Control articles*/ 130 | ControlArticlesCache *m_controlArticlesSearchObj; 131 | 132 | ConfigParams *m_configParams; 133 | 134 | ObjectManager *m_objectManager; 135 | 136 | ProfitCenterCodeAndGLSelector* m_profitCentreGlSelectorPtr; 137 | 138 | //Configuration Param values 139 | ABL_String m_nilTaxPlanCode; 140 | 141 | //Flag to indicate if the currency conversion is needed for the charge 142 | ABL_String m_currencyConversionFlag; 143 | 144 | //Parameters from the Queue 145 | _int64 m_billCycleFullCode; 146 | 147 | //Liable tax parameters 148 | 149 | /* Liable tax article code */ 150 | ABL_String m_liableTaxArticleCode; 151 | 152 | /* Liable tax article availability flag*/ 153 | bool m_liableTaxArticleAvailableFlg; 154 | 155 | /*Liable Tax Article details*/ 156 | ArticleCache* m_liableTaxArticleDetails; 157 | 158 | 159 | //Exchange rate 160 | double m_dexchangeRate; 161 | 162 | //Exchange multiplication factor 163 | double m_dexchangeMultplicationFactor; 164 | 165 | void mb_updateCalculatedChargeCurrencyFields(CalculatedCharge* p_calculatedCharge); 166 | 167 | double mb_calculateTaxAmt(double p_artAmt, ABL_String p_taxCode , ABL_String &p_taxCalculationStore); 168 | 169 | void mb_getLiableTaxArticleDetails(); 170 | 171 | public: 172 | /** Default TaxCalculation default constructor 173 | */ 174 | TaxCalculation(); 175 | 176 | /** Default TaxCalculation default destructor 177 | */ 178 | virtual ~TaxCalculation(); 179 | 180 | /** Default TaxCalculation copy constructor 181 | */ 182 | TaxCalculation(const TaxCalculation &p_TaxCalculation); 183 | 184 | /** Interface to clone the TaxCalculation object. 185 | */ 186 | virtual Base_Registry* mb_clone(){return (Base_Registry*) new TaxCalculation(*this);} 187 | 188 | /** Interface for getting thread specific Object manager 189 | */ 190 | virtual void mb_setObjectManager(ObjectManager *p_objectManager) 191 | { 192 | m_objectManager = p_objectManager; 193 | } 194 | 195 | /** This function is invoked by the framework. 196 | * @param p_servicePtr -> ABL_Service pointer provided by Framework 197 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 198 | */ 199 | virtual bool mb_initComponent(ABL_Service *p_servicePtr = NULL); 200 | 201 | 202 | /** This function is invoked by the framework 203 | * @param p_ABL_JobPtr -> ABL_Job.Having the Processing Date. 204 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 205 | */ 206 | 207 | virtual bool mb_process(ABL_Job* &p_ABL_JobPtr); 208 | 209 | virtual bool mb_refreshComponent(MessageRepository *p_messageRepository,LocalCacheManager *p_localCacheManagerPtr); 210 | 211 | /** This function is invoked by the framework 212 | * @param p_ABL_CacheManagerPtr -> ABL_CacheManager. 213 | * @return boolean -> True on successfully loading the data.Exceptions for any unexpected errors. 214 | */ 215 | virtual bool mb_getCache(ABL_CacheManager* p_ABL_CacheManagerPtr); 216 | 217 | virtual void mb_addCharge(BillJob * p_jobPtr,double p_accountCode,ABL_String ChargeName,ProcessedCharge* p_processedChargePtr); 218 | 219 | };//TaxCalculation 220 | 221 | extern "C" {EXPORT Base_Registry* gb_getTaxCalculation();} 222 | 223 | #endif //TAX_CALC_H 224 | 225 | 226 | /********************************************************************* 227 | # 228 | # Copyright 2012 - 2013 229 | # Tecnotree Convergence Ltd. 230 | # 231 | *********************************************************************/ 232 | 233 | 234 | -------------------------------------------------------------------------------- /source/PreAndPostBillWrapper.cpp: -------------------------------------------------------------------------------- 1 | #include "PreAndPostBillWrapper.h" 2 | #include "ABL_Date.h" 3 | #include "ABL_DateTime.h" 4 | #include "Utils.h" 5 | #include 6 | 7 | /********************************************************************* 8 | # File : PreAndPostBillWrapper.cpp 9 | # Abstract : Implementation of pre and post bill Wrapper. 10 | # 11 | # Date : 31st May, 2013 12 | # Author(s) : Srinivasan V 13 | # Code Size : lines 14 | # Design : 15 | # References : 16 | # Module : 17 | ====================================================================== 18 | # Revision History 19 | ====================================================================== 20 | # SI Edited by Date Area Edited 21 | # 1 Srinivasan V 6/8/2013 Fixed the insertion error-175068 22 | # 2 Srinivasan V 9/26/2013 Fixed the intrim bill-182063 23 | # 3 Srinivasan V 11/14/2013 Fixed the pre bill check error-182063 24 | # 4 Srinivasan V 12/16/2013 Fixed the pre bill check error-191412 25 | # 5 Ralph 20/03/2014 Fixed the pre bill check error-207454 26 | ====================================================================== 27 | */ 28 | 29 | ////////////////////////////////////////////////////////////////////// 30 | // 31 | // Default Destructor 32 | // 33 | ////////////////////////////////////////////////////////////////////// 34 | PreAndPostBillWrapper::PreAndPostBillWrapper() 35 | { 36 | m_ABL_ServicePtr = NULL; 37 | m_billDbConnectionPtr = NULL; 38 | m_orchMessengerPtr = NULL; 39 | m_msgToOrchestrator = NULL; 40 | m_msgFromOrchestrator = NULL; 41 | 42 | m_receiveMessageFormat = "05"; //Receive the confirm or rollback request from task allocator at confirm Q 43 | m_batchCountMessageFormat = "08"; //Send the status of the batch to the status updater 44 | m_statsUpdatorMessageFormat = "03"; //Send the metrics of the batch to stats updator 45 | m_taskAlMessageFormat = "02"; //Send the Task al 46 | m_pauseActionMessageFormat = "11"; //Send the PAUSE ACK 47 | } 48 | ////////////////////////////////////////////////////////////////////// 49 | // 50 | // constructor 51 | // 52 | ////////////////////////////////////////////////////////////////////// 53 | // 54 | // Parameters : p_runMode -> Running mode. 55 | // : p_confFile -> Configuration file path 56 | // 57 | ////////////////////////////////////////////////////////////////////// 58 | PreAndPostBillWrapper::PreAndPostBillWrapper(ABL_String p_currentBillRunType,ABL_String p_currentBillRunMode, ABL_String p_confFile) 59 | { 60 | m_ABL_ServicePtr = NULL; 61 | m_billDbConnectionPtr = NULL; 62 | m_orchMessengerPtr = NULL; 63 | m_msgToOrchestrator = NULL; 64 | m_msgFromOrchestrator = NULL; 65 | 66 | m_currentBillRunType = p_currentBillRunType; 67 | m_currentBillRunMode = p_currentBillRunMode; 68 | m_confFile = p_confFile; 69 | 70 | m_receiveMessageFormat = "05"; //Receive the batch preparation request from task allocator at batch prep Q 71 | m_batchCountMessageFormat = "08"; //Send the status of the batch to dispatcher Q 72 | m_statsUpdatorMessageFormat = "03"; //Send the metrics of the batch to stats updator 73 | m_taskAlMessageFormat = "02"; //Send the Task al 74 | m_pauseActionMessageFormat = "11"; //Send the PAUSE ACK 75 | } 76 | ////////////////////////////////////////////////////////////////////// 77 | // 78 | // Copy constructor 79 | // 80 | ////////////////////////////////////////////////////////////////////// 81 | // 82 | // Parameters : p_confirmWrapper -> object to be copied from 83 | // 84 | ////////////////////////////////////////////////////////////////////// 85 | PreAndPostBillWrapper::PreAndPostBillWrapper(const PreAndPostBillWrapper& p_preAndPostBillWrapper) 86 | { 87 | m_confFile = p_preAndPostBillWrapper.m_confFile; 88 | m_ABL_ServicePtr = p_preAndPostBillWrapper.m_ABL_ServicePtr; 89 | m_currentBillRunType = p_preAndPostBillWrapper.m_currentBillRunType; 90 | m_currentBillRunMode = p_preAndPostBillWrapper.m_currentBillRunMode; 91 | 92 | m_billDbID = p_preAndPostBillWrapper.m_billDbID; 93 | m_billDbConnectionPtr = p_preAndPostBillWrapper.m_billDbConnectionPtr; 94 | m_msgToOrchestrator = p_preAndPostBillWrapper.m_msgToOrchestrator; 95 | m_msgFromOrchestrator = p_preAndPostBillWrapper.m_msgFromOrchestrator; 96 | m_orchMessengerPtr = p_preAndPostBillWrapper.m_orchMessengerPtr; 97 | m_execName = p_preAndPostBillWrapper.m_execName; 98 | 99 | m_receiveMessageFormat = "05"; //Receive the batch preparation request from task allocator at batch prep Q 100 | m_batchCountMessageFormat = "08"; //Send the status of the batch to dispatcher Q 101 | m_statsUpdatorMessageFormat = "03"; //Send the metrics of the batch to stats updator 102 | m_taskAlMessageFormat = "02"; //Send the Task al 103 | m_pauseActionMessageFormat = "11"; //Send the PAUSE ACK 104 | } 105 | 106 | ////////////////////////////////////////////////////////////////////// 107 | // 108 | // Default Destructor 109 | // 110 | ////////////////////////////////////////////////////////////////////// 111 | PreAndPostBillWrapper::~PreAndPostBillWrapper() 112 | { 113 | if (m_msgToOrchestrator != NULL) 114 | delete m_msgToOrchestrator; 115 | 116 | if (m_msgFromOrchestrator != NULL) 117 | delete m_msgFromOrchestrator; 118 | 119 | if (m_orchMessengerPtr != NULL) 120 | delete m_orchMessengerPtr; 121 | 122 | if (m_billDbConnectionPtr != NULL) 123 | delete m_billDbConnectionPtr; 124 | 125 | if (m_ABL_ServicePtr != NULL) 126 | delete m_ABL_ServicePtr; 127 | } 128 | ////////////////////////////////////////////////////////////////////// 129 | // 130 | // Initializing the confirm wrapper 131 | // 132 | ////////////////////////////////////////////////////////////////////// 133 | // 134 | // Parameters : p_confirmWrapper -> object to be copied from 135 | // 136 | ////////////////////////////////////////////////////////////////////// 137 | bool PreAndPostBillWrapper::mb_init() 138 | { 139 | try 140 | { 141 | m_ABL_ServicePtr = new ABL_Service(); 142 | m_ABL_ServicePtr->mb_initServices(m_confFile); 143 | } 144 | catch(ABL_Exception &e) 145 | { 146 | std::cerr << "Error in Initializing the ABL_Service" << e.mb_getMessage().c_str()<mb_initMessenger(m_ABL_ServicePtr, PREBILL, READ_WRITE, m_currentBillRunType)) 158 | { 159 | *m_ABL_ServicePtr << CRITICAL << "Error in Initializing the OrchMessenger" << Endl; 160 | return false; 161 | } 162 | } 163 | else 164 | { 165 | m_execName = "POSTBILL"; 166 | if(!m_orchMessengerPtr->mb_initMessenger(m_ABL_ServicePtr, POSTBILL, READ_WRITE, m_currentBillRunType)) 167 | { 168 | *m_ABL_ServicePtr << CRITICAL << "Error in Initializing the OrchMessenger" << Endl; 169 | return false; 170 | } 171 | } 172 | 173 | } 174 | catch(ABL_Exception &e) 175 | { 176 | *m_ABL_ServicePtr << CRITICAL << "Exception in getting data from Orchestrator Tables:" << e.mb_getMessage() << Endl; 177 | return false; 178 | } 179 | 180 | //Create a connection 181 | m_billDbID = m_ABL_ServicePtr->mb_getParameterValue("BILL_DB_ID"); 182 | m_billDbConnectionPtr = new ABL_Connection(); 183 | m_billDbConnectionPtr->mb_createConnection(*m_ABL_ServicePtr, true, true, m_billDbID); 184 | 185 | //Utils initialize 186 | Utils::mb_initilize(m_billDbConnectionPtr); 187 | 188 | //Create Message repository to send msg 189 | m_msgToOrchestrator = new MessageRepository; 190 | 191 | //Create Message repository to read msg 192 | m_msgFromOrchestrator = new MessageRepository; 193 | 194 | return true; 195 | } 196 | 197 | ////////////////////////////////////////////////////////////////////// 198 | // 199 | // Process the confirm the requests. 200 | // 201 | ////////////////////////////////////////////////////////////////////// 202 | // 203 | // Parameters : p_confirmWrapper -> object to be copied from 204 | // 205 | ////////////////////////////////////////////////////////////////////// 206 | bool PreAndPostBillWrapper::mb_process() 207 | { 208 | int l_sleeptime; 209 | 210 | ABL_String l_stopSignal = ""; 211 | 212 | try 213 | { 214 | l_stopSignal = m_ABL_ServicePtr->mb_getParameterValue("PRE_POST_CHECK_STOP_SIGNAL"); 215 | } 216 | catch (ABL_Exception &e) 217 | { 218 | if(e.mb_getErrorCode() == SER_NODATA) 219 | { 220 | *m_ABL_ServicePtr << CRITICAL << "PRE_POST_CHECK_STOP_SIGNAL:Not found in the .conf"<mb_getInt("SLEEP_TIME"); 228 | } 229 | catch (ABL_Exception &e) 230 | { 231 | if(e.mb_getErrorCode() == SER_NODATA) 232 | { 233 | *m_ABL_ServicePtr << CRITICAL << "SLEEP_TIME:Not found in the .conf"<mb_createStatement(l_insertQuery); 241 | 242 | ABL_String l_selectQuery = "SELECT BATCH_ID_V,SUB_BATCH_ID_N,NO_OF_ACCOUNTS_PROCESSED_N,NO_OF_SUCCESS_ACCOUNTS_N,NO_OF_FAILED_ACCOUNTS_N,BILL_TYPE_V,STAGE_SEQ_N,"; 243 | l_selectQuery += " TO_CHAR(BILL_CYCLE_START_DATE_D,'YYYYMMDD'),TO_CHAR(BILL_CYCLE_END_DATE_D,'YYYYMMDD'),BILL_CYCLE_FULL_CODE_N, MK_REQ_NUM_N, ROWID FROM CB_PRE_POST_BILL_CHECK_REQUEST "; 244 | 245 | l_selectQuery += " WHERE REQUEST_STATUS_V = 'C' AND ACCOUNT_POSTED_V = 'N' AND TYPE_OF_CHECK_V = '"; 246 | l_selectQuery += m_currentBillRunMode; 247 | l_selectQuery += "' AND "; 248 | 249 | //Based on bill type pick up the requests 250 | if (m_currentBillRunType == "S") 251 | { 252 | l_selectQuery += " BILL_TYPE_V = 'S'"; 253 | } 254 | else 255 | l_selectQuery += " BILL_TYPE_V != 'S'"; 256 | 257 | l_selectQuery += " FOR UPDATE "; 258 | 259 | ABL_Statement l_selectStatement = m_billDbConnectionPtr->mb_createStatement(l_selectQuery); 260 | 261 | ABL_String l_updateQuery = "UPDATE CB_PRE_POST_BILL_CHECK_REQUEST SET ACCOUNT_POSTED_V = 'Y' "; 262 | //l_updateQuery += " WHERE BATCH_ID_V = :1 AND SUB_BATCH_ID_N = :2 AND TYPE_OF_CHECK_V = :3 "; 263 | l_updateQuery += " WHERE ROWID = :1 "; 264 | ABL_Statement l_updateStatement = m_billDbConnectionPtr->mb_createStatement(l_updateQuery); 265 | 266 | ABL_ResultSet l_resutSet; 267 | 268 | ABL_String l_batchId; 269 | ABL_String l_subBatchId; 270 | long l_noOfAccounts; 271 | long l_noOfSuccessAcc; 272 | long l_noOfFailedAcc; 273 | ABL_String l_billType; 274 | ABL_String l_startDate; 275 | ABL_String l_endDate; 276 | ABL_String l_seqNo; 277 | ABL_String l_billCycleCode; 278 | ABL_String l_mock_req_num; 279 | ABL_String l_rowId; 280 | 281 | while(true) 282 | { 283 | m_msgToOrchestrator->mb_reset(); 284 | m_msgFromOrchestrator->mb_reset(); 285 | try 286 | { 287 | //Check for existance of stop signal file 288 | if(!access(l_stopSignal.c_str(), F_OK)) 289 | { 290 | *m_ABL_ServicePtr << CRITICAL << "Found the stop signal. stoping the engine." << Endl; 291 | m_billDbConnectionPtr->mb_terminateStatement(l_insertStatement); 292 | m_billDbConnectionPtr->mb_terminateStatement(l_selectStatement); 293 | m_billDbConnectionPtr->mb_terminateStatement(l_updateStatement); 294 | 295 | return true; 296 | } 297 | //Read message from batch prep Q 298 | *m_ABL_ServicePtr << INFO << "Reading mesg from Q" << Endl; 299 | if( m_orchMessengerPtr->mb_readMessageFromQueue(false)) 300 | { 301 | *m_ABL_ServicePtr << INFO << "got the mesg from Q" << Endl; 302 | 303 | // std::cerr<<"Got the message"<mb_getMessageIntoRepositoryObject(m_msgFromOrchestrator); 306 | *m_ABL_ServicePtr << INFO << "Processing request Batch Id:" << m_msgFromOrchestrator->mb_getMainBatch().c_str() << " Bill Run type:" << m_msgFromOrchestrator->mb_getBillType().c_str() << Endl; 307 | 308 | //Validate if the msg is to be processed by this engine 309 | /**if(!mb_validRequest(m_currentBillRunType, m_msgFromOrchestrator->mb_getBillType())) 310 | { 311 | *m_ABL_ServicePtr << CRITICAL << "Configured Mode and Bill Mode received in msg not matching... discarding the msg" << Endl; 312 | continue; 313 | } 314 | */ 315 | *m_ABL_ServicePtr << INFO << "Validation success" << Endl; 316 | //Set the start time for batch preparation 317 | m_msgToOrchestrator->mb_setStartTime(); 318 | 319 | //Check for Pause signal 320 | if(m_orchMessengerPtr->mb_isBatchPaused()) 321 | { 322 | //std::cerr<<"Batch is paused"<mb_setBatchPauseState(true); 326 | m_msgToOrchestrator->mb_setMainBatch(m_msgFromOrchestrator->mb_getMainBatch()); 327 | m_msgToOrchestrator->mb_setFullBillCycleCode(m_msgFromOrchestrator->mb_getFullBillCycleCode()); 328 | m_msgToOrchestrator->mb_setSubBatch(m_msgFromOrchestrator->mb_getSubBatch()); 329 | m_msgToOrchestrator->mb_setBillType(m_msgFromOrchestrator->mb_getBillType()); 330 | m_msgToOrchestrator->mb_setRefNumber(m_msgFromOrchestrator->mb_getRefNumber()); 331 | m_msgToOrchestrator->mb_setCycleStartDate(m_msgFromOrchestrator->mb_getCycleStartDate()); 332 | m_msgToOrchestrator->mb_setCycleEndDate(m_msgFromOrchestrator->mb_getCycleEndDate()); 333 | m_msgToOrchestrator->mb_setEndTime(); 334 | m_msgToOrchestrator->mb_setPauseAction("ACK"); 335 | m_msgToOrchestrator->mb_setTimeStamp(); 336 | m_msgToOrchestrator->mb_setEndTime(); 337 | m_msgToOrchestrator->mb_setAdditonalActionString(m_msgFromOrchestrator->mb_getAdditonalActionString()); 338 | // Forming the SubBatchCount 339 | m_msgToOrchestrator->mb_setSubBatchCount(m_execName+ORCH_IMMEDIATE_PAUSE); 340 | m_msgToOrchestrator->mb_setBatchUpdateStatus(PRC_PENDING_STATE); 341 | 342 | *m_ABL_ServicePtr << CRITICAL << "Updating the batch status through procedure" << Endl; 343 | 344 | if(!m_orchMessengerPtr->mb_updateBatchStatus(m_msgToOrchestrator)) 345 | { 346 | *m_ABL_ServicePtr << CRITICAL << "Error in Updating the batch status to Pending:" << m_msgFromOrchestrator->mb_getMainBatch().c_str()<< ":"<mb_getSubBatch().c_str()<< Endl; 347 | //return false; 348 | continue; 349 | } 350 | 351 | m_msgToOrchestrator->mb_print(m_ABL_ServicePtr); 352 | *m_ABL_ServicePtr << INFO << "Sending message type 11 to orch for paused message" << Endl; 353 | 354 | //Sending the Pause ack to Orchestrator 355 | m_orchMessengerPtr->mb_writeMessage(m_pauseActionMessageFormat, m_msgToOrchestrator); 356 | 357 | //Sending batch count message for pause 358 | 359 | m_msgToOrchestrator->mb_reset(); 360 | m_msgToOrchestrator->mb_setStartTime(); 361 | 362 | m_msgToOrchestrator->mb_setMainBatch(m_msgFromOrchestrator->mb_getMainBatch()); 363 | m_msgToOrchestrator->mb_setFullBillCycleCode(m_msgFromOrchestrator->mb_getFullBillCycleCode()); 364 | m_msgToOrchestrator->mb_setSubBatch(m_msgFromOrchestrator->mb_getSubBatch()); 365 | m_msgToOrchestrator->mb_setBillType(m_msgFromOrchestrator->mb_getBillType()); 366 | m_msgToOrchestrator->mb_setRefNumber(m_msgFromOrchestrator->mb_getRefNumber()); 367 | m_msgToOrchestrator->mb_setCycleStartDate(m_msgFromOrchestrator->mb_getCycleStartDate()); 368 | m_msgToOrchestrator->mb_setCycleEndDate(m_msgFromOrchestrator->mb_getCycleEndDate()); 369 | m_msgToOrchestrator->mb_setSubBatchCount(m_execName+ORCH_IMMEDIATE_PAUSE); 370 | 371 | // Set the timestamp 372 | m_msgToOrchestrator->mb_setTimeStamp(); 373 | 374 | m_msgToOrchestrator->mb_print(m_ABL_ServicePtr); 375 | 376 | *m_ABL_ServicePtr << INFO << "Sending message to Status Updater for updating sub batch count due to pause batch"<< Endl; 377 | 378 | m_orchMessengerPtr->mb_writeMessage(m_batchCountMessageFormat, m_msgToOrchestrator); 379 | 380 | //Now continue to listen for new requests 381 | continue; 382 | } 383 | 384 | //Sending batch count message for pause 385 | m_msgToOrchestrator->mb_reset(); 386 | 387 | //Set the start time for batch preparation 388 | m_msgToOrchestrator->mb_setStartTime(); 389 | 390 | m_msgToOrchestrator->mb_setMainBatch(m_msgFromOrchestrator->mb_getMainBatch()); 391 | m_msgToOrchestrator->mb_setFullBillCycleCode(m_msgFromOrchestrator->mb_getFullBillCycleCode()); 392 | m_msgToOrchestrator->mb_setSubBatch(m_msgFromOrchestrator->mb_getSubBatch()); 393 | m_msgToOrchestrator->mb_setBillType(m_msgFromOrchestrator->mb_getBillType()); 394 | m_msgToOrchestrator->mb_setRefNumber(m_msgFromOrchestrator->mb_getRefNumber()); 395 | m_msgToOrchestrator->mb_setCycleStartDate(m_msgFromOrchestrator->mb_getCycleStartDate()); 396 | m_msgToOrchestrator->mb_setCycleEndDate(m_msgFromOrchestrator->mb_getCycleEndDate()); 397 | m_msgToOrchestrator->mb_setSequenceNumber(m_msgFromOrchestrator->mb_getSequenceNumber()); 398 | 399 | m_msgToOrchestrator->mb_setBatchPauseState(false); 400 | // Set the timestamp 401 | m_msgToOrchestrator->mb_setTimeStamp(); 402 | 403 | m_msgToOrchestrator->mb_setSubBatchCount(m_execName+ORCH_NO_PAUSE_IN_PROGRESS); 404 | 405 | // Update batch status to inprogress 406 | m_msgToOrchestrator->mb_setBatchUpdateStatus(PRC_IN_PROGRESS_STATE); 407 | 408 | //std::cerr<< "Updating the batch status through procedure" << std::endl; 409 | if(!m_orchMessengerPtr->mb_updateBatchStatus(m_msgToOrchestrator)) 410 | { 411 | *m_ABL_ServicePtr << CRITICAL << "Error in Updating the batch status to Pending:" << m_msgFromOrchestrator->mb_getMainBatch().c_str() << ":"<< m_msgFromOrchestrator->mb_getSubBatch().c_str() <mb_print(m_ABL_ServicePtr); 416 | 417 | *m_ABL_ServicePtr << INFO << "Sending message count to orch for processing"<< Endl; 418 | 419 | //Sending the message 420 | m_orchMessengerPtr->mb_writeMessage(m_batchCountMessageFormat, m_msgToOrchestrator); 421 | 422 | 423 | /* 424 | * inserting the request into table. 425 | */ 426 | 427 | //std::cerr<< "inserting the request into table." << std::endl; 428 | 429 | l_insertStatement.mb_setString(1,m_msgFromOrchestrator->mb_getMainBatch()); 430 | l_insertStatement.mb_setInt64(2,atol(m_msgFromOrchestrator->mb_getSubBatch().c_str())); 431 | l_insertStatement.mb_setString(3,m_msgFromOrchestrator->mb_getBillType()); 432 | l_insertStatement.mb_setInt64(4,atol(m_msgFromOrchestrator->mb_getSequenceNumber().c_str())); 433 | if(m_currentBillRunMode == "P") 434 | { 435 | l_insertStatement.mb_setString(5,""); 436 | } 437 | else 438 | { 439 | l_insertStatement.mb_setString(5,m_msgFromOrchestrator->mb_getAdditonalActionString()); 440 | } 441 | l_insertStatement.mb_setString(6,m_currentBillRunMode); 442 | l_insertStatement.mb_setString(7,"Q"); 443 | l_insertStatement.mb_setString(8,"N"); 444 | l_insertStatement.mb_setString(9,m_msgFromOrchestrator->mb_getFullBillCycleCode()); 445 | l_insertStatement.mb_setDate(10,ABL_Date(m_msgFromOrchestrator->mb_getCycleStartDate().c_str())); 446 | l_insertStatement.mb_setDate(11,ABL_Date(m_msgFromOrchestrator->mb_getCycleEndDate().c_str())); 447 | l_insertStatement.mb_setInt64(12,atol(m_msgFromOrchestrator->mb_getRefNumber().c_str())); 448 | l_insertStatement.mb_executeUpdate(); 449 | m_billDbConnectionPtr->mb_commit(); 450 | 451 | } 452 | else 453 | { 454 | sleep(l_sleeptime); 455 | } 456 | } 457 | catch(ABL_Exception &e) 458 | { 459 | std::cerr<<"Exception"<mb_reset(); 493 | 494 | //Set the start time 495 | m_msgToOrchestrator->mb_setStartTime(); 496 | 497 | m_msgToOrchestrator->mb_setMainBatch(l_batchId); 498 | m_msgToOrchestrator->mb_setSubBatch(l_subBatchId); 499 | m_msgToOrchestrator->mb_setBillType(l_billType); 500 | //std::cerr<"l_mock_req_num:"<mb_setRefNumber(l_mock_req_num); 502 | m_msgToOrchestrator->mb_setCycleStartDate(l_startDate); 503 | m_msgToOrchestrator->mb_setCycleEndDate(l_endDate); 504 | m_msgToOrchestrator->mb_setPassedAccounts(l_noOfSuccessAcc); 505 | m_msgToOrchestrator->mb_setFailedAccounts(l_noOfFailedAcc); 506 | m_msgToOrchestrator->mb_setStatistics(); 507 | m_msgToOrchestrator->mb_setFullBillCycleCode(l_billCycleCode); 508 | m_msgToOrchestrator->mb_setSequenceNumber(l_seqNo); 509 | // Set the timestamp 510 | m_msgToOrchestrator->mb_setTimeStamp(); 511 | 512 | if(l_noOfFailedAcc == 0 ) 513 | { 514 | //m_msgToOrchestrator->mb_setComplete("Y"); 515 | m_msgToOrchestrator->mb_setBatchUpdateStatus(PRC_CLEAN_COMPLETE_STATE); 516 | } 517 | else if(l_noOfSuccessAcc == 0) 518 | { 519 | //m_msgToOrchestrator->mb_setComplete("N"); 520 | m_msgToOrchestrator->mb_setBatchUpdateStatus(PRC_FAILED_STATE); 521 | } 522 | else 523 | { 524 | //m_msgToOrchestrator->mb_setComplete("N"); 525 | m_msgToOrchestrator->mb_setBatchUpdateStatus(PRC_ERRORED_COMPLETE_STATE); 526 | } 527 | 528 | m_msgToOrchestrator->mb_setComplete("Y"); 529 | m_msgToOrchestrator->mb_print(m_ABL_ServicePtr); 530 | 531 | *m_ABL_ServicePtr << INFO << "Updating the count in batch table" << Endl; 532 | 533 | //std::cerr<< "Updating the batch status through procedure" << std::endl; 534 | 535 | if(!m_orchMessengerPtr->mb_updateBatchStatus(m_msgToOrchestrator)) 536 | { 537 | *m_ABL_ServicePtr << CRITICAL << "Error in Updating the batch status to Pending:" <mb_writeMessage(m_statsUpdatorMessageFormat, m_msgToOrchestrator); 543 | 544 | //Sending batch count message for pause 545 | m_msgToOrchestrator->mb_reset(); 546 | 547 | //Set the start time 548 | m_msgToOrchestrator->mb_setStartTime(); 549 | 550 | m_msgToOrchestrator->mb_setMainBatch(l_batchId); 551 | m_msgToOrchestrator->mb_setSubBatch(l_subBatchId); 552 | m_msgToOrchestrator->mb_setBillType(l_billType); 553 | m_msgToOrchestrator->mb_setRefNumber(l_mock_req_num); 554 | m_msgToOrchestrator->mb_setCycleStartDate(l_startDate); 555 | m_msgToOrchestrator->mb_setCycleEndDate(l_endDate); 556 | m_msgToOrchestrator->mb_setSubBatchCount(m_execName+ORCH_FULLY_COMPLETE); 557 | m_msgToOrchestrator->mb_setFullBillCycleCode(l_billCycleCode); 558 | // Set the timestamp 559 | m_msgToOrchestrator->mb_setTimeStamp(); 560 | m_msgToOrchestrator->mb_setSequenceNumber(l_seqNo); 561 | 562 | m_msgToOrchestrator->mb_print(m_ABL_ServicePtr); 563 | 564 | *m_ABL_ServicePtr << INFO << "Sending message count to Status updater for processed"<< Endl; 565 | //Sending the message 566 | m_orchMessengerPtr->mb_writeMessage(m_batchCountMessageFormat, m_msgToOrchestrator); 567 | 568 | //updating the request as processed in CB_PRE_POST_BILL_CHECK_REQUEST 569 | 570 | /// update based on rowid 571 | l_updateStatement.mb_setString(1,l_rowId); 572 | 573 | //Execute the prepared statement 574 | l_updateStatement.mb_executeUpdate(); 575 | 576 | *m_ABL_ServicePtr << INFO << "Updated status to C in CB_PRE_POST_BILL_CHECK_REQUEST for batchId:" << l_batchId<< Endl; 577 | } 578 | 579 | if (l_irowsFetched > 0) 580 | { 581 | //Comitting after processing all the requests taken and as we are using select for update 582 | m_billDbConnectionPtr->mb_commit(); 583 | *m_ABL_ServicePtr << INFO << "Commit"<mb_rollback(); // to release locks in case of any error 596 | } 597 | } 598 | } 599 | 600 | ////////////////////////////////////////////////////////////////////// 601 | // 602 | // Process the confirm the requests. 603 | // 604 | ////////////////////////////////////////////////////////////////////// 605 | // 606 | // Parameters : p_runMode -> Engine running mode 607 | // : p_billTypeInMsg -> Bill type. 608 | // 609 | ////////////////////////////////////////////////////////////////////// 610 | bool PreAndPostBillWrapper::mb_validRequest(ABL_String p_runMode, ABL_String p_billTypeInMsg) 611 | { 612 | int l_billType = toupper(p_billTypeInMsg[0]); 613 | if(l_billType == 'H' && p_runMode == "N") //Received non standard request 614 | { 615 | return true; 616 | } 617 | else if(l_billType == 'S' && p_runMode == "S") 618 | { 619 | return true; 620 | } 621 | return false; 622 | } 623 | /********************************************************************* 624 | # 625 | # Copyright 2012 - 2013 626 | # Tecnotree Convergence Ltd 627 | # 628 | *********************************************************************/ 629 | --------------------------------------------------------------------------------