Business Rules for Creating Process Flexibility ... - Springer Link

1 downloads 26371 Views 232KB Size Report
Business rules and software agents can be used for creating flexible ... example, organizations reacting on changing customer needs or implementing legal.
Business Rules for Creating Process Flexibility: Mapping RIF Rules and BDI Rules Yiwei Gong, Sietse Overbeek, and Marijn Janssen Faculty of Technology, Policy and Management, Delft University of Technology, Jaffalaan 5, 2628 BX Delft, The Netherlands {Y.Gong,S.J.Overbeek,M.F.W.H.A.Janssen}@tudelft.nl

Abstract. Business rules and software agents can be used for creating flexible business processes. The Rule Interchange Format (RIF) is a new W3C recommendation standard for exchanging rules among disparate systems. Yet, the impact that the introduction of RIF has on the design of flexible business processes is unclear. Intelligent software agents can be used to create dynamic business processes. The BDI architectural style is regarded as the predominant approach for the implementation of intelligent agents. It is expected that using RIF can enhance the reasoning capability of agents. Yet, these two developments are not connected. In this research, an approach is developed for integrating RIF and BDI agents. This approach consists of an integration architecture and equivalence principles for rule translation. The equivalence principles are demonstrated using examples. The results show that the approach allows the integration of RIF with BDI agent programming and in this way enhances agent reasoning capabilities. Keywords: Business Process Management, Business Rule, Flexibility, Agentbased Simulation, RIF, BDI, AgentSpeak.

1 Introduction The creation of flexible business processes has increasingly received attention by organizations to satisfy customer demands and to be able to react to the competitive environment [1]. A business process can be viewed as the time-dependent sequence of activities. Business process flexibility is viewed as the ability to adapt to changes. For example, organizations reacting on changing customer needs or implementing legal requirements need to adapt their processes accordingly. As this might occur frequently, organizations need to make sure that their business processes and supporting applications are flexible enough to adapt to changing situations. Yet, current BPM applications often include business process specifications in the context of web services composition in a Service-Oriented Architecture (SOA) environment, e.g. BPEL, and are not easy to change. Traditional BPM approaches use business process models as a kind of scheme to define the ‘recipe’ of a process execution [2]. In contrast, flexible business processes imply the real-time orchestration of web services in order to construct dynamic business processes. In this way, customized services can be delivered dynamically in an integrated and personalized manner [3]. Business D.K.W. Chiu et al. (Eds.): WISE 2010 Workshops, LNCS 6724, pp. 142–155, 2011. © Springer-Verlag Berlin Heidelberg 2011

Business Rules for Creating Process Flexibility: Mapping RIF Rules and BDI Rules

143

rules can be more easily changed than hard-coded processes and in this way create flexibility [4]. From an information system perspective, a business rule is a statement that defines or constrains some aspects of the business, and it is a directive intended to influence or guide business behaviour [20]. The current development of business rules standards enables describing them using semantic technology. Examples of those standards are the Semantics of Business Vocabulary and Business Rules (SBVR) and the Rule Interchange Format (RIF). The SBVR specification is published by the Object Management Group (OMG) for the documentation and interchange of business vocabularies and business rules among organizations and software tools [5]. RIF has become a World Wide Web Consortium (W3C) recommendation recently. It is a standard for exchanging rules among rule systems. As a new member in Semantic Web recommendation, a few implementations of RIF are still under development (c.f. [22]). It is still unclear how RIF impacts applications at the operation level. Further research on applying RIF in practice, such as BPM, will bring awareness of its advantage and usage. In the study to improve business processes, agent-based approaches has been used for a long time. Agent-based simulation is currently in widespread use to catch the behaviours of complex systems in which multiple entities are involved [6]. An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators. In artificial intelligence, an intelligent agent is an entity which can observe and act upon an environment and it directs its activity towards achieving goals [7]. Agents provide a way of structuring a complex system around autonomous, communicative components, and lead to the construction of software tools and infrastructures to support the design metaphor [8]. In current BPM research, agent-based simulation is employed for the creation of flexible business processes (c.f. [1, 9]). In agent research, the belief-desire-intention (BDI) architecture style is regarded as the predominant approach to the implementation of intelligent or rational agents [10]. There are many agent languages and tools supporting this architecture, e.g. PRS, dMARS, and AgentSpeak(L) (c.f. [11]). Comparing with other agent systems like JADE (Java Agent DEvelopment Framework), which has a strong capability in terms of inter-agent communication, BDI is a sound foundation for modelling intra-agent behaviours. Therefore it is more suitable for observing the impact of rule implementation on single agent behaviours and how this contributes to creating business processes. Nowadays the ideas for integrating Semantic Web and Agent Programming techniques are blooming up. The advantage is to allow the agent system to use existing resources (e.g. ontology) in Semantic Web. This integration refers to the interchange and use of rules to regulate the behaviours of agents or share knowledge among collaborating agents. Generally speaking, different rule systems use their own way to represent rules, and a translation component is required to share rule knowledge between two systems. Sharing of business rules will enable the reuse of business rules in different systems, in this way ensuring consistent use among diverse systems. Furthermore by retrieving business rules from a repository the actuality of the business rules can be ensured, as new versions and updates are automatically taken. For example, JASDL (Jason AgentSpeak–DescriptionLogic) is developed to integrate OWL and AgentSpeak [12]. Without a common rule interchange format, the rule

144

Y. Gong, S. Overbeek, and M. Janssen

interchanging between n systems might require n(n-1) translation components. In this case, the most obvious advantage of using RIF is that it only requires 2n translation components in total. Since RIF is a W3C recommended standard, it is widely accepted and compatible with other Semantic Web technologies. By combining Semantic Web and Agent Programming techniques, our expectation is that rules in RIF format can be translated into executable rules for BDI agents, and vice versa. In this way the facility of other semantic web technologies which are compatible with RIF, such as OWL and RDF, can be involved in agent-based simulation to enhance the intelligence of agents, like their reasoning capabilities and other advanced functions that are difficult to implement in software agents, like the versioning of rules. In this way RIF can be used as the intermediating language between Semantic Web languages and the BDI language. Subsequently, their impact on flexible business process construction can be observed. This idea is conceptualized in Fig. 1.

Fig. 1. The need for rule interchanging between RIF and BDI

In this paper we will explore an approach for the bilateral translation between RIF business rules and executable BDI rules. In the next section we will introduce the key areas of our approach. In Section 3 we will explain an integration architecture and the equivalence principles of translating RIF rules into BDI rules. Thereafter examples are provided to demonstrate the translation and the feasibility of the approach. Finally, conclusions are drawn and future research plans are discussed.

2 Background In this section the key elements contributing to our approach on translating RIF rules into BDI agent rules are explained. 2.1 BDI Architecture and AgentSpeak Language The BDI architecture is regarded as the predominant approach to the implementation of intelligent or rational agents [10]. As its name suggests, it contain the following main components: Beliefs - the agent’s knowledge about the world; Desires - the objectives to be accomplished; and Intentions - the courses of actions currently under execution to achieve the agent’s desires. AgentSpeak is an agent-oriented programming language based on logic programming, and inspired by the work on the BDI architecture [13]. Although a few other agent languages are also based on BDI, the

Business Rules for Creating Process Flexibility: Mapping RIF Rules and BDI Rules

145

choice of AgentSpeak is based on its very neat and elegant notations, and it complies better to the BDI architecture than other BDI-inspired programming languages [14]. Jason is an interpreter for an extended version of AgentSpeak. Jason implements the operational semantics of the AgentSpeak language, and provides a platform for the development of multi-agent systems with many user-customisable features [21]. We have employed the AgentSpeak language to present BDI. Due to space limitations, we only briefly introduce basic terms and formulas of AgentSpeak. For more details concerning the syntax and semantics of AgentSpeak, we refer to Moreira and Bordini’s work [15]. Terms in AgentSpeak (Jason implementation) include: constant, variable and structure. Under the type of structure, list is a special form. Those concepts are very common in logic programming. An AgentSpeak agent is simply a specification containing a set of beliefs and a set of plans. A belief is an atomic (at) formula without variables (ground formula). The atomic formulas of the language are predicates given by the grammar in (2), where P is a predicate symbol and t1, ..., tn are standard terms of first-order logic. The agent has an initial belief about the environment where it is situated. When the environment changes, the set of beliefs changes accordingly. This involves events which can trigger the execution of plans. A plan (p) contains a triggering event (te), a context (ct) which is about the conditions that have to be hold for the plan to be applicable, and a sequence h of actions (a), goals (g) and updating of beliefs (u) to be executed. The syntax of AgentSpeak is given as the following list. agent ::= beliefs plans at ::= P(t1, ..., tn)

(n≥0)

(1) (2)

beliefs ::= at1, ..., atn (n≥0)

(3)

plans ::= p1 … pn (n≥1)

(4)

p ::= te : ct ← h

(5)

h ::= a | g | u | h ; h

(6)

A triggering event can be the addition or deletion of a belief, otherwise the addition or deletion of a goal. A goal can be an achievement goal (!at), which has to do with the execution of sub-plans, or a test goal (?ct) which is used to instantiate variables from unification with current beliefs of the agent when the plan is being executed. te ::= +at | -at | +g | -g

(7)

g ::= !at | ?ct

(8)

u ::= +at | -at

(9)

2.2 Rules and RIF In the BPM domain, two dominant approaches can be observed: one based on graphical models, and the other based on rule specifications. Generally, the rule-based

146

Y. Gong, S. Overbeek, and M. Janssen

approach provides more flexibility to deal with changes in the environment [9]. In a classical rule-based approach, the logic of a process is represented by a set of rules, which are associated with business activities and specify the properties of the process, e.g. the preconditions of its execution. Generally, rules can be classified as three types: deductive rules (or derivation rules), normative rules (or integrity rules), and reactive rules (or active rules) [16]. Deductive rules are used to derive implicit facts. Normative rules pose constraints on the data or on the business logic and are rules of the form "it must be true that ...". Reactive rules are further subdivided into event-condition-action (ECA) rules and production rules. ECA rules are rules of the form “ON Event IF Condition DO Action”. Production rules are rules of the form “IF Condition DO Action”. RIF aims to become a standard for exchanging rules among disparate systems, especially on the Semantic Web. Due to the great diversity of rule languages, there is not an all-in-one language to bridge them all. To make it feasible, the RIF Working Group designed a family of languages, called dialects, with rigorously specified syntax and semantics. Central to the idea behind rule exchange through RIF is that “different systems will provide syntactic mappings from their native languages to RIF dialects and back” [23]. Consequently, these mappings are required to be “semanticspreserving”, and rule sets can be communicated between systems with a precondition that the systems can talk through a suitable dialect, which they both support. The current RIF standard is focused on two kinds of dialects: logic-based dialects and dialects for rules with actions. Generally, logic-based dialects include languages based on first-order logic (often restricted to Horn logic [17]) and also non-first-order logics underlying the various logic programming languages, e.g. stable model semantics [18]. The rules-with-actions dialects are designed for production rule systems, such as Jess, Drools and JRules, as well as for reactive (or ECA) rules [23]. Accordingly, there are two logic dialects: Basic Logic Dialect (RIF-BLD) [24] and Production Rule Dialect (RIF-PRD) [27]. Besides that, there is a subset, the RIF Core Dialect [25], shared by them. And above all, an extensibility framework, called the Framework for Logic Dialects (RIF-FLD) [26] has been developed. The family of RIF dialects is showed by a Venn diagram in Fig. 2.

Fig. 2. A Venn diagram of the RIF dialects family

From a theoretical perspective, RIF-BLD corresponds to the definite Horn rules language with equality and standard first-order semantics [24]. The compatibility of RIF-BLD/RDF and RIF-BLD/OWL languages makes RIF-BLD a Web-aware

Business Rules for Creating Process Flexibility: Mapping RIF Rules and BDI Rules

147

language. Thus, RIF-BLD is essential in integrating Sematic Web and an Agent Programming Technique. However, the rules in the agent plans which the agent uses to react to its environment are production rules. Therefore, RIF-PRD is also needed. The necessity of both RIF-BLD and RIF-PRD in integrating Sematic Web and an Agent Programming Technique leads us to RIF-Core. RIF-Core is intended to be the common core of all RIF dialects. It has been designed to be a useful common subset of RIF-BLD and RIF-PRD. In the RIF-Core syntax, terms can be defined as the following: (The phrase base term refers to a simple or positional term, or terms of the form External(t), where t is a positional term) 1. Constants and variables: if t Const or t Var then t is a simple term 2. Positional terms: if t Const and t1, ..., tn, n≥0, are base terms then t(t1, ..., tn) is a positional term. (Positional terms correspond to the usual terms and atomic formulas of classical first-order logic.) 3. List term: a closed ground list has the form List(t1, ..., tm), where m≥0 and t1, ..., tm are ground terms (no tail and no variable). 4. Equality terms: has the form t = s, if t and s are base terms. 5. Class membership terms: has the form t#s, if t and s are base terms. 6. Frame terms: t[p1→ v1 ... pn→vn] is a frame term if t, p1, ..., pn, v1, ..., vn, n≥0, are base terms. The term t is the object of the frame; the pi are the property or attribute names; and the vi are the property or attribute values. 7. Externally defined terms: if t is a positional term then External(t) is an externally defined term.







Based on the terms described above, the definition of main formulas in RIF-Core can be given as the following: Definition 1. Any positional term of the form p(...), where p is a predicate symbol, is an atomic formula. Equality, membership, and frame terms, as well as an externally defined term of the form External(φ), where φ is an atomic formula, are also atomic formulas. Definition 2. A formula can have several different forms and is defined as follows: Atomic: If φ is an atomic formula then it is also a formula A condition formula: either an atomic formula or a formula that has one of the following forms: • Conjunction: If φ1, ..., φn, n≥0, are condition formulas then so is And(φ1 ... φn). • Disjunction: If φ1, ..., φn, n≥0, are condition formulas then so is Or(φ1 ... φn). • Existentials: If φ is a condition formula and ?V1, ..., ?Vn, n>0, are distinct variables then Exists ?V1 ... ?Vn(φ) is an existential formula. 3. Rule implication: φ :- ψ is a rule implication if: • φ is an atomic formula or a conjunction of atomic formulas, • ψ is a condition formula, and • none of the atomic formulas in φ is an externally defined term. 4. Universal rule: If φ is a rule implication and ?V1, ..., ?Vn, n>0, are distinct variables then Forall ? V1, ..., ?Vn (φ) is a formula called a universal rule. 1. 2.

148

5.

6.

Y. Gong, S. Overbeek, and M. Janssen

Universal fact: If φ is an atomic formula and ?V1, ..., ?Vn, n>0, are distinct variables then Forall ? V1, ..., ?Vn (φ) is a formula, called a universal fact. Universal facts are often considered to be rules without premises. Group: If φ1, ..., φn are RIF-Core rules, universal facts, variable-free rule implications, variable-free atomic formulas, or group formulas then Group(φ1, ..., φn) is a group formula.

We consider that the normative (mathematical) presentation of RIF-Core in W3C’s recommendation is not strict, as the description of RIF-Core is based on exclusion of components in RIF-BLD and RIF-PRD Syntax. Thus, RIF-Core is explained as two specializations instead of a whole and well defined presentation language. W3C also comments that the presentation syntax is not intended to be a concrete syntax for RIFCore [25]. The above lists of terms and formulas are an incomplete summarization of RIF-Core Syntax. The excluded formulas, such as document formulas, are less related with condition rules. It is notable that similar notations that are defined as terms in RIF-BLD are defined as formulas in RIF-PRD. Since they are all involved in the RIFCore, we did not clearly distinguish terms from formulas. Production rules have a ‘condition’ part, and an ‘action’ part. The condition rules are covered by RIF-Core and its extension RIF-BLD. The action part, which is essential in agent planning, is, however, not contained in RIF-Core. An action can assert facts, modify facts, and retract facts. In general, an action is different from the conclusion of a logic rule, which contains only a logical statement. The conclusion of rules interchanged using RIF-Core can be interpreted, according to RIF-PRD operational semantics, as actions that assert facts in the knowledge base. We consider that the other way around is not valid. Therefore, our discussion should not be limited to the RIF-Core language, but also concern RIF-PRD with a focus on action rules. Actions in RIF-PRD include atomic actions or compound actions. An atomic action is a construct that represents an atomic transaction in the following forms: 1. 2. 3. 4. 5.

Assert fact: If φ is a positional atom, a frame or a membership atomic formula in the RIF-PRD condition language, then Assert(φ) is an atomic action. Retract fact: If φ is a positional atom or a frame in the RIF-PRD condition language, then Retract(φ) is an atomic action. Retract all slot values: If o and s are terms in the RIF-PRD condition language, then Retract(o s) is an atomic action. Retract object: If t is a term in the RIF-PRD condition language, then Retract(t) is an atomic action. t is called the target of the action. Execute: if φ is a positional atom in the RIF-PRD condition language, then Execute(φ) is an atomic action.

A compound action is a construct that can be replaced equivalently by a pre-defined, and fixed, sequence of atomic actions. There is only one compound action in RIFPRD, which is defined as follows: 1.

Modify fact: if φ is a frame in the RIF-PRD condition language: φ = o[s→v]; then Modify(φ) is a compound action, defined by the sequence: Retract(o s) and Assert(φ).

Business Rules for Creating Process Flexibility: Mapping RIF Rules and BDI Rules

149

The advantage of integrating Semantic Web and Agent Programming technology is to allow the agent system to use existing resources in Semantic Web. RIF is a facilitator of such an integration as it functions as a standard in knowledge interchange. Concerning the translation between RIF and a BDI style language, like AgentSpeak, there are several issues that need to be addressed, which is dealt with in the next section.

3 Integrating RIF Rules and BDI Agent Programming For integrating RIF and BDI agent programming we will take three steps. First of all, it must be identified from a semantic perspective, what corresponding context should be translated between two systems. Then, it is necessary to distinguish the directions of the translation: which is translated from which system to which. Finally, from a syntactical perspective it should be determined whether such a translation is feasible and which limitations or preconditions exist. The starting point to investigate this is the basic agent model provided by AgentSpeak. In the AgentSpeak language an agent contains a set of beliefs and a set of plans. In the interaction with the environment, the agent will sense changes in the environment and update its base of belief. Then, an appropriate plan is determined from its plan depository via reasoning. Actions will subsequently be carried out according to the selected plan. The action will impact the environment and will result in further interaction between the agent and the environment. By the combination with Semantic Web technology, the reasoning will not be just limited inside the agent, but it is also possible to be done by external components. On the one hand, just like doing the reasoning internally, the perception of the environment needs to be transferred to the component which performs the reasoning functions. Therefore, the agent’s beliefs are the target information in translation. On the other hand, the result of reasoning should be carried out by the agent itself. Agents will behave according to their plans. Therefore, the plans of an agent are another target of the translation. Through the above analysis, the direction of the translation can also be distinguished as agent beliefs that should be translated into RIF facts, while RIF rules should be translated into agent plans. The cycle of external reasoning with the direction of translation is conceptualized as an architecture in Fig. 3. Based on certain technology which is compatible with RIF, the cycle can be extended.

Fig. 3. RIF and agent integration architecture

150

Y. Gong, S. Overbeek, and M. Janssen

For the final step, we mapped the AgentSpeak syntax to the RIF syntax. We use a logic symbol : ⇔ (logical equivalence) to represent equivalence of the two syntaxes. So, if p: ⇔ q, it means presentation p is functionally equivalent to presentation q. We put RIF syntax which is introduced in section 2.2 on the left of the equivalence, and AgentSpeak syntax which is introduced in section 2.1 on the right. This results in the following list of equivalence principles to facilitate the translation: t

∈ Const : ⇔ x ∈ constant t ∈ Var : ⇔ x ∈ variable

t(t1, ..., tn) : ⇔ at ::= P(t1, ..., tn)

(n≥0)

List(t1, ..., tn) : ⇔ list(t1, ..., tn)

(n≥0)

t = s : ⇔ t == s And(φ1 ... φn) : ⇔ φ1 & φ2&... &φn (n≥0) Or(φ1 ... φn) : ⇔ φ1 | φ2|... |φn (n≥0) Exists ?V1 ... ?Vn(φ) : ⇔ ?ct Group(φ1, ..., φn) : ⇔ at|ct φ :- ψ : ⇔ ct Forall ? V1, ..., ?Vn (φ) : ⇔ ct t[p1→ v1 ... pn→vn] : ⇔ t(p1(v1)... pn(vn)) Assert(φ) : ⇔ +at Retract(φ) : ⇔ -at Execute(φ) : ⇔ a Modify(φ) : ⇔ u These equivalence principles show that many of the terms and formulas can be matched between RIF and AgentSpeak. Nevertheless, some formulas in RIF are not applicable in AgentSpeak. For example, membership terms (and also subclass terms, which are excluded in RIF-Core but used in both RIF-BLD and RIF-PRD) are used to describe objects and class hierarchies. AgentSpeak is not object-oriented, thus those terms are out of scope in the mapping. At the same time, it can be concluded that RIFBLD is extensible. It might not be able to translate all syntax into the AgentSpeak language. Therefore, focusing on RIF-Core is reasonable.

Business Rules for Creating Process Flexibility: Mapping RIF Rules and BDI Rules

151

The limitations of such an approach are also obvious. Firstly, agent behaviours contain operations, such as sending messages, that go beyond logical reasoning. The integration with the RIF standard can be considered as an enhancement of reasoning capabilities but not a replacement of agent actions. Secondly, the compatibility between the systems requires a more elaborated evaluation. As RIF is extensible, there is no guarantee that future extensions are compatible with BDI agents. Last but not least, the RIF dialects have differences in syntax and applications. Selecting which dialect to use for the integration requires further consideration of the pros and cons. For example, agents can use negation logic for their beliefs. RIF-PRD supports negation, but RIF-Core does not. However, RIF-Core holds the connection with RIF-BLD and might provide better compatibility with other Semantic Web technologies (currently, the interoperability with RDF, RDFS and OWL is provided).

4 Rule Translation Illustrations In order to demonstrate the feasibility of the rule translation, in this section we will use examples of RIF presentations provided by W3C recommendation documents. Those examples refer to RIF-Core, RIF-BLD and RIF-PRD respectively. The examples will be translated into the AgentSpeak language (Jason implementation) based on the equivalence principles presented in the previous chapter. The first example is using RIF-Core syntax to present the interactions between a book seller and a buyer (c.f. [25]). This example provides a reasoning to derive the buy relationship from the sell relationship. In natural language, it can be represented as “a buyer buys an item from a seller if the seller sells the item to the buyer”. Moreover, this example includes a fact that “John sells LeRif to Mary”. The two phrases can be represented in RIF-Core presentation syntax as follows. Document( Prefix(cpt ) Prefix(ppl ) Prefix(bks ) Group ( Forall ?Buyer ?Item ?Seller ( cpt:buy(?Buyer ?Item ?Seller) :cpt:sell(?Seller ?Item ?Buyer) ) cpt:sell(ppl:John bks:LeRif ppl:Mary) )) In this example, “?Buyer”, “?Item” and “?Seller” are variables and “John”, “LeRif” and “Mary” are constants, while “sell” and “buy” are predicates. At the beginning of the example, There are three shorthand notations for internationalized resource identifiers (IRIs) obtained by concatenation of the prefix definition and suffix. For example, if bks is a prefix that expands into http://example.com/books# then bks:LeRif is an abbreviation for "http://example.com/books#LeRif"^^rif:iri. A limitation is that document formulas cannot be translated into the AgentSpeak language, because the

152

Y. Gong, S. Overbeek, and M. Janssen

RIF document format is meaningless for the AgentSpeak language. The AgentSpeak representation of this example is given as follows: buy(Buyer, Item, Seller) :- sell(Seller, Item, Buyer) +sell(john, lerif, mary) From this example, we can observe that the format related syntax (e.g. Document formula) and also set related syntax (e.g. Group formula), are hardly consistent with other content after translation, as no comparable syntax can be found in the AgentSpeak language. The missing of a RIF document and a group element is not harmful for the AgentSpeak agent since they are not required by an agent implementation. However, if the translation direction is the other way around, namely from AgentSpeak to RIF, the complementarity of the missing elements is important. Some elements, such as IRI is an integral part of RIF. Therefore, when translating agent beliefs into RIF facts, missing syntax should be complemented. A potential solution of this problem is building namespace management into Jason [19]. In this way, Jason can have a syntax comparable with the Document syntax in RIF. The second example shows a business rule that “if an item is perishable and it is delivered to John more than 10 days after the scheduled delivery date then the item will be rejected by him” (c.f. [24]). For space reasons, we will skip the document syntax, as it has been explained in the first example. Its RIF-BLD representation is given as follows. Forall ?item ?deliverydate ?scheduledate ?diffduration ?diffdays( cpt:reject( ?item) :And(cpt:perishable(?item) cpt:delivered(?item ?deliverydate ) cpt:scheduled(?item ?scheduledate) ?diffduration = External(func:subtractdateTimes(?deliverydate ?scheduledate)) ?diffdays = External(func:days-fromduration(?diffduration)) External(pred:numeric-greater-than(?diffdays 10))) ) The AgentSpeak presentation of this example is: reject(john, Item) :perishable(Item) & delivered(Item, Deliverydate)& scheduled(Item, Scheduledate)& Diffduration = subtract-dateTimes(Deliverydate, Scheduledate)& Diffdays = days-from-duration(Diffduration)& numeric-greater-than(Diffdays, 10). ... import jason.asSyntax.*; public class DeliveryEnvir extends jason.environment.Environment {

Business Rules for Creating Process Flexibility: Mapping RIF Rules and BDI Rules

153

Literal x = Literal.parseLiteral("subtractdateTimes(deliverydate, scheduledate)"); Literal y = Literal.parseLiteral("days-fromduration (diffduration)"); Literal z = Literal.parseLiteral("numeric-greaterthan (source,target)"); Public void init(String[] args){ addPercept(x); addPercept(y); addPercept(z); } } ... In the translation of this example, we consider the environment functions, which are external to the AgentSpeak agent but can be perceived by the agent, as the target when translating the External formula in RIF. In the third example, we focus on action rules in RIF-PRD. The context of this example can be found in [27]. As Modify action is a compound of the Assert and Retract actions, we only introduce a segment which contains Assert, Retract and Execute actions. The RIF-PRD presentation is given as follows: Assert(?customer[ex1:voucher->?voucher]) Retract(?customer ex1:voucher) Execute(act:print("Hello, world!")) The translation of action rules to AgentSpeak is significantly easier, as they have higher comparability. The AgentSpeak presentation is given as follows. +customer(ex1voucher(Voucher)) -customer(ex1voucher(_)) .print("Hello, world!") In the translation, the format like “ex1:voucher” is not acceptable for AgentSpeak grammar, and therefore the colon is removed. The three illustrations demonstrate the translation from RIF-Core, RIF-BLD and RIF-PRD representations to AgentSpeak language. They reveal the feasibility of integrating RIF dialects and BDI agent programming. Therefore, RIF can be used as the intermediating language between Semantic Web languages and the BDI language.

5 Conclusions and Future Research This paper presented the results of ongoing research on integrating RIF rules in BDI agents. An approach for integrating RIF and BDI agent programming was presented. This approach consists of an architecture and equivalence principles for rule translation. Three illustrations are provided to demonstrate the feasibility of rule translation. The results indicate that large parts of RIF and BDI syntaxes are similar, however, it also shows that complete translation is often not possible as both languages have different syntactical elements. The integration is expected to enhance the

154

Y. Gong, S. Overbeek, and M. Janssen

reasoning capability by using existing resources in RIF compatible technologies. However, both systems are complicated and not all the terms and formulas can be translated in a straightforward manner. Therefore, an elaborated translation approach with precise syntax translation which complements the missing parts is required. In further research, we will involve OWL technology into the software agents via RIF as an intermediate. Ontology models related to Dutch migration law and regulations will be built, and the ontology will be represented using OWL. Based on a case study, agent simulations will be employed to simulate different scenarios. The agent’s capability of reasoning is expected to be enhanced by using the ontology models. In this manner it becomes possible to derive rules from law and regulations. In case the law is changed, new rules can be derived easily from the new law and therefore it brings higher flexibility to business processes. Acknowledgement. This work is supported by AGILE project (Advanced Governance of Information services through Legal Engineering, detail can be found on the web page http://www.jacquard.nl/?m=426).

References 1. Gong, Y., Janssen, M.: Agent-Based Simulation for Evaluating Flexible and Agile Business Processes: Separating Knowledge Rules, Process Rules and Information Resources. In: Barjis, J. (ed.) EOMAS 2010. Lecture Notes in Business Information Processing, vol. 63, pp. 41–58. Springer, Heidelberg (2010) 2. Pesic, M., van der Aalst, W.M.P.: A Declarative Approach for Flexible Business Processes Management. In: Eder, J., Dustdar, S. (eds.) BPM Workshops 2006. LNCS, vol. 4103, pp. 169–180. Springer, Heidelberg (2006) 3. Overbeek, S., Klievink, B., Janssen, M.: A Flexible, Event-Driven, Service-Oriented Architecture for Orchestrating Service Delivery. IEEE Intelligent Systems 24, 31–41 (2009) 4. Orriëns, B., Yang, J., Papazoglou, M.P.: A Framework for Business Rule Driven Web Service Composition. In: Jeusfeld, M.A., Pastor, Ó. (eds.) ER Workshops 2003. LNCS, vol. 2814, pp. 52–64. Springer, Heidelberg (2003) 5. OMG: Semantics of Business Vocabulary and Business Rules (SBVR), v1.0. Object Management Group (2008) 6. Janssen, M., Verbraeck, A.: An Agent-based Simulation Testbed for Evaluating Internetbased Matching Mechanisms. Simulation Modelling Practice and Theory 13, 371–388 (2005) 7. Russell, S.J., Norvig, P.: Artificial Intelligence: A Modern Approach. Prentice Hall, Upper Saddle River (2003) 8. Luck, M., McBurney, P., Shehory, O., Willmott, S.: Agent Technology: Computing as Interaction (A Roadmap for Agent Based Computing). AgentLink (2005) 9. Lu, R., Sadiq, W.: A Survey of Comparative Business Process Modeling Approaches. In: Abramowicz, W. (ed.) BIS 2007. LNCS, vol. 4439, pp. 82–94. Springer, Heidelberg (2007) 10. Wooldridge, M.: Reasoning about Rational Agents. The MIT Press, Cambridge (2000) 11. Mascardi, V., Demergasso, D., Ancona, D.: Languages for Programming BDI-style Agents: an Overview. In: Corradini, F., De Paoli, F., Merelli, E., Omicini, A. (eds.) 6th AI*IA/TABOO Joint Workshop “From Objects to Agents”: Simulation and Formal Analysis of Complex Systems, pp. 9–15. Pitagora Editrice Bologna (2005)

Business Rules for Creating Process Flexibility: Mapping RIF Rules and BDI Rules

155

12. Klapiscak, T., Bordini, R.H.: JASDL: A Practical Programming Approach Combining Agent and Semantic Web Technologies. In: Baldoni, M., Son, T.C., van Riemsdijk, M.B., Winikoff, M. (eds.) DALT 2008. LNCS (LNAI), vol. 5397, pp. 91–110. Springer, Heidelberg (2009) 13. Bordini, R.H., Hübner, J.F.: BDI Agent Programming in AgentSpeak Using Jason (Tutorial Paper). In: Toni, F., Torroni, P. (eds.) CLIMA 2005. LNCS (LNAI), vol. 3900, pp. 143– 164. Springer, Heidelberg (2006) 14. Bordini, R.H., Moreira, Á.F.: Proving the Asymmetry Thesis Principles for a BDI AgentOriented Programming Language. Electronic Notes in Theoretical Computer Science 70, 108–125 (2002) 15. Moreira, Á.F., Bordini, R.H.: An Operational Semantics for a BDI Agent-Oriented Programming Language. In: Proceedings of the Workshop on Logics for Agent-Based Systems (LABS 2002), held in conjunction with the Eighth International Conference on Principles of Knowledge Representation and Reasoning (KR 2002), Toulouse, France, pp. 45– 59 (2002) 16. Hu, Y.-J., Yeh, C.-L., Laun, W.: Challenges for Rule Systems on the Web. In: Governatori, G., Hall, J., Paschke, A. (eds.) RuleML 2009. LNCS, vol. 5858, pp. 4–16. Springer, Heidelberg (2009) 17. Horn, A.: On Sentences Which are True of Direct Unions of Algebras. The Journal of Symbolic Logic 16, 14–21 (1951) 18. Niemelä, I.: Logic programs with stable model semantics as a constraint programming paradigm. Annals of Mathematics and Artificial Intelligence 25, 241–273 (1999) 19. Madden, N., Logan, B.: Modularity and compositionality in Jason. In: Braubach, L., Briot, J.-P., Thangarajah, J. (eds.) ProMAS 2009. LNCS, vol. 5919, pp. 237–253. Springer, Heidelberg (2010) 20. Ross, R.G.: Principles of the Business Rule Approach. Addison-Wesley Professional, Reading (2003) 21. Hübner, J.F., Bordini, R.H.: Jason Home page (2009), http://jason.sourceforge.net/JasonWebSite/Jason%20Home.php 22. W3C: Implementations - RIF. World Wide Web Consortium (2010), http://www.w3.org/2005/rules/wiki/Implementations 23. W3C: RIF Overview (W3C Working Group Note 22 June 2010). World Wide Web Consortium (2010), http://www.w3.org/TR/2010/NOTE-rif-overview-20100622/ 24. W3C: RIF Basic Logic Dialect (W3C Proposed Recommendation 22 June 2010). World Wide Web Consortium (2010), http://www.w3.org/TR/2010/REC-rif-bld-20100622/ 25. W3C: RIF Core Dialect (W3C Proposed Recommendation 22 June 2010). World Wide Web Consortium (2010), http://www.w3.org/TR/2010/REC-rif-core-20100622/ 26. W3C: RIF Framework for Logic Dialects (W3C Proposed Recommendation 22 June 2010). World Wide Web Consortium (2010), http://www.w3.org/TR/2010/REC-rif-fld-20100622/ 27. W3C: RIF Production Rule Dialect (W3C Proposed Recommendation 22 June 2010). World Wide Web Consortium (2010), http://www.w3.org/TR/2010/REC-rif-prd-20100622/

Suggest Documents