How to call child class function having only parent class object

In reply to haykp:

What your intention in your mytrans which extended from vendor trans?
We don’t know how the VIPs is implemented, then I cannot give you the good recommendations.
But can you try the following ways:
I assume mytrans is the class which extended from vendor trans.

  1. Create mytrans in your sequence and start_item/finish_item with mytrans, then in the callback function, you cast the vendor trans to mytrans.

  2. Override (by type) mytrans class to vendor class, then cast the vendor trans to mytrans in the callback. Please check to make sure that you are using type_id::create method for the vendor trans in your sequence.

  3. Try to clone/copy the vendor trans to mytrans in your callback.

I hope case #1 or case #2 will work, but it depends on how your VIP handles the trans before calling the callback function.