xowf::test_item::Answer_manager method get_answer_attributes (public)

 <instance of xowf::test_item::Answer_manager[i]> get_answer_attributes \
    [ -state state ] [ -extra_attributes extra_attributes ] wf

Defined in packages/xowf/tcl/test-item-procs.tcl

Extracts wf instances as answers (e.g., extracting their answer-specific attributes)

Switches:
-state (optional)
retrieve only instances in this state
-extra_attributes (optional)
return these attributes additionally as key/value pairs per tuple
Parameters:
wf (required, object)
the workflow
Returns:
a list of dicts

Testcases:
No testcase defined.
Source code:
set results {}
set items [:get_wf_instances $wf]
foreach i [$items children] {
  if {$state ne "" && [$i state] ne $state} {
    continue
  }

  set answerAttributes [:FL answer_attributes [$i instance_attributes]]
  foreach extra $extra_attributes {
    lappend answerAttributes $extra [$i property $extra]
  }
  #ns_log notice "get_answer_attributes $i: <$answerAttributes> ALL [$i instance_attributes]"
  lappend results [list item $i answerAttributes $answerAttributes state [$i state]]
}
return $results
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: