workflow::test::workflow_setup (public)

 workflow::test::workflow_setup

Defined in packages/workflow/tcl/test/workflow-test-procs.tcl

Create a test workflow for the Bug Tracker Bug use case.

Partial Call Graph (max 5 caller/called nodes):
%3 workflow::action::fsm::new workflow::action::fsm::new (public) workflow::new workflow::new (public) workflow::role::new workflow::role::new (public) workflow::state::fsm::new workflow::state::fsm::new (public) workflow::test::initial_action_short_name workflow::test::initial_action_short_name (public) workflow::test::workflow_setup workflow::test::workflow_setup workflow::test::workflow_setup->workflow::action::fsm::new workflow::test::workflow_setup->workflow::new workflow::test::workflow_setup->workflow::role::new workflow::test::workflow_setup->workflow::state::fsm::new workflow::test::workflow_setup->workflow::test::initial_action_short_name

Testcases:
No testcase defined.
Source code:
    #####
    #
    # Workflow
    #
    #####

    # Cannot use bt_bug as we cannot assume Bug Tracker to be installed

    set workflow_id [workflow::new  -short_name [workflow::test::workflow_name]  -pretty_name "Bug Test"  -package_key "acs-automated-testing"  -object_id [workflow::test::workflow_object_id]  -object_type "acs_object" ]

    #####
    #
    # Roles
    #
    #####

    workflow::role::new -workflow_id $workflow_id  -short_name "submitter"  -pretty_name "Submitter"  -callbacks workflow.Role_DefaultAssignees_CreationUser

    workflow::role::new -workflow_id $workflow_id  -short_name "assignee"  -pretty_name "Assignee"  
    #####
    #
    # States
    #
    #####

    workflow::state::fsm::new -workflow_id $workflow_id  -short_name "open"  -pretty_name "Open"
    
    workflow::state::fsm::new -workflow_id $workflow_id  -short_name "resolved"  -pretty_name "Resolved"
    
    workflow::state::fsm::new -workflow_id $workflow_id  -short_name "closed"  -pretty_name "Closed"

    #####
    #
    # Actions
    #
    #####

    workflow::action::fsm::new  -trigger_type init  -workflow_id $workflow_id  -short_name [workflow::test::initial_action_short_name]  -pretty_name "Open"  -pretty_past_tense "Opened"  -new_state "open"                              
    
    workflow::action::fsm::new  -workflow_id $workflow_id  -short_name "comment"  -pretty_name "Comment"  -pretty_past_tense "Commented"  -allowed_roles { submitter assignee }  -privileges read  -always_enabled_p t

    workflow::action::fsm::new  -workflow_id $workflow_id  -short_name "edit"  -pretty_name "Edit"  -pretty_past_tense "Edited"  -allowed_roles { submitter assignee }  -privileges write  -always_enabled_p t

    workflow::action::fsm::new  -workflow_id $workflow_id  -short_name "resolve"  -pretty_name "Resolve"  -pretty_past_tense "Resolved"  -assigned_role assignee  -enabled_states resolved  -assigned_states open  -new_state "resolved"  -privileges write

    workflow::action::fsm::new  -workflow_id $workflow_id  -short_name "close"  -pretty_name "Close"  -pretty_past_tense "Closed"  -assigned_role submitter  -assigned_states resolved  -new_state "closed"  -privileges write

    workflow::action::fsm::new  -workflow_id $workflow_id  -short_name "reopen"  -pretty_name "Reopen"  -pretty_past_tense "Closed"  -allowed_roles submitter  -enabled_states { resolved closed }  -new_state "open"  -privileges write    

    return $workflow_id
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: