1- package com .examples .workflowTEQ ;
1+ package com .examples .workflowTxEventQ ;
22
33import java .sql .SQLException ;
44import java .util .HashMap ;
3333import oracle .ucp .jdbc .PoolDataSourceFactory ;
3434
3535@ Service
36- public class WorkflowTEQ {
36+ public class WorkflowTxEventQ {
3737
3838 @ Autowired
3939 UserDetailsDao userDetailsDao ;
@@ -59,7 +59,7 @@ public class WorkflowTEQ {
5959 UserDetails applicationToUser_message ;
6060 UserDetails applicationToDeliverer_message ;
6161
62- public Map <Integer ,String > pubSubWorkflowTEQ () throws JMSException , SQLException , ClassNotFoundException , JsonMappingException , JsonProcessingException , AQException {
62+ public Map <Integer ,String > pubSubWorkflowTxEventQ () throws JMSException , SQLException , ClassNotFoundException , JsonMappingException , JsonProcessingException , AQException {
6363
6464 String deliveryStatus ;
6565 Map <Integer ,String > response = new HashMap ();
@@ -68,13 +68,13 @@ public Map<Integer,String> pubSubWorkflowTEQ() throws JMSException, SQLException
6868 response .put (1 , "Topic Connection created." );
6969
7070 /* 1: USER PLACED OREDER ON APPLICATION */
71- userToApplication_message = pubSubUtil .pubSubWorkflowTEQ (session , constantName .teq_userApplicationSubscriber , constantName .teq_userQueueName ,new UserDetails (rnd .nextInt (99999 ), "DBUSER" , 0 , "Pending" , "US" ));
71+ userToApplication_message = pubSubUtil .pubSubWorkflowTxEventQ (session , constantName .txEventQ_userApplicationSubscriber , constantName .txEventQ_userQueueName ,new UserDetails (rnd .nextInt (99999 ), "DBUSER" , 0 , "Pending" , "US" ));
7272 response .put (2 ,"USER ORDER MESSAGE - ORDERID: " + userToApplication_message .getOrderId () + ", OTP: "
7373 + userToApplication_message .getOtp () + ", DeliveryStatus: "
7474 + userToApplication_message .getDeliveryStatus ());
7575
7676 /* 2: APPLICATION SHARES OTP TO USER */
77- applicationToUser_message = pubSubUtil .pubSubWorkflowTEQ (session , constantName .teq_applicationUserSubscriber , constantName .teq_applicationQueueName ,
77+ applicationToUser_message = pubSubUtil .pubSubWorkflowTxEventQ (session , constantName .txEventQ_applicationUserSubscriber , constantName .txEventQ_applicationQueueName ,
7878 new UserDetails (userToApplication_message .getOrderId (), userToApplication_message .getUsername (),
7979 rnd .nextInt (9999 ), userToApplication_message .getDeliveryStatus (),
8080 userToApplication_message .getDeliveryLocation ()));
@@ -88,22 +88,22 @@ public Map<Integer,String> pubSubWorkflowTEQ() throws JMSException, SQLException
8888 response .put (4 ,"APPLICATION ADDED USER ORDER INTO RECORD" );
8989
9090 /* 4: APPLICATION SHARES DELIVERY DETAILS TO DELIVERER */
91- applicationToDeliverer_message = pubSubUtil .pubSubWorkflowTEQ (session , constantName .teq_applicationDelivererSubscriber , constantName .teq_applicationQueueName ,
91+ applicationToDeliverer_message = pubSubUtil .pubSubWorkflowTxEventQ (session , constantName .txEventQ_applicationDelivererSubscriber , constantName .txEventQ_applicationQueueName ,
9292 new UserDetails (userToApplication_message .getOrderId (), userToApplication_message .getUsername (), 0 ,
9393 userToApplication_message .getDeliveryStatus (),
9494 userToApplication_message .getDeliveryLocation ()));
9595 response .put (5 ,"APPLICATION TO DELIVERER MESSAGE- ORDERID: " + applicationToDeliverer_message .getOrderId () + ", OTP: " + applicationToDeliverer_message .getOtp ()+ ", DeliveryStatus: " + applicationToDeliverer_message .getDeliveryStatus ());
9696
9797 /* 5: USER SHARES OTP TO DELIVERER */
98- userToDeliverer_message = pubSubUtil .pubSubWorkflowTEQ (session , constantName .teq_userDelivererSubscriber , constantName .teq_userQueueName ,
98+ userToDeliverer_message = pubSubUtil .pubSubWorkflowTxEventQ (session , constantName .txEventQ_userDelivererSubscriber , constantName .txEventQ_userQueueName ,
9999 new UserDetails (applicationToUser_message .getOrderId (), applicationToUser_message .getUsername (),
100100 applicationToUser_message .getOtp (), applicationToUser_message .getDeliveryStatus (),
101101 applicationToUser_message .getDeliveryLocation ()));
102102 response .put (6 , "USER TO DELIVERER MESSAGE - ORDERID: " + userToDeliverer_message .getOrderId ()+ ", OTP: " + userToDeliverer_message .getOtp () + ", DeliveryStatus: " + userToDeliverer_message .getDeliveryStatus ());
103103 System .out .println ();
104104
105105 /* 6: DELIVERER TO APPLICATION FOR OTP VERIFICATION */
106- delivererToApplication_message = pubSubUtil .pubSubWorkflowTEQ (session , constantName .teq_delivererApplicationSubscriber , constantName .teq_delivererQueueName ,
106+ delivererToApplication_message = pubSubUtil .pubSubWorkflowTxEventQ (session , constantName .txEventQ_delivererApplicationSubscriber , constantName .txEventQ_delivererQueueName ,
107107 new UserDetails (userToDeliverer_message .getOrderId (), userToDeliverer_message .getUsername (),
108108 userToDeliverer_message .getOtp (), userToDeliverer_message .getDeliveryStatus (),
109109 userToDeliverer_message .getDeliveryLocation ()));
@@ -128,12 +128,12 @@ public Map<Integer,String> pubSubWorkflowTEQ() throws JMSException, SQLException
128128
129129 UserDetails updatedData = userDetailsDao .getUserDetails (delivererToApplication_message .getOrderId ());
130130 /* 8: APPLICATION UPDATE DELIVERER TO DELIVER ORDER */
131- applicationToDeliverer_message = pubSubUtil .pubSubWorkflowTEQ (session , constantName .teq_applicationDelivererSubscriber , constantName .teq_applicationQueueName ,
131+ applicationToDeliverer_message = pubSubUtil .pubSubWorkflowTxEventQ (session , constantName .txEventQ_applicationDelivererSubscriber , constantName .txEventQ_applicationQueueName ,
132132 new UserDetails (delivererToApplication_message .getOrderId (), delivererToApplication_message .getUsername (), delivererToApplication_message .getOtp (), updatedData .getDeliveryStatus (), delivererToApplication_message .getDeliveryLocation ()));
133133 response .put (9 , "UPDATE DELIVERER MESSAGE - ORDERID: " + applicationToDeliverer_message .getOrderId ()+ ", OTP: " + applicationToDeliverer_message .getOtp () + ", DeliveryStatus: " + applicationToDeliverer_message .getDeliveryStatus ());
134134
135135 /* 9: APPLICATION UPDATE USER FOR DELIVERED ORDER */
136- applicationToUser_message = pubSubUtil .pubSubWorkflowTEQ (session , constantName .teq_applicationUserSubscriber , constantName .teq_applicationQueueName ,
136+ applicationToUser_message = pubSubUtil .pubSubWorkflowTxEventQ (session , constantName .txEventQ_applicationUserSubscriber , constantName .txEventQ_applicationQueueName ,
137137 new UserDetails (delivererToApplication_message .getOrderId (), delivererToApplication_message .getUsername (), delivererToApplication_message .getOtp (), updatedData .getDeliveryStatus (), delivererToApplication_message .getDeliveryLocation ()));
138138 response .put (10 , "UPDATE USER MESSAGE - ORDERID: " + applicationToUser_message .getOrderId () + ", OTP: " + applicationToUser_message .getOtp () + ", DeliveryStatus: " + applicationToUser_message .getDeliveryStatus ());
139139
0 commit comments