Business Rules and Agent-Based Business Process Simulation
Gerd Wagner
Brandenburg University of Technology at Cottbus, Germany
This Talk Is about Three Topics
- Business Processes
- Agent-Based Discrete Event Simulation
- Business Rules and Simulation (work in progress)
What Is a Business Process? (Classical Def.)
- A specific ordering of work activities
across time and space, with a beginning
and an end, and clearly defined inputs
and outputs (Davenport 1993)
- A collection of activities that takes one or more kinds of input
and creates an output that is of value to the customer (Hammer & Champy 1993)
What's Wrong with These Definitions?
- A specific ordering of work activities
across time and space, with a beginning and an end, and clearly defined
inputs and outputs (Davenport 1993)
- A collection of activities that takes one or more kinds of input and creates an output
that is of value to the customer
(Hammer & Champy 1993)
- Too incomplete:
- No distinction between process (instance) and process type
- ordering is not sufficient for defining a business process type,
rather one needs AND/XOR/OR branching and merging
- Too vague:
- What are inputs and outputs?
- What is the value to the customer?
- Too specific:
- Do all business process types specify an end?
- Do all business processes have a customer?
What is a Business Process? (My Definition)
- business process: social interaction process
that occurs in the context of a business system (organization) and serves a purpose of that system.
Examples: a football game; a Web shop purchase
- social interaction process: interaction process
that includes at least one communicative action event. Examples: a conversation; a
birthday party; the Second World War; a football game; a Web shop purchase.
- interaction process: process that includes
at least one perception event and one action event
perceived and performed by agents that participate in it.
Examples: someone turning on the light in the office when it becomes dark outside; a conversation;
a birthday party; the Second World War; a football game; a Web shop purchase.
What is a Process?
- process: complex event that is composed
of other events by means of event composition operators.
- Examples:
- a parallel occurrence of two explosions;
- a heart attack;
- a conversation;
- a birthday party;
- the Second World War;
- a football game;
- a Web shop purchase
Observations
- There are many different kinds of processes: physical, chemical, biological, social, ...
- All processes are based on events
- Business processes are based on agents and their
perception events (including incoming messages)
and action events (including outgoing messages)
What is BP Simulation Good For?
- For analyzing business process models with respect to performance metrics at design time
- For evaluating short-term options how to adjust a running business process in response to
unforeseen circumstances (operational decision support at run time)
Agent-Based
Discrete Event Simulation
Discrete Event Systems
A discrete event system is a dynamic system consisting of
objects (of various types) whose states may be changed by
events (of various types) occurring at successive points
in time (from a a discrete set).
For modeling such a system:
- Describe its object types
- Describe its event types
- Specify the state changes of objects when events occur (which objects
are affected in which way by the occurrence of an event).
Example: A Drive-Thru Restaurant
- As a car enters from the street, the driver, who we will call Fred, decides whether or not to get in line
- If Fred decides to leave the restaurant, he leaves as a dissatisfied customer.
- If Fred decides to get in line, then he waits until the menu board is available.
- At that time, Fred gives the order to the order taker. After the order is taken, then two things occur simultaneously:
- Fred moves forward if there is room, otherwise he has to wait at the menu board until there is room to move forward.
- The order is sent electronically back to the kitchen where it is prepared as soon as the cook is available.
- As soon as Fred reaches the pickup window, then he pays and picks up his food, if it is ready.
- If the food is not ready, then Fred has to wait until his order is prepared.
A Drive-Thru Restaurant as a basic DES
Possible object types to model:
- Customer, Order
- MenuBoard, MenuBoardWaitingLine
- PickupWindow, PickupWindowWaitingLine
Possible event types to model:
- CustomerArrival
- StartMenuBoardService, EndMenuBoardService, EndKitchenService
- StartPickupWindowService, EndPickupWindowService
Multi-Agent Systems (MAS)
A multi-agent system is a dynamic system where special objects, called 'agents',
interact
- with each other via communication
- with their environment via perception and (state-changing)
actions
Examples:
- All kinds of systems the dynamics of which is based on human actions:
universities, hospitals, manufacturing plants, economic systems, ...
- Eco-systems
- Fish swarms, ant colonies, ...
A Drive-Thru Restaurant as a MAS (1)
Possible (non-agentive) object types to model:
MenuBoardWaitingLine, PickupWindowWaitingLine
Possible agent types to model:
Customer,
MenuBoard, PickupWindow
Possible message types to model:
Order, ConfirmOrder, Bill
A Drive-Thru Restaurant as a MAS (2)
Possible action event types to model:
Order-Out-MessageEvent, Bill-Out-MessageEvent,
PaymentActionEvent
Possible perception event types to model:
Order-In-MessageEvent, Bill-In-MessageEvent
PaymentPerceptionEvent
Application Areas for Agent-Based DES
- Management science:
enterprise models, managment games, ...
- Economics:
market models (stock market, labor market, etc.)
- Social science:
evolution of language, norms, ...
- Engineering:
socio-technical systems such as material handling systems (AGVs) and traffic systems
- Biology:
population dynamics, eco-systems, evolution, ...
AOR Modeling and Simulation
- Agent Object Relationship Modeling is a refinement of
Entity Relationship Modeling
- An entity may be a passive object or
an interactive agent (or a message or an event)
- AOR Simulation is an agent-based discrete event simulation approach
- Visit the project website: www.AOR-Simulation.org
The AOR Simulation Language (AORSL)
- Is based on the AOR Simulation metamodel, a UML/MOF model
defining its abstract syntax
- Has an XML syntax, which includes opaque expressions (e.g. Java expressions)
- Is using rules for modeling causality and agent behavior
Simulation Scenarios and Simulation Models
- A simulation scenario consists of a
- simulation model,
- an initial state definition, and
- zero or more view definitions (for visualization).
- A simulation model consists of:
- an optional space model (needed for physical objects/agents);
- a set of entity type definitions, including different categories of event,
message, object and agent types; and
- a set of environment rules, which define causality laws
governing the environment's state changes and the causation of events.
The AOR Simulator Architecture
An AOR simulator consists of
- an environment simulator, which creates perception events and passes them
to the agent simulators concerned
- zero or more agent simulators, which process any perception events
received and, in response, create action events that are passed back to the environment simulator
Running an AOR Simulation Scenario
- Validate your AORSL file
- Generate Java code
- Compile the Java code
- Run the resulting Java program
- Evaluate the statistics and/or the simulation log
Basic DES with AORSL
AORSL supports basic DES without agents by defining
- Object types for abstract objects in time
- Physical object types for objects in space and time
- Exogenous event types with some random occurrence periodicity
- Caused event types for events that are caused by other events
A Basic DES Model for a Drive-Thru Restaurant
- Four object types:
Customer, Order, MenuBoard,
PickupWindow
- One exogenous event type:
CustomerArrival
- Five caused event types:
StartMenuBoardService, EndMenuBoardService,
EndKitchenService, StartPickupWindowService, EndPickupWindowService
- Nine simulation rules:
CustomerArrivalWhenQueueFull_Rule,
CustomerArrivalWhenQueueNotFull_Rule, StartMenuBoardService_Rule,
EndMenuBoardServiceWhenPickupWindowQueueNotFull_Rule,
...
Rules (1)
An environment rule is a 5-tuple < EvtExpr, Var, Cond,
UpdExpr, ResEvt > where
- EvtExpr is an event expression specifying the type of event that triggers the rule
- Var is a set of variable declarations, such that each variable is bound either to a specific
object or to a set of objects
- Cond is a logical condition formula possibly containing variables
- UpdExpr is an expression specifying an update of the state
- ResEvt is a list of resulting events, which will be created when the rule is fired
Rules (2)
A rule < EvtExpr, Var, Cond, UpdExpr, ResEvt > can also be stated in the following
form:
ON EvtExpr
FOR Var
IF Cond
THEN
UPDATE UpdExpr
SCHEDULE-EVENT ResEvt
Operational Semantics
A simulation step s = 1, 2, … of a DES system with state < S, FEvt, s >
and environment rule set R consists of three sub-steps:
- Determine the set of current events:
FEvts = { e ∈ FEvt | occTime(e) = s }
- Apply the rules triggered by the current events, resulting in an updated state S'
and an updated future events list FEvt'
- Increment the simulation step (or time) counter
Agent-Based DES with AORSL
For an agent-based model we have to define
- (Possibly physical) agent types
- Message types
- Perception event types
- Action event types
Why should We Want to Make Agent-Based Models?
- Agent-based models are (much) more complex
- But:
- They allow to capture more of the structure of a business process (e.g. BPMN "pools"),
leading to closer-to-reality models
- They allow modeling cognitive and social phenomena
Agent Types
An agent type is defined by
- a set of (objective) properties;
- a set of (subjective) self-belief properties;
- a set of (subjective) belief entity types; and
- a set of agent rules, which define the agent's reactive behavior in response to events
Agent-Related Events
Agent Types
For a cognitive agent type we may specify:
- Belief entity types (defined by means of belief properties)
for expressing an agent's beliefs about entities in its environment
- Self belief properties for expressing an agent's beliefs about itself
SBVR
- The Semantics of Business Vocabularies and Rules (SBVR) is an OMG standard for ("computation-independent")
business modeling (as of January 2009)
- It allows to define business vocabularies and rules in controlled English
(also called "structured English"), corresponding to formal logic expressions
- Why is SBVR based on controlled English?
- Because business people don't want to use formal logic, and neither do they want to use
graphical languages such as UML, for expressing their business terms and rules
SBVR's Strengths
- SBVR supports the formal capture of vocabularies and rules in use within an organization
- SBVR supports the maintenance of multiple vocabularies and their modular composition
- SBVR allows the violation of certain rules (this is part of their semantics)
SBVR's Weaknesses
- There is no methodology how to develop "good" SBVR models
- There is no support for identifying those rules that can be automated in an information system
- After capturing business rules with SBVR (leading to some kind of formalization), it is often
still difficult to find proper operationalizations for the rules
Implementing Business Rules
- In general, SBVR rules correspond to various kinds of integrity constraints that govern
the operation of a business system
- Some of the rules captured with SBVR can be implemented in an information system, e.g. in the form of
- user interface restrictions
- SQL checks/assertions
- special rule software (using a rule engine such as JBoss Rules or IBM/ILOG)
- For other rules it's not clear if and how they could be implemented with the help of IT
Business Rules and Simulation
Simulations can be used for
- Validation: does a particular implementation of a rule lead to the
expected behavior of the system?
- Investigating rule violations:
- Under which conditions do human actors violate a rule?
- What are the consequences of rule violations?
Conclusions
- Agent-based models are ontologically more faithful ("closer-to-reality")
- Agent-based modeling and simulation may allow a deeper understanding
of business systems, business rules and business processes
- The price to pay (the higher complexity of models) may be unavoidable
for obtaining better models of complex systems