Hi Sonali. Thank you for the question.
An Opaque Behavior is a type of action, not an activity. Activities contain actions. You will need to create an activity to populate the value for an entry, exit or do property of a state. The outcome of an Opaque Behavior is defined by the code that it contains. On rare occasions, an action defies the use of the other standardized action types; the language provides a mechanism to create a customized action.
Also, be careful in the use of entry, exit and do properties; they are often misused. Often people place an activity in the value of an entry property that should be on the transition. If the behavior is really a response to the transition, then the behavior should be called on the transition. If a state has multiple entry points, remember that the activity called by the entry property executes every time the state becomes active, no matter which entry point. Similarly, a state may contain multiple exit points, and every time a state is about to become inactive, the exit activity is executed. And also remember that while a state is active, the do activity is continuously being executed. This can have implications depending on whether state machines are set up to execute to completion or not.
I realize this is way more than you asked and I hope it is useful.