- Publicity: Public Only All
xowf-procs.tcl
XoWiki Workflow - main library classes and objects
- Location:
- packages/xowf/tcl/xowf-procs.tcl
- Created:
- 2008-03-05
- Author:
- Gustaf Neumann
Procedures in this file
- xowf::Package instproc destroy (public)
- xowf::Package instproc initialize (public)
- xowf::Package proc create_new_workflow_page (public)
- xowf::WorkflowPage instproc answer_is_correct (public)
- xowf::WorkflowPage instproc call_action (public)
- xowf::WorkflowPage instproc call_action_foreach (public)
- xowf::WorkflowPage instproc childpage (public)
- xowf::WorkflowPage instproc footer (public)
- xowf::WorkflowPage instproc get_action_obj (public)
- xowf::WorkflowPage instproc get_revision_sets (public)
- xowf::WorkflowPage instproc is_wf (public)
- xowf::WorkflowPage instproc is_wf_instance (public)
- xowf::WorkflowPage instproc post_process_dom_tree (public)
- xowf::WorkflowPage instproc post_process_form_fields (public)
- xowf::WorkflowPage instproc render_form_action_buttons (public)
- xowf::WorkflowPage instproc render_form_action_buttons_widgets (public)
- xowf::WorkflowPage instproc render_icon (public)
- xowf::WorkflowPage instproc schedule_action (public)
- xowf::WorkflowPage instproc schedule_job (public)
- xowf::WorkflowPage instproc solution_set (public)
- xowf::WorkflowPage instproc stats_record_count (public)
- xowf::WorkflowPage instproc stats_record_detail (public)
- xowf::WorkflowPage instproc wf_context (public)
- xowf::WorkflowPage instproc www-edit (public)
- xowf::WorkflowPage instproc www-view (public)
Detailed information
xowf::Package instproc destroy (public)
<instance of xowf::Package> destroy
remove mixin
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_test_items, create_workflow_with_instance
xowf::Package instproc initialize (public)
<instance of xowf::Package> initialize
Add mixin ::xowf::WorkflowPage to every FormPage.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_test_items, create_folder_with_page, create_workflow_with_instance
xowf::Package proc create_new_workflow_page (public)
xowf::Package create_new_workflow_page -package_id package_id \ -parent_id parent_id -name name -title title \ [ -instance_attributes instance_attributes ]
Helper proc for loading workflow prototype page with less effort.
- Switches:
- -package_id
(required)- -parent_id
(required)- -name
(required)- -title
(required)- -instance_attributes
(optional)- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_new_workflow_page
xowf::WorkflowPage instproc answer_is_correct (public)
<instance of xowf::WorkflowPage> answer_is_correct
Check, if answer is correct based on "answer" and "correct_when" attributes of form fields and provided user input.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xowf::WorkflowPage instproc call_action (public)
<instance of xowf::WorkflowPage> call_action [ -action action ] \ [ -attributes attributes ]
Call the specified action in the current workflow instance. The specified attributes are provided like form_parameters to the action of the workflow.
- Switches:
- -action
(optional)- -attributes
(optional)- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xowf::WorkflowPage instproc call_action_foreach (public)
<instance of xowf::WorkflowPage> call_action_foreach \ -action action [ -attributes attributes ] page_names
Call the specified action for each of the specified pages denoted by the list of page names
- Switches:
- -action
(required)- -attributes
(optional)- Parameters:
- page_names
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xowf::WorkflowPage instproc childpage (public)
<instance of xowf::WorkflowPage> childpage -name name \ [ -form form ]
Return the child page of the current object with the provided name. In case the child object does not exist, create it as an instance of the provided form.
- Switches:
- -name
(required)- -form
(optional)- Returns:
- page object
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_test_items
xowf::WorkflowPage instproc footer (public)
<instance of xowf::WorkflowPage> footer
Provide a tailored footer for workflow definition pages and workflow instance pages containing controls for instantiating forms or providing links to the workflow definition.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_workflow_with_instance
xowf::WorkflowPage instproc get_action_obj (public)
<instance of xowf::WorkflowPage> get_action_obj -action action
Check if the action can be executed in the current state, and if so, return the action_obj.
- Switches:
- -action
(required)- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_workflow_with_instance
xowf::WorkflowPage instproc get_revision_sets (public)
<instance of xowf::WorkflowPage> get_revision_sets \ [ -with_instance_attributes ]
Return a list of ns_sets containing revision_id, creation_date, creation_user, creation_ip, and state for the current workflow instance.
- Switches:
- -with_instance_attributes
(optional)- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_test_items
xowf::WorkflowPage instproc is_wf (public)
<instance of xowf::WorkflowPage> is_wf
Check, if the current page is a workflow page (page, defining a workflow)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_test_items, create_workflow_with_instance
xowf::WorkflowPage instproc is_wf_instance (public)
<instance of xowf::WorkflowPage> is_wf_instance
Check, if the current page is a workflow instance (page, referring to a workflow)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_test_items, create_workflow_with_instance
xowf::WorkflowPage instproc post_process_dom_tree (public)
<instance of xowf::WorkflowPage> post_process_dom_tree dom_doc \ dom_root form_fields
post-process form in edit mode to provide feedback in feedback mode
- Parameters:
- dom_doc
dom_root
form_fields
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_workflow_with_instance
xowf::WorkflowPage instproc post_process_form_fields (public)
<instance of xowf::WorkflowPage> post_process_form_fields \ form_fields
Propagate the feedback mode setting of this workflow page to the supplied formfields.
- Parameters:
- form_fields
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_workflow_with_instance
xowf::WorkflowPage instproc render_form_action_buttons (public)
<instance of xowf::WorkflowPage> render_form_action_buttons \ [ -formfieldButtonClass formfieldButtonClass ] \ [ -CSSclass CSSclass ]
Render the defined actions in the current state with submit buttons
- Switches:
- -formfieldButtonClass
(defaults to"::xowiki::formfield::submit_button"
) (optional)- -CSSclass
(optional)- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_workflow_with_instance
xowf::WorkflowPage instproc render_form_action_buttons_widgets (public)
<instance of xowf::WorkflowPage> render_form_action_buttons_widgets \ [ -CSSclass CSSclass ] buttons
With the given set of buttons, produce the HTML for the button container and the included inputs.
- Switches:
- -CSSclass
(optional)- Parameters:
- buttons
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_workflow_with_instance
xowf::WorkflowPage instproc render_icon (public)
<instance of xowf::WorkflowPage> render_icon
Provide an icon or text for describing the kind of application.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_workflow_with_instance
xowf::WorkflowPage instproc schedule_action (public)
<instance of xowf::WorkflowPage> schedule_action -time time \ [ -party_id party_id ] -action action [ -attributes attributes ]
Schedule the specified action for the current workflow instance at the given time. The specified attributes are provided like form_parameters to the action of the workflow.
- Switches:
- -time
(required)- time when the atjob should be executed
- -party_id
(optional)- party_id for the user executing the atjob
- -action
(required)- workflow action to be executed
- -attributes
(optional)- arguments provided to the workflow action (attribute value pairs)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xowf::WorkflowPage instproc schedule_job (public)
<instance of xowf::WorkflowPage> schedule_job -time time \ [ -party_id party_id ] cmd
Schedule the specified Tcl command for the current package instance at the given time.
- Switches:
- -time
(required)- -party_id
(optional)- Parameters:
- cmd
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xowf::WorkflowPage instproc solution_set (public)
<instance of xowf::WorkflowPage> solution_set
Compute solution set in form of attribute=value pairs based on "answer" attribute of form fields.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xowf::WorkflowPage instproc stats_record_count (public)
<instance of xowf::WorkflowPage> stats_record_count name
Record that the specified question was used.
- Parameters:
- name
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_test_items
xowf::WorkflowPage instproc stats_record_detail (public)
<instance of xowf::WorkflowPage> stats_record_detail \ [ -label label ] [ -value value ] [ -name name ] \ [ -correctly_answered on|off ]
Record the stat detail of the question.
- Switches:
- -label
(optional)- -value
(optional)- -name
(optional)- -correctly_answered
(boolean) (optional)- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_test_items
xowf::WorkflowPage instproc wf_context (public)
<instance of xowf::WorkflowPage> wf_context [ ctx ]
Return for a workflow page the workflow context object. The same function can be used as well for setting the workflow context at the first places (e.g. on initialization of the wf-context).
- Parameters:
- ctx (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_workflow_with_instance
xowf::WorkflowPage instproc www-edit (public)
<instance of xowf::WorkflowPage> www-edit args [ args... ]
Hook for editing workflow pages
- Parameters:
- args
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_workflow_with_instance
xowf::WorkflowPage instproc www-view (public)
<instance of xowf::WorkflowPage> www-view [ content ]
Provide additional view modes: - edit: instead of viewing a page, it is opened in edit mode - view_user_input: show user the provided input - view_user_input_with_feedback: show user the provided input with feedback
- Parameters:
- content (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_test_items, create_workflow_with_instance