3.4.7 Transactions of the reply activity
(1) Transaction control when an activity is not defined after the reply activity
When an activity is not defined after the reply activity, the status of the reply activity during the execution of the reply activity transitions to (Completed), and the transaction is committed just before responding with a message.
Figure 3-44 Transaction control when an activity is not defined after the reply activity
![[Figure]](figure/zc034580.gif)
(2) Transaction control when an activity is defined after the reply activity
(a) When you use Reliable Messaging for executing the activity after the reply
When an activity is defined after the reply activity and you use Reliable Messaging for executing the activity after reply, transaction control is as follows:
- When an activity is defined after the reply activity and you use Reliable Messaging for executing the activity after reply, the status of the reply activity during the execution of the reply activity transitions to (Completed).
- The request to process asynchronous execution of the activity defined after the reply activity is executed for Reliable Messaging, and the transaction is committed just before response message.
- The activity defined after the reply activity is executed asynchronously from Reliable Messaging.
- Transaction is started before executing the activity defined after the reply activity.
Figure 3-45 Transaction control when an activity is defined after the reply activity and Reliable Messaging is used for execution of the activity after reply
![[Figure]](figure/zc034590.gif)
- If an exception occurs in the activity defined after the reply activity
When Reliable Messaging is used for executing an activity after reply and, if a system exception occurs in the activity defined after reply activity, transaction control is as follows:
- Rollback till the reply activity is (Completed).
- Depending on the rollback, the activity defined after the reply activity is executed again from Reliable Messaging.
Figure 3-46 Transaction control when Reliable Messaging is used to execute an activity after reply and there is an exception in the activity defined after reply activity
![[Figure]](figure/zc034600.gif)
Whether a message can be resent from Reliable Messaging, depends on the value specified for maximum number of deliveries (RMMaxDeliveryNum). For details, see " Reliable Messaging".
(b) If asynchronous EJB is used for executing the activity after reply
When an activity is defined after the reply activity and you use asynchronous EJB to execute the activity after reply, transaction control is as follows:
- At the time of executing the reply activity, the status of reply activity transits to (Completed).
- The request to process the asynchronous execution of the activity defined after reply is executed for asynchronous EJB, and the status of reply activity transits to (Completedwait).
- Transaction is committed just before response message.
- The activity defined after reply is executed asynchronously from asynchronous EJB and the status of reply activity transits to (Completed).
- Transaction is started before executing the activity defined after reply.
Figure 3-47 Transaction control when an activity is defined after reply activity and asynchronous EJB is used for executing the activity after reply
![[Figure]](figure/zc034610.gif)
- If an exception occurs in the activity defined after the reply activity
When asynchronous EJB is used to execute an activity after reply and an exception occurs in the activity defined after the reply activity, the status of the reply activity rolls back till (Completedwait).
The activity defined after the reply activity is not executed again.
Figure 3-48 Transaction control when an asynchronous EJB is used to execute an activity after reply, and an exception occurs in the activity defined after the reply activity
![[Figure]](figure/zc034620.gif)
- Transaction control when an exception occurs at the time of executing asynchronous EJB
When asynchronous EJB is used for executing an activity after reply, and an exception occurs at the time of executing asynchronous EJB, the activity defined after the reply activity is not executed.
The status of the reply activity becomes (Completedwait).
Figure 3-49 Transaction control when asynchronous EJB is used to execute an activity after reply, and an exception occurs at the time of executing asynchronous EJB
![[Figure]](figure/zc034630.gif)
(3) Transaction and status transition of the reply activity
The following lists the transaction and status transition of the reply activity.
Table 3-11 Transaction and status transition of the reply activity
Reply activity operation | When Reliable Messaging is used for executing the reply activity | When asynchronous EJB is used for executing the reply activity |
---|
Start | Transition to status | Completed | Completed |
Transaction control | N# | N # |
Asynchronous execution request to Reliable Messaging | Transition to status | - | (Non-executable) |
Transaction control | N |
Asynchronous execution response from Reliable Messaging | Transition to status | - |
Transaction control | N |
Asynchronous execution request to asynchronous EJB | Transition to status | (Non-executable) | (Completedwait) |
Transaction control | N # |
Asynchronous execution response from asynchronous EJB | Transition to status | Completed |
Transaction control | N # |
Omission | Transition to status | Omission | Omission |
Transaction control | N | N |
Unomission | Transition to status | Unomission | Unomission |
Transaction control | N | N |
- Legend:
- N: Transaction is not committed.
- -: No transition.
- Note#
- Transaction is not committed at this point, but at the timing of a subsequent transaction control.