An easy-to-use workflow language can be created by extending an existing, common language such as JAVA. The language can be extended by adding those constructs that are missing but desirable. Such desirable constructs can include parallelism, asynchrony, loops over asynchronous events, and flexible handling of XML. Such constructs can allow a user to define a virtual program using the extended JAVA syntax. For example, XML can be placed inside a JAVA class that defines the high-level orchestration logic a workflow should follow. That orchestration logic can refer to the JAVA class to carry out work, such that the logic to handle an incoming message is really in JAVA. This description is not intended to be a complete description of, or limit the scope of, the invention. Other features, aspects, and objects of the invention can be obtained from a review of the specification, the figures, and the claims.