A “business process” is a collection of related, structured activities or tasks that produce a specific result typically associated with providing a service or product for a particular customer or customers. A business process often can be visualized with a flowchart as a sequence of activities with interleaving decision points or with a process matrix as a sequence of activities with relevance rules based on the data in the process.
A business process engine is an execution framework for a given business process template, which may be depicted by a Business Process Model and Notation (BPMN) diagram. For example, a BPMN representation of a business process may be created by a designer of the business process. The BPMN representation may then be used to generate source code to implement the business process, e.g., by providing a template that can be used to create operable instances of the business process.
A process instance is an executing instance of the process template and may be invoked using different invocation contexts, e.g., message events, user invocation, etc. Each instance upon invocation typically is given contextual input data on which the process activities/task will operate on. The contextual data may be associated with a single or multiple process instances.
A process engine is responsible for the invocation of a process instance, its state and life-cycle management. During execution a process instance maintains its state and life-cycle information in the runtime engine and process data structures.
From time to time, a business process definition or model may need to be updated, replaced, superseded, etc. It may be necessary or desirable to update a business process definition quickly, and to have such an update implemented at a remote system one or more attributes of which may not be known to a developer of the updated business process definition.
Various embodiments of the invention are disclosed in the following detailed description and the accompanying drawings.
The invention can be implemented in numerous ways, including as a process; an apparatus; a system; a composition of matter; a computer program product embodied on a computer readable storage medium; and/or a processor, such as a processor configured to execute instructions stored on and/or provided by a memory coupled to the processor. In this specification, these implementations, or any other form that the invention may take, may be referred to as techniques. In general, the order of the steps of disclosed processes may be altered within the scope of the invention. Unless stated otherwise, a component such as a processor or a memory described as being configured to perform a task may be implemented as a general component that is temporarily configured to perform the task at a given time or a specific component that is manufactured to perform the task. As used herein, the term ‘processor’ refers to one or more devices, circuits, and/or processing cores configured to process data, such as computer program instructions.
A detailed description of one or more embodiments of the invention is provided below along with accompanying figures that illustrate the principles of the invention. The invention is described in connection with such embodiments, but the invention is not limited to any embodiment. The scope of the invention is limited only by the claims and the invention encompasses numerous alternatives, modifications and equivalents. Numerous specific details are set forth in the following description in order to provide a thorough understanding of the invention. These details are provided for the purpose of example and the invention may be practiced according to the claims without some or all of these specific details. For the purpose of clarity, technical material that is known in the technical fields related to the invention has not been described in detail so that the invention is not unnecessarily obscured.
In various embodiments, a business analyst 102 defines a business process (template) 104A, for example using an automated business process definition tool. A structured representation of the business process template (or model) 104A, such as an XMI (XML Metadata Interchange) or other format, is created and saved. A business process deployment technician 106 uses the business process template (XMI or other), configuration data, and/or other information to deploy the business process, in the example shown by creating and storing in a data storage 108 an archive file, in this example a JAVA Enterprise Archive (.ear) file that includes the modules and/or information needed to deploy the business model on an application server. A business process administrative user 110 uses the archive to deploy the business process, e.g., to create and run instances thereof, on an application server, such as the business process engine 112 shown in
In various embodiments, the archive stored in storage 108 includes a definition of the business process, and component processing tasks, in a language that in prior approaches would be interpreted at runtime to provide and execute processing associated with business process instances. Typically, compiled code executes much more quickly and efficiently than interpreted code. However, business process definition code cannot be compiled ahead of time, e.g., by a developer prior to deployment of the code, if key attributes (e.g., operating system, file system, etc.) of the system to which the code is to be deployed and executed (e.g., business process engine 112 of
Just in time compilation (“JIT” or “JIT compilation”) of business process definitions, to enable business processes to be executed by running compiled code instead of by interpreting instructions at runtime, even if key attributes of the system at which the code will be compiled are not known at development time, is disclosed. In various embodiments, the administrative user 110, using business process engine 112, selects a deployed business process template, e.g., a stored .ear or other archive, unpacks the archive, and for each of at least a subset of components that include code that would otherwise have to be interpreted at runtime (e.g., process definition, processing tasks), a compiled version of the component is generated. For example, in some embodiments, a Java binary (i.e., byte code) or other compiled representation is created. In some embodiments, if a byte code or other intermediate compiled representation is created, further just in time compilation to provide machine code may be performed.
Referring further to
Use of just in time compilation as described herein provides improved runtime performance, as compared to interpreting instructions at runtime, and enables JIT to be used for business process execution in a way that does not complicate migration to subsequent versions of the application server (in the example in
In various embodiments, business rules engine 208 executes one or more business rules on facts stored in a working memory. Business rules engine 208 evaluates one or more business rules/rule sets on facts asserted from the process “business rules” task and may impact other rules/rule sets and facts without isolation in the working memory.
The business rules engine 208 may be a software system that executes one or more business rules in a runtime production environment. The rules engine allows assertion of facts to the working memory where rules correlate facts based on the rule criteria which are fact filters and facts joins between different types of facts. The Business Process Model (BPM), e.g., process 202, by definition is a template collection of related, structured activities or tasks. The runtime process is an instance created from a process template (e.g., JIT compiled 204 Java binary code 206) and a process context data is associated with it which is available to the individual process tasks and activities during its lifetime. A process engine is responsible for the invocation of a process instance, its state and life-cycle management. During execution a process instance maintains its state and life-cycle information in the runtime engine and process data structures.
The structure of the model and state of a business process model instances i.e. the process instance representing a business process context can be represented as a fact and the business process as a set of business rules linking the current state of a business process context to a possible future state, business processes can be executed on a complex event processing (CEP) engine like TIBCO BusinessEvents™. As an example, two independent online product orders that are destined for the same delivery address could be merged before shipping.
The relationships between multiple processes can be inferred using the contextual state and data exposed by the process as a “fact”. The process instance facts can be evaluated using rules in a rules/inference engine and the rules can be used to control and dynamically modify process execution patterns in contrast to a statically defined process execution model. The inference can be done on multiple executing processes without the relationship connections having been specified explicitly a priori, and the relationships allows the processes to be invoked, terminated, executed efficiently and accurately.
In various embodiments, the process is represented as fact in a rules engine execution context using domain specific language (DSL) constructs. The process meta-model is used as a data type in the user specified DSL where its attributes and verbs can be programmatically inferred and modified to suit business needs. The process fact can then be asserted to a Business Rules Engine and rules can infer process state and life-cycle data, process context data and make business decisions.
In various embodiments, the inter-process inference rules, which correlate multiple Process Facts, are dynamic in nature as they can be deployed on demand and the rules are capable of exercising a life-cycle control over executing process instances, which match the correlation. The dynamic deployment of a control mechanism over existing rules in a secure manner is made possible in various embodiments by JIT compilation 204. For example, if processes were to manage a chemical plant or a prison system, dynamic override control over processes can be used for ordered shutdown or lockdown purposes.
In various embodiments, the execution model states that the Rules and Facts are compiled to Java binary code 206 just before execution, as described above, thereby providing performance optimization, easy deployment, and versioning of process models, while multiple instances of process versions remain in execution pending their completion.
In various embodiments, JIT compilation of business process definition source code may be performed on a computer system or other node one or more key attributes may not be known at the time the business process definition source code is developed and/or deployed (e.g., to .ear or other archive, as shown in
In various embodiments, a hierarchical (e.g., Java package) namespace is used to implement the virtual file system 500 of
projectXML/src/com/company_domain_name/xml/ReadXML.java
namespace root folder=projectXML/src
package namespace=com.company_domain_name.xml
Inside the file ReadXML.java it will start with package com.company_domain_name.xml.
By using a Java or other package hierarchical namespace to identify a source file as stored in memory, source file objects may be provided directly to the in-memory compiler from locations in which such files are stored in memory, without using the file system of the computer or other system at which compilation is performed. Likewise, the in-memory compiler may be instructed to store class files provided by the in-memory compiler as output in a location identified using the same package namespace. In various embodiments, class files stored in memory may then be provided directly as input to a business process engine or other class loader, enabling instances of the business process to be created and run within the business process engine, e.g., as described above.
Using techniques disclosed herein, updated and/or new business process definitions may be created and deployed efficiently, using JIT compilation, including without limitation at compilation nodes the file system or other attributes of which may not be known at the time source code written to implement the new or updated business process definition is created and deployed.
Although the foregoing embodiments have been described in some detail for purposes of clarity of understanding, the invention is not limited to the details provided. There are many alternative ways of implementing the invention. The disclosed embodiments are illustrative and not restrictive.
This application claims priority to U.S. Provisional Patent Application No. 61/693,181 entitled JUST IN TIME COMPILATION (JIT) FOR BUSINESS PROCESS EXECUTION filed Aug. 24, 2012 which is incorporated herein by reference for all purposes.
Number | Name | Date | Kind |
---|---|---|---|
5937406 | Balabine | Aug 1999 | A |
6253369 | Cloud et al. | Jun 2001 | B1 |
6530075 | Beadle et al. | Mar 2003 | B1 |
7412399 | Racca et al. | Aug 2008 | B1 |
7613997 | Kaler | Nov 2009 | B2 |
7665080 | Spotwood | Feb 2010 | B2 |
7739316 | Thompson | Jun 2010 | B2 |
8601450 | Su | Dec 2013 | B2 |
20010011196 | Nagaoka | Aug 2001 | A1 |
20030177480 | Arkwright et al. | Sep 2003 | A1 |
20030208743 | Chong et al. | Nov 2003 | A1 |
20040078373 | Ghoneimy et al. | Apr 2004 | A1 |
20050044537 | Zatloukal | Feb 2005 | A1 |
20060010372 | Kaler | Jan 2006 | A1 |
20060074732 | Shukla et al. | Apr 2006 | A1 |
20060074733 | Shukla et al. | Apr 2006 | A1 |
20060184926 | Or et al. | Aug 2006 | A1 |
20070038697 | Zimran | Feb 2007 | A1 |
20070150329 | Brook | Jun 2007 | A1 |
20080120129 | Seubert et al. | May 2008 | A1 |
20080307392 | Racca et al. | Dec 2008 | A1 |
20090164985 | Balko et al. | Jun 2009 | A1 |
20090249312 | Liao | Oct 2009 | A1 |
20110088011 | Ouali | Apr 2011 | A1 |
20120060150 | Pechanec et al. | Mar 2012 | A1 |
20130041925 | Balko | Feb 2013 | A1 |
20130117064 | Sadeghi et al. | May 2013 | A1 |
Entry |
---|
Bloomfield, Aaron, Introduction to Compilation CS 415, Fall 2005. |
Collber, Christian, CSC 453: Compilers and Systems Software Department of Computer Science University of Arizona, 2009. |
Cramer, Timothy et al., Compiling Java Just in Time IEEE Micro, 1997. |
Chapter 3: Assembling and Deploying J2EE Applications Sun Microsystems, 2004. |
An Introduction to Java Class Loaders IndicThreads, Apr. 7, 2005. |
Friesen, Jeff, Java 101: Packages organize classes and interfaces JavaWorld, Sep. 6, 2002. |
Rouse, Margaret, What is just-in-time compiler (JIT)? WhatIs.com, Apr. 2005. |
Just-in-time compilation definition Wikipedia.org, Retrieved Aug. 18, 2015. |
Allen, Scott Authoring Workflows OdeToCode.com, Mar. 26, 2006. |
Williamson, Alan, Understanding the Java Classloading Mechanism Java Developers Journal, 2004. |
Pisupati, Bhanu N., A Virtual Filesystem Framework to Support Embedded Software Development Indiana University, Jun. 2007. |
Virtual File System definition Wikipedia.org, Retrieved Jan. 4, 2016. |
David J. Biesack, Create Dynamic Applications with Javax.tools, Dec. 11, 2007, pp. 1-10. |
Number | Date | Country | |
---|---|---|---|
61693181 | Aug 2012 | US |