%3 ::xolirc::Package ::xolirc::Package → create-page-from-log → process-all-logs dash-date get-html-from-log initialize insert query-actual-log ::xowiki::Package ::xowiki::Package → get_package_id_from_page_id → get_url_from_id → google_sitemapindex → instantiate_page_from_id → is_xowiki_p → preferredCSSToolkit → reparent_site_wide_pages call check_permissions clipboard-copy condition=has_class condition=has_name create_new_snippet default_language default_locale delete_revision error_msg external_name flush_name_cache flush_page_fragment_cache flush_references folder_path get_adp_template get_ids_for_bulk_actions get_lang_and_name get_package_id_from_page_name get_page_from_item_or_revision_id get_page_from_item_ref get_page_from_name get_page_from_super get_parameter get_parameter_from_parameter_page get_parent_and_name import init insert invoke item_info_from_id item_info_from_url item_ref join_name lookup make_form_link make_link normalize_name normalize_path package_path prefixed_lookup pretty_link query_parameter_return_url reparent require_folder_object require_root_folder resolve_package_path resolve_page resolve_page_name resolve_page_name_and_init_context show_page_order simple_item_ref split_name validate_tag www-change-page-order www-delete www-edit-category-tree www-edit-new www-google-sitemap www-google-sitemapindex www-import-prototype-page www-manage-categories www-refresh-login www-reindex www-rss www-update-references ::xolirc::Package->::xowiki::Package ::s5::Package ::s5::Package init insert ::s5::Package->::xowiki::Package ::xowf::Package ::xowf::Package → create_new_workflow_page call destroy initialize insert ::xowf::Package->::xowiki::Package ::xowiki::ParameterCache ::xowiki::ParameterCache get_parameter ::xotcl::Object ::xotcl::Object ::xowiki::ParameterCache->::xotcl::Object ::xowiki::Package->::xowiki::ParameterCache instmixin ::xo::Package ::xo::Package ::xowiki::Package->::xo::Package

Class ::xowf::Package

::xowf::Package[i] create ...

Defined in

Class Relations

  • class: ::xo::PackageMgr[i]
  • superclass: ::xowiki::Package[i]
::xo::PackageMgr create ::xowf::Package \
     -superclass ::xowiki::Package

Methods (to be applied on the object)

  • create_new_workflow_page (scripted, public)

     xowf::Package[i] 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 $p

Methods (to be applied on instances)

  • call (scripted)

    if {[$object istype ::xowiki::FormPage]} {
      if {[$object is_wf_instance]} {
        set ctx [::xowf::Context require $object]
        #:msg "wfi: creating context form object $object = $ctx, chlds=[$ctx info children]"
        #:msg "wfi: o $object has mixins [$object info mixin]"
      } elseif {[$object is_wf]} {
        set ctx [::xowf::Context require $object]
        #:msg "wf: creating context form object $object = $ctx, chlds=[$ctx info children]"
        #:msg "wf: o $object has mixins [$object info mixin]"
      }
    }
    next
  • destroy (scripted, public)

     <instance of xowf::Package[i]> destroy

    remove 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
    }
    next
  • initialize (scripted, public)

     <instance of xowf::Package[i]> initialize

    Add mixin ::xowf::WorkflowPage to every FormPage.

    Testcases:
    create_test_items, create_folder_with_page, create_workflow_with_instance
    #
    # This method is called, whenever an xowf package is initialized.
    #
    next
    #:msg "::xowiki::FormPage instmixin add ::xowf::WorkflowPage"
    ::xowiki::FormPage instmixin add ::xowf::WorkflowPage
  • insert (scripted)

    set __table_name [[self class] table_name]
    set __id [[self class] id_column]
    set :$__id ${:object_id}
    :log "ID insert in $__table_name, id = $__id = [set :$__id]"
    next
    foreach {__slot_name __slot} [[self class] array get db_slot] {
      if {[info exists :$__slot_name]} {
        set $__slot_name [set :$__slot_name]
        lappend __vars $__slot_name
        lappend __atts [$__slot column_name]
      }
    }
    ::xo::dc dml insert_$__table_name "insert into $__table_name
      ([join $__atts ,]) values (:[join $__vars ,:])"
  • package_id (setter)