1. A computer-readable medium having computer-executable instructions, which when executed perform steps, comprising, processing activities of an activity tree in a continuation based runtime, in which at least one activity is associated with at least one parameter representing a flow of data relative to that activity, each parameter declared as an input parameter, an output parameter, or an input and output parameter, variables associated with activities of the activity tree within a scope defined by parent-child relationships of the activities in the activity tree, the variables representing data storage and providing for shared state among the in scope activities, the activities using the variables to produce result data when processed, and outputting the result data.