tok_check: Check a model

View source: R/tok.R

tok_checkR Documentation

Check a model

Description

Runs the checks of ⁠tok check⁠: syntax, identifiers, flows, pools and lanes, decision tables, forms, simulation parameters and the BPMN 2.0 rules.

Usage

tok_check(
  x,
  lang = getOption("tok.lang", "en"),
  level = c("full", "analytic", "basic"),
  bpmn = TRUE
)

Arguments

x

A model: a tok_model, the path of a .tok file, or the text of a model.

lang

Language of the messages, "en" or "pl". The default comes from the option tok.lang.

level

"full" (default), "analytic" or "basic": the lower levels also report the use of statements that belong to a higher one.

bpmn

Whether to run the BPMN 2.0 rules on the exported model.

Value

A data frame of class tok_diagnostics with the columns line, code, severity ("error", "warning" or "note"), id and message, one row per problem; no rows when the model has no problems.

Examples

tok_check('tok 0.3 "Example"
start s "Start"
task a "Work"
end e "End"
flow s -> a -> e')

tokr documentation built on Nov. 26, 2026, 5:08 p.m.