420 likes | 592 Views
Querying business processes with BP-QL. Victoria Markozen. What is a BP?. BP = business processes A BP consists of a group of business activities undertaken by one or more organizations in pursuit of some particular goal.
E N D
Querying business processes with BP-QL Victoria Markozen
What is a BP? • BP = business processes • A BP consists of a group of business activities undertaken by one or more organizations in pursuit of some particular goal. • A BP usually depends upon various business functions for support, (for example: personnel, accounting, inventory) and interacts with other BPs/activities carried by the same or other organizations. • the software implementing BPs typically operate in a cross-organization, distributed environment.
The main Challenges in querying BP specifications: • Flexible granularity • Distribution • Paths extraction • Ease of querying
Flexible granularity An adequate query language mustallow users to query the processesat different,flexible, granularity levels. This property can be also called “flexible zoom-in”. Usersmay wish to ask coarse-grain queries that consider certainprocess components as black boxes and allow for high levelabstraction, as wellas fine-grained queries that ‘‘zoom-in’’ on all theprocess components, possibly recursively.
Visual example: View Travel Agency After zooming into search trip
Paths extraction • users maybe interested in retrieving as an answer thequalifying flow paths. For example: the query‘‘What should I do to confirm my purchase?’’ • As the number of relevant paths may be large(or even infinite in recursive processes) a majorchallenge is to provides the users with acompactfinite representation of the (possible infinite)answer.
Visual example: • As we have seen in the “zoom-in”example inside the “search trip” operation we have the next operations: “search cars”, “search flights” and “search rooms”. • In our system we can go to “search trip” (followed by “search flights”) and after that go to “search trip” again – an action that will create a cycle.
Ease of querying • The BP query language is based on an intuitivemodel of BPs. • BP-QLworks with a graphical user interface that allowsfor simple formulation of queries over this model. • BP-QL hides from the users the tedious details and allows for more natural queryformulation.
BP-QL user interface property nodes: general description of the process properties,including its name, capabilities, the serviceprovider, and so on.
BP-QL user interface data nodes: The data used in the process - the processvariables and the input and output parametersfor the participating activities/services.
BP-QL user interface activity nodes: The activities of which the process is composed.
BP-QL user interface provided operations: the services offeredby the process to other processes.
BP-QL user interface Requestedoperations: describe the external services that the processrequests.
BP-QL user interface Data flow edges: Describewhich data is read or output by which activity.
BP-QL user interface Activity flow edges: describe the operationalflow.
BP-QL user interface Compound node: a zoom-in allows to replace a compound activity by a detailed description of the process thatit invokes.
BP-QL user interface View Travel Agency Atomic operation After zooming into search trip
BP-QL user interface View Travel Agency Requestedoperations After zooming into search trip
Query example #1 : Find provided operations activities at anydistance from thestart/end nodes may qualify. unbounded zoom-in; we look for compound activitiesof type “provided operation”, and the compoundactivities that they invoke. The zoom-in is restrictedto activities whose specifications reside on the same.
Query example #2 : which VISA credit card services arecalled by Alpha Tour’s “ConfirmTrip” activity?
Query example #3 : in what ways can a user search for flights without logging-in? • We will use “negation” • The dashed edgesand nodes are stating thata path to the “searchFlights” activity that passesthrough a “login” activity does not exist. • The existing flow paths leading to “searchFlights” are retrieved
Another solution: Path constraints The wanted path can be also expressed byattaching a variable - x tothe edge, along with the selectioncondition :
Last querying example:querying thedata flow Our query: Which data elements areaffected by the “tripRequest” activity,and serve as input for sending the suggested tripsback to the client?
Some definitions • N - domain ofnodes. • L - domain of node labels. a disjoint unionof several domains including data values, attributenames, data elementnames, process property names, and atomicand compound activity names.
Business graphs and processes We model a BP as a directed labeled graphwith nodes of two types: • Concrete nodes - represent process properties, attributes,data elements, and atomic activities. • Compoundnodes- represent compound activities, meaning calls of (possibly remote) operations. • Two distinguishednodes of the BP graph represent its “start” and “end” activities.
Businessgraph andprocess definitions business graph A business graph is a pair, where is a directed graph inwhich is a finite set of nodes, andis a setof edges with endpoints nodes in and is a labeling function for the nodes. business process A BP is a triple p = (g, start, end),where: g is a business graph. start, end are twodistinguished activity nodes in g. each activitynode in g resides on some path from start toend.
System definition A system S of BPs is a pair , where P is a finite set of BPs, and t is a function, called the “implementation function”, from the compound activity nodes in P to BPs in P. In simple words: A system is a collection of BPs (or graphs), along with a mapping between compound nodes and their implementations - the processes they invoke.
A system of BPs: “start”=compound activity=“end”
A system of BPs: “start”=compound activity=“end” Implementation of the compound activity
Queries • Queries are modeled using BP patterns. • A BP pattern is a tuple рp;T;RЮ,where: • A simple query q is a system of BP patterns рQ; tq where Q is a set of BP patterns , and tq is an implementation function (to know where to go from T).
Query answers • To evaluate a query, its patterns are matched to those of the system. • A match is called an embedding. • Let ¼ ðQ; tq be a simple query and let S be a simple system. An embedding of q into S is a homomorphism r from the nodes and edges in q to nodes edges and paths in some refinement 0 ¼ ðP0; t of S. • The answer of q, denoted рs, is the set of all query results.
fork join -- -- fork join Compact representation of query results the two main factors that contributeto large or infiniteresults andanswers: 1. flat BPs - BPs with nocompound activities. each query BP pattern maybe considered in isolation,But answersmay belarge or infinite. 2. Nested BPs - If each BP has several compound activities, then since these may be refined independently of each other, the number of refinements may be large. examples: - Cycle Compound nodes
Compact representation of query results The solution: We canrepresent the set of paths between two nodes by acopy of the sub-graph that connects the nodes, And show the connections between the compound nodes and the graphs that implement them. Onemight actually say this is what the user intended: tosee the specification of the paths between the the nodes, rather than the individual paths themselves.
Conclusions • BP-QL allows users toquery BPs visually, in a manner very close to howsuch processes are typically specified. • The main innovation of BP-QL is in introducingprocess patterns that enrich the standard path-basednavigation with: 1) a (transitive) zoom-in, thatallows to query processcomponents at any depth ofnesting. 2) the retrieval of paths of interest. Together, these features allow for simple formulation of queries on BPs.