I can't seem to find a way of determining the parent activity of an activity when it is moved about. I have an activity that needs to be bound to a parent activity when it is inside a certain parent activity, but when outside of the parent, it needs
to have the inarg blanked out so that it can be manually bound to the parent.
I have all the logic worked out other than determining the parent activity.
I'm using the ModelService_changed event in my rehost to detect the movement of the activity (this seems to be the only way of detecting when an activity is added, moved or copied). The only problem is that when an activity is moved within the
patern (dragged to a new location) the ModelService_changed event fires before the activities model item has been updated. So my attemps to bind always end up binding to the previous parent activity!
Is there either
1. A way of getting the current (new) parent activity from the modelItem inside the ModelService_changed event?
2. Another way of detecting if an activity has been added, moved, or pasted into a new location in the workflow?
Any help will be greatly appreciated.
View Complete Post