SubscriptionProcessId property: Message class
Description
This property returns a string containing the subscription process identifier. This is a unique sequential number.
Note:
This property has been desupported and remains for backward compatibility only. Use the Message class TransactionId property instead.
See TransactionId property: Message class.
This property is populated only if the “Generate Subscription Process Instance” option is turned on in the Subscription Process definition.
The subscription process identifier corresponds to the subscription process instance, not the message instance. If there are multiple subscription processes for the same message each subscription process will have a different, unique ID.
If the subscription process terminated abnormally, its process instance is lost, and a new one is generated on the next retry (that is, there will be a gap in the sequence.)
This property is valid only for asynchronous messages.
This property is read-only.
Considerations for Using SubscriptionProcessId
Consider the following when using SubscriptionProcessId:
-
Using the Run PeopleCode option from Message Subscription does not generate the number. It is generated only if the Application Server is running the PeopleCode.
-
If for some reason you have to rerun the subscription, a new number is assigned.
-
Because generating the number is optional, your program must contain code to support the option being turned off. Here is a code example from ITEM_SYNC:
If All(&MSG.SubscriptionProcessId) Then &EIP_CTL_ID = Generate_EIP_CTL_ID(4, &MSG.SubscriptionProcessId); Else &EIP_CTL_ID = Generate_EIP_CTL_ID(1, "Random"); End-If; -
If the flag is off, this property is blank. In this case, you may want to adopt a standard for generating a random number, as shown in the previous example.