LogicBlox, Inc.

This module shows variants of how parameters can be passed to a main workflow (e.g., with default values, scalars, sets, etc)

A workflow with all possible types of parameters: scalar/set, with/without a default valuee.

workflow all(
    x,
    y = "y",
    z*,
    w* = {
  "1",
  "2"
}
  ) {
  log_scalar(x = $x)
  ;
  log_scalar(x = $y)
  ;
  log_set(x = $z)
  ;
  log_set(x = $w)
}

Showing passing hardcoded required parameters between workflows.

workflow no_params_required() {
  all(
    x = "x",
    z = {
      "a",
      "b"
    }
  )
}

Showing passing hardcoded to all parameters between workflows.

workflow no_params_all() {
  all(
    x = "x",
    y = "new_y",
    z = {
      "a",
      "b"
    },
    w = {
      "c",
      "d"
    }
  )
}

Showing passing incoming parameters between workflows.

workflow passing(
    x,
    y = "y",
    z*,
    w* = {
  "1",
  "2"
}
  ) {
  all(
    x = $x,
    y = $y,
    z = $z,
    w = $w
  )
}

Log a message that contains this scalar variable.

workflow log_scalar(x) {
  lb.Log(
    msg = "scalar '$(x)'"
  )
}

Log a message that contains this set variable.

workflow log_set(x*)
  [s] {

  ($s = out) <~ lb.string.Join(parts = $x, separator = ", ")
  ;
  lb.Log(
    msg = "set [$(s)]"
  )
}