processanimateR icon indicating copy to clipboard operation
processanimateR copied to clipboard

Must call bupaR::to_eventlog() when using absolute or relative animation mode

Open drhudgins opened this issue 2 years ago • 1 comments

Create activity log

activities <- df %>% bupaR::activitylog(case_id = "order_id", activity_id = "activity_id", timestamps = c("start", "complete"), resource_id = "resource_id")

Works when mode = "off" but breaks when mode = "absolute" or "relative"

activities %>% processanimateR::animate_process(rankdir = "TD", mode = "off", initial_state = "paused")

activities %>% processanimateR::animate_process(rankdir = "TD", mode = "absolute", initial_state = "paused")

  • processanimateR::animate_process(rankdir = "TD", mode = "absolute", initial_state = "paused") Warning: Object is activity log. Timestamps are stored in 0 columns.Error in rlang::sym(): ! Can't convert NULL to a symbol. Backtrace:
  1. activities %>% ...
  2. processanimateR:::timestamp_(eventlog)
  3. rlang::sym(bupaR::timestamp(eventlog))

The workaround is to convert to eventlog()

activities %>% bupaR::to_eventlog() %>% processanimateR::animate_process(rankdir = "TD", mode = "absolute", initial_state = "paused")

drhudgins avatar Feb 14 '23 21:02 drhudgins

It seems processanimatR is not fully compatibly to the activtylog format yet. While converting to event log helps, let's leave this issue here until proper compatibility is in place

gertjanssenswillen avatar Feb 14 '23 21:02 gertjanssenswillen