A computer-implemented method comprising: providing a network model of nodes of a sensor network, the network model specifying the type and number of sensors deployed in specific locations, as well as the nature and quality of communication links between the nodes; creating a process model from a process, wherein one subset of tasks of the process is intended to be executed by a processor that is running a business software application and another subset of tasks of the process is intended to be executed by the nodes of the sensor network, wherein the process model only references artifacts expressing functionality that is available in the sensor network; providing the process model and the network model as an input to a first compiler and translating the artifacts of the process model into a plurality of abstractions of a high level device programming language, wherein the abstractions include a scope and a role, wherein the scope identifies a subset of nodes based on their characteristics, wherein the role can be used to assign a task to a given node in the sensor network; providing the plurality of abstractions to a second compiler to produce first executable code, the first executable code including a communication primitive and being recognizable by an operating system of one or more nodes of the sensor network; and providing the process model as an input to the first compiler to produce a second executable code including the communication primitive, the second executable code recognizable by the business software application; and injecting the first executable code into the sensor network to control operation of the nodes, wherein the process model is executed by the business software application and interacts and communicates with the parts of the process model that are instantiated as the first executable code on the sensor network nodes. providing a network model of nodes of a sensor network, the network model specifying the type and number of sensors deployed in specific locations, as well as the nature and quality of communication links between the nodes; creating a process model from a process, wherein one subset of tasks of the process is intended to be executed by a processor that is running a business software application and another subset of tasks of the process is intended to be executed by the nodes of the sensor network, wherein the process model only references artifacts expressing functionality that is available in the sensor network; providing the process model and the network model as an input to a first compiler and translating the artifacts of the process model into a plurality of abstractions of a high level device programming language, wherein the abstractions include a scope and a role, wherein the scope identifies a subset of nodes based on their characteristics, wherein the role can be used to assign a task to a given node in the sensor network; providing the process model and the network model as an input to a first compiler and translating the artifacts of the process model into a plurality of abstractions of a high level device programming language, wherein the abstractions include a scope and a role, wherein the scope identifies a subset of nodes based on their characteristics, wherein the role can be used to assign a task to a given node in the sensor network; providing the plurality of abstractions to a second compiler to produce first executable code, the first executable code including a communication primitive and being recognizable by an operating system of one or more nodes of the sensor network; and providing the process model as an input to the first compiler to produce a second executable code including the communication primitive, the second executable code recognizable by the business software application; and injecting the first executable code into the sensor network to control operation of the nodes, wherein the process model is executed by the business software application and interacts and communicates with the parts of the process model that are instantiated as the first executable code on the sensor network nodes.