Skip to contents

Takes a loaded app state and overwrites the current app state

Usage

FM_set_app_state(session, app_state, set_holds = TRUE)

Arguments

session

Shiny session variable.

app_state

Loaded app state.

set_holds

If TRUE (default) the holds will be set for all of the modules present in the app state.

Value

No return value, just updates the app state in the session variable.

Examples

# We need a Shiny session object to use this function:
id="UD"
sess_res = UD_test_mksession(session=list(), id=id)
#> → UD: including file
#> → UD:   source: file.path(system.file(package="onbrand"), "templates", "report.docx")
#> → UD:   dest:   file.path("config","report.docx")
#> → UD: including file
#> → UD:   source: file.path(system.file(package="onbrand"), "templates", "report.pptx")
#> → UD:   dest:   file.path("config","report.pptx")
#> → UD: including file
#> → UD:   source: file.path(system.file(package="onbrand"), "templates", "report.yaml")
#> → UD:   dest:   file.path("config","report.yaml")
#> → UD: State initialized
#> → UD: module checksum updated:897d952fecbc804999396a96f9df4b20
session = sess_res$session
app_state = FM_fetch_app_state(session)
FM_set_app_state(session, app_state)
#> → FM_set_app_state()
#> → Unable to find ASM state.
#> NULL