MyNixOS website logo
Description

Rule-Based Conformance Checking of Business Process Event Data.

Check compliance of event-data from (business) processes with respect to specified rules. Rules supported are of three types: frequency (activities that should (not) happen x number of times), order (succession between activities) and exclusiveness (and and exclusive choice between activities).

processcheckR

CRANstatus R-CMD-check Codecov Lifecycle:stable

The goal of processcheckR is to support rule-based conformance checking. Currently the following declarative rules can be checked:

Cardinality rules:

  • absent: activity does not occur more than n - 1 times,
  • contains: activity occurs n times or more,
  • contains_between: activity occurs between n and m times,
  • contains_exactly: activity occurs exactly n times.

Ordering rules:

  • starts: case starts with activity,
  • ends: case ends with activity,
  • succession: if activity A happens, B should happen after. If B happens, A should have happened before,
  • response: if activity A happens, B should happen after,
  • precedence: if activity B happens, A should have happened before,
  • responded_existence: if activity A happens, B should also (have) happen(ed) (i.e. before or after A).

Exclusiveness:

  • and: two activities always exist together,
  • xor: two activities are not allowed to exist together.

Rules can be checked using the check_rule and check_rules functions (see example below). It will create a new logical variable to indicate for which cases the rule holds. The name of the variable can be configured using the label argument in check_rule.

Installation

You can install processcheckR from CRAN with:

install.packages("processcheckR")

Development Version

You can also install the latest (stable) development version with bugfixes and new features directly from GitHub:

# install.packages("devtools")
devtools::install_github("bupaverse/processcheckR")

Example

library(bupaR)
#> 
#> Attaching package: 'bupaR'
#> The following object is masked from 'package:stats':
#> 
#>     filter
#> The following object is masked from 'package:utils':
#> 
#>     timestamp
library(processcheckR)
#> 
#> Attaching package: 'processcheckR'
#> The following object is masked from 'package:base':
#> 
#>     xor
sepsis %>%
  # Check if cases starts with "ER Registration".
  check_rule(starts("ER Registration"), label = "r1") %>%
  # Check if activities "CRP" and "LacticAcid" occur together.
  check_rule(and("CRP","LacticAcid"), label = "r2") %>%
  group_by(r1, r2) %>%
  n_cases() 
#> # A tibble: 4 × 3
#>   r1    r2    n_cases
#>   <lgl> <lgl>   <int>
#> 1 FALSE FALSE      10
#> 2 FALSE TRUE       45
#> 3 TRUE  FALSE     137
#> 4 TRUE  TRUE      858
Metadata

Version

0.1.4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows