# US 2010/0169862 A1 · Interface infrastructure for a continuation based runtime

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2010/0169862 A1
- Document ID: US20100169862A1
- Status: Published application
- Kind: A1
- Application number: 12/345,288
- Filed: 2008-12-29
- Published: 2010-07-01
- Earliest claimed: 2008-12-29
- Assignees: Microsoft Corporation
- Inventors: Kenneth D. Wolf; Edmund Samuel Victor Pinto; Robert Brian Schmidt; Donald F. Box; Geoffrey M. Kizer; Nathan C. Talbert; Kavita Kamani; Alberto Arias Maestro; David Robert Cliffe; Tirunelveli R. Vishwanath; HongMei Ge; Stephen Jared Maine; Alexander Martin DeJarnatt
- Web page: https://patentgrep.com/patent/US20100169862A1

## CPC

- G06F 8/30: Creation or generation of source code
- G06F 8/313: {Logic programming, e.g. PROLOG programming language}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Namespace for continuation-based runtime. Some embodiments described herein are directed to a framework using continuation based runtime namespaces that pertain to an infrastructure for enabling the creation of a wide variety of continuation-based programs that perform a wide-array of tasks. The infrastructure provides a foundation for building continuation-based, declarative applications of various scale and complexity. In some embodiments, the associated application programming interfaces (APIs) are factored into a hierarchy of namespaces in a manner that balances utility, usability, extensibility, and versionability.

## Claims

### Claim 1

In a computing environment, a computer readable storage media having stored thereon computer executable instructions for implementing a framework for enabling the creation and/or execution of continuation-based declarative applications, the computer readable medium comprising the following:
a first plurality of APIs, each of which being for writing continuation based runtimes, wherein each of the first plurality of APIs are included in a first common namespace for an activity model of a continuation-based runtime, wherein each of the first plurality of continuation based runtime APIs are represented with a first common namespace prefix for logical grouping of the plurality of continuation-based runtime APIs, the first plurality of APIs comprising:
a first API class that represents continuation-based behavior, wherein instances of the class include imperative code in their bodies that is executed by a processor to perform functions; and
a second API class that is used for declaratively composing continuation-based behaviors of the first class into new types by declaring one or more instances of the first API class.

### Claim 2 (depends on 1)

The computer readable medium of claim 1, wherein the first plurality of APIs are represented as source code.

### Claim 3 (depends on 1)

The computer readable medium of claim 1, wherein the first plurality of APIs represented as compiled code

### Claim 4 (depends on 1)

The computer readable medium of claim 1, wherein the first plurality of APIs is operatable on the .NET platform.

### Claim 5 (depends on 1)

The computer readable medium of claim 1, wherein the first plurality of APIs comprises:
an API used for declaratively composing behavior dynamically using an Activity document object model;
an API used for writing imperative behavior through an Execute method that has access to data resolution and extensions;
an API used for writing imperative behavior through an Execute method that has unfettered access to the full breath of the runtime;
an API used for implementing a continuation-based functional behavior that has a well-known, elevated return value;
an API used for allowing for environment access;
an API that adds async operation support to the API used for allowing environment access;
an API that adds support for child management, setting up no-persist zones, isolation blocks, and bookmarks;
an API used for the storage of data in a continuation-based program;
an API used for implementing a binding terminal that represents the flow of data for an activity; and
an API used for implementing a snippet of workflow with a specific signature.

### Claim 6 (depends on 1)

The computer readable medium of claim 1, further comprising a second plurality of APIs organized in a second common namespace and that are represented with a second common namespace prefix for logical grouping, wherein the second plurality of APIs are used to host, execute, and manage instances of continuation-based, declarative programs.

### Claim 7 (depends on 6)

The computer readable medium of claim 6, wherein the second plurality of APIs comprises:
an API used to create a new workflow instance or to load an existing instance;
an API used to provide the API used to create a new workflow instance or to load an existing instance to host functionality such as synchronization, persistence, tracking, and extensions;
an API used for implementing a locus of control for workflow instance management;
an API used for directly running an activity as if it were a method call; and
an API used for implementing a primary entry point for accessing a plurality of hosting services.

### Claim 8 (depends on 1)

The computer readable medium of claim 1, further comprising a third plurality of APIs organized in a third common namespace and that are represented with a third common namespace prefix for logical grouping, wherein the third plurality of APIs are used to implement a base layer of activities that add functionality to the continuation-based runtime and that are used to add concrete behaviors that build on top of a core activity model.

### Claim 9 (depends on 8)

The computer readable medium of claim 8, wherein the third plurality of APIs comprises:
an API used for scheduling instances of the first API class for execution in sequential order
an API used for a control-flow activity that schedules one of two instances of the first API class;
an API used for incrementally going through an enumeration and invoking a configurated action class with the current value of the enumeration;
an API used for enumerating parallel execution of action classes.
an API used for a control-flow Activity that is configured with a set of instances of the first API class that it schedules for execution all at once;
an API used for a control-flow Activity that is configured with a set of Nodes that store instances of the first API class for behavior and additional metadata about the next Node that should be scheduled;
an API that is configured with a set of States and Transitions and that interprets this metadata about nodes into orchestration logic that follows the formal models of state machines in executing a reactive system; and
an API used for facilitating method calls.

### Claim 10 (depends on 1)

The computer readable medium of claim 1, further comprising a fourth plurality of APIs organized in a fourth common namespace and that are represented with a fourth common namespace prefix for logical grouping, wherein the fourth plurality of APIs are used for providing and executing build constraints and policy constraints, wherein build constraints validate that a given workflow does not violate any runtime or activity assumptions which would most likely cause runtime exceptions and wherein policy constraints warn of potential issues including one or more of best practice violations, design guideline violations, or company policy violations.

### Claim 11 (depends on 10)

The computer readable medium of claim 10, wherein the fourth plurality of APIs comprises:
an API used for implementing a mechanism by which workflows can be validated against a set of constraints;
an API used for providing an interface between the API used for implementing a mechanism by which workflows can be validated against a set of constraints and the validation constraint that a user wants to implement;
an API used for providing strongly typed, action class based sugar on the base class to enable a simpler experience for the constraint author; and
an API used for containing the message and error level information of a constraint failure.

### Claim 12 (depends on 1)

The computer readable medium of claim 1, further comprising a fifth plurality of APIs organized in a fifth common namespace and that are represented with a fifth common namespace prefix for logical grouping, wherein the fifth plurality of APIs are used for defining and consuming tracking events.

### Claim 13 (depends on 12)

The computer readable medium of claim 12, wherein the fifth plurality of APIs comprises:
an API used for containing information about the runtime execution process of a continuation-based program;
an API used for that contains the state of an activity when a record is emitted, the Id of the activity, and values extracted from the running instance at the time the tracking record was emitted;
an API used for enlisting in a workflow transaction; and
an API used for implementing declarative definitions of filters against event type and the data that should to be queried from the workflow instance for a given event.

### Claim 14 (depends on 1)

The computer readable medium of claim 1, further comprising a sixth plurality of APIs organized in a sixth common namespace and that are represented with a sixth common namespace prefix for logical grouping, wherein the sixth plurality of APIs are used for modeling communication with other systems by sending and receiving messages in and out of a workflow.

### Claim 15 (depends on 14)

The computer readable medium of claim 14, wherein the sixth plurality of APIs further include APIs with functionality for representing a continuation-based program as a service.

### Claim 16 (depends on 15)

The computer readable medium of claim 15, wherein the sixth plurality of APIs comprises:
an API used for allowing users to send data out of a workflow in the form of a message;
an API used for allowing users to wait for external stimuli in a continuation-friendly manner by exposing a web service endpoint to receive messages;
an API used for providing a friendly programming model for sending data that is either a DataContract-based payload, XmlSerializable-based payload, XElement, Stream, or Message;
an API used for providing a friendly programming model for receiving data that is either a DataContract-based payload, XmlSerializable-based payload, XElement, Stream, or Message;
an API used for implementing handles that facilitate correlation; and
an API used to provide an implicit handle that can be used by Send and Receive activities to loosen the requirements for the user on providing correlation bindings at each individual activity.

### Claim 17

In a computing environment, a computer readable storage media having stored thereon computer executable instructions for implementing a framework for enabling the creation and/or execution of continuation-based declarative applications, the computer readable medium comprising the following:
a first plurality of APIs, each of which being for writing continuation based runtimes, wherein each of the first plurality of APIs are included in a first common namespace for an activity model of a continuation-based runtime, wherein each of the first plurality of continuation based runtime APIs are represented with a first common namespace prefix for logical grouping of the plurality of continuation-based runtime APIs, the first plurality of APIs comprising:
a first API class that represents continuation-based behavior, wherein instances of the class include imperative code in their bodies that is executed by a processor to perform functions; and
a second API class that is used for declaratively composing continuation-based behaviors of the first class into new types by declaring one or more instances of the first API class.
a second plurality of APIs, wherein each of the second plurality of APIs are included in a second common namespace having common characteristics that re not present in all of the first plurality of APIs.

### Claim 18

In a computing environment, a computer readable storage media having stored thereon computer executable instructions for implementing a framework for enabling the creation and/or execution of continuation-based declarative applications, the computer readable medium comprising the following:
a first plurality of APIs organized in a first common namespace and that are represented with a first common namespace prefix for logical grouping, wherein first plurality of APIs are for an activity model of a continuation-based runtime;
a second plurality of APIs organized in a second common namespace and that are represented with a second common namespace prefix for logical grouping, wherein the second plurality of APIs are used to host, execute, and manage instances of continuation-based, declarative programs;
a third plurality of APIs organized in a third common namespace and that are represented with a third common namespace prefix for logical grouping, wherein the third plurality of APIs are used to implement a base layer of activities that add functionality to the continuation-based runtime and that are used to add concrete behaviors that build on top of a core activity model;
a fourth plurality of APIs organized in a fourth common namespace and that are represented with a fourth common namespace prefix for logical grouping, wherein the fourth plurality of APIs are used for providing and executing build constraints and policy constraints, wherein build constraints validate that a given workflow does not violate any runtime or activity assumptions which would most likely cause runtime exceptions and wherein policy constraints warn of potential issues including one or more of best practice violations, design guideline violations, or company policy violations;
a fifth plurality of APIs organized in a fifth common namespace and that are represented with a fifth common namespace prefix for logical grouping, wherein the fifth plurality of APIs are used for defining and consuming tracking events; and
a sixth plurality of APIs organized in a sixth common namespace and that are represented with a sixth common namespace prefix for logical grouping, wherein the sixth plurality of APIs are used for modeling communication with other systems by sending and receiving messages in and out of a workflow, and for representing a continuation-based program as a service.

### Claim 19 (depends on 18)

The computer readable medium of claim 18, wherein the first plurality of APIs comprises:
a first API class that represents continuation-based behavior, wherein instances of the class include imperative code in their bodies that is executed by a processor to perform functions; and
a second API class that is used for declaratively composing continuation-based behaviors of the first class into new types by declaring one or more instances of the first API class.

### Claim 20 (depends on 19)

The computer readable medium of claim 19, wherein the first plurality of APIs further comprises:
an API used for declaratively composing behavior dynamically using an Activity document object model;
an API used for writing imperative behavior through an Execute method that has access to data resolution and extensions;
an API used for writing imperative behavior through an Execute method that has unfettered access to the full breath of the runtime;
an API used for implementing a continuation-based functional behavior that has a well-known, elevated return value;
an API used for allowing for environment access;
an API that adds async operation support to the API used for allowing environment access;
an API that adds support for child management, setting up no-persist zones, isolation blocks, and bookmarks;
an API used for the storage of data in a continuation-based program;
an API used for implementing a binding terminal that represents the flow of data for an activity; and
an API used for implementing a snippet of workflow with a specific signature.
