- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowf::Package
::xowf::Package create ...
Defined in
Class Relations
::xo::PackageMgr create ::xowf::Package \ -superclass ::xowiki::PackageMethods (to be applied on the object)
create_new_workflow_page (scripted, 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)
- Testcases:
- create_new_workflow_page
# # Load Workflow.form # xo::Package require $package_id set item_ref_info [$package_id item_ref -use_site_wide_pages true -default_lang en -parent_id $parent_id en:Workflow.form] set page_template [dict get $item_ref_info item_id] if {$page_template != 0} { # # Create FormPage # set p [::xowiki::FormPage new -name $name -title $title -set text {} -instance_attributes $instance_attributes -page_template $page_template] } else { ns_log error "could not load Workflow form, therefore, creation of workflow $name failed as well" set p "" } return $pMethods (to be applied on instances)
destroy (scripted, public)
<instance of xowf::Package> destroyremove mixin
- Testcases:
- create_test_items, create_workflow_with_instance
# # In general, it is possible, that multiple xowf packages are # concurrently active in one thread. We want to remove the mixin # only, when the last instance is deleted. # if {[llength [[self class] allinstances]] == 1} { ::xowiki::FormPage instmixin delete ::xowf::WorkflowPage } nextinitialize (scripted, public)
<instance of xowf::Package> initializeAdd mixin ::xowf::WorkflowPage to every FormPage.
# # This method is called, whenever an xowf package is initialized. # next #:msg "::xowiki::FormPage instmixin add ::xowf::WorkflowPage" ::xowiki::FormPage instmixin add ::xowf::WorkflowPage
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables