Skip to Content
OCPQ v0.9.2: UX Improvements Download

Example Collection

This page contains a collection of query examples, using different functionality of the OCPQ tool. For each example, you can view the graphical representation as an image. Using the -button, the constraint or query can be copied to your clipboard and can afterwards be pasted in the query editor of OCPQ using Ctrl+v. Make sure to first focus the editor, e.g., by clicking on it or on an existing node.

Animation showing an example being copied and then pasted into OCPQ

The following examples are organized based on the object-centric dataset used.

Order Management

The Order Management OCEL describes customer order management, including order placement, packaging and shipping, and payment handling. It can be downloaded here. The dataset contains 34,303 events and 5,231 objects.

No Reminder After Payment

  • Constraint

A constraint modeling that no payment reminder should be sent out after payment has been made.

In particular, for any combination of related order, payment reminder, and pay order event, the payment reminder should always have occurred before the pay order event.

Customer with Many Payment Reminders

    A query identifying customers that received at least 50 payment reminders for their orders.

    Small Orders Paid Fast

    • Constraint

    A constraint modeling that orders with at most 10 items should be paid within three weeks after placement.

    Orders Fully Delivered Quickly

    • Constraint

    A constraint modeling that orders should be delivered fully within 3.5 weeks.

    Notice the difference between the violation status of the top and bottom node: The bottom node is violated for each item that was delivered too late. The top node is violated for an order, if any of its items was delivered too late, leading, in this case, to a higher violation percentage.

    Problematic Customers

    • Constraint

    A query identifying customers that had at least 5 orders for which at least two payment reminder had to be sent out.

    Customers with High Order Volume

    • CEL
    • Constraint

    A query calculating the total order volume of customers (i.e., the sum of all order prices by the customer for which payment is recorded). All customers with a total order volume below 300,000€ are shown as violating.

    This query uses the CEL scripting feature to calculate the sum of the orders, using the following CEL snippet:

    A.map(b,b['o2'].attr('price')).sum().int()

    Finally, an Advanced CEL Script1 is used for the constraint, i.e., order_volume >= 300000.

    BPIC 2017

    The examples below use the real-life BPI Challenge 2017 dataset (Original Source). A ready-to-use OCEL 2.0 file for this dataset can be obtained from here, by extracting the zip file. The dataset is rather large, containting 2,043,141 events and 34,412 objects.

    A selection of the example queries presented below originate from a performance evaluation of OCPQ.

    Q1: Submitted Applications

    • Constraint

    A constraint modeling that all Applications should be submitted exactly once.

    Q2: Offers Returned

    • Constraint

    After an Offer was created, it should be returned at least once.

    Q3: One Offer Returned

    • Constraint

    An O_Returned event should always involve exactly one Offer object.

    Q4: Offer Accepted

    • Constraint

    After an Application was accepted, at least one resulting Offer for that application should also be accepted.

    Q5: Same Resource Creates Offers

    • Constraint

    The same Case Resource (Case_R) that accepted an Application, should also create all the resulting Offers.

    Q6: Maximum Delay Before Accepted

    • CEL

    What is the maximum duration between an Offer being created to getting accepted?

    To calculate the duration, the following CEL query is used:

    string(max(A.map(b,b['e2'].time() - b['e1'].time())))

    In the dataset, the query yields 3140h7m38s as a result (i.e., 130 days 20 hours 7 minutes and 38 seconds).

    Q7: Two Offers for One Application

      Find combinations of two Offers created for the same Application.

      Footnotes

      1. In contrast to a regular CEL Script as a filter or constraint, the advanced version is executed after the basic filters, constraints and labels were already computed. Thus, added CEL labels can only be used in advanced CEL scripts.

      Last updated on