How to use custom task activity inside while in visual studio 2010 sequential workflow?

How to use custom task activity inside while in visual studio 2010 sequential workflow?

I am using custom task activity which is in replicator activity and this is executed inside while condition .

but unfortunately i am not able to get the properties which has been set in workflow .

Note:- If While Condition is removed then it is working fine...

is anyone can provide solution why the values are not set when it is while activity.

• Consider having global properties and assign them in the workflow constructor. That way they should be available in the while loop as well. – Ralph W Nov 29 '12 at 16:39

With the help using Dynamic object of replicator it is now working Just have to changed the below code

private void replicatorActivity1_ChildInitialized(object sender, ReplicatorChildEventArgs e) {

 SPTaskActivity customactivity = (SPTaskActivity)e.Activity;