• Publicity: Public Only All

deputy-procs.tcl

Procedures in the workflow::deputy namespace.

Location:
packages/workflow/tcl/deputy-procs.tcl
Created:
2003-06-25
Author:
Peter Marklund <peter@collaboraid.biz>
CVS Identification:
$Id: deputy-procs.tcl,v 1.2 2013/09/17 19:10:34 gustafn Exp $

Procedures in this file

Detailed information

workflow::deputy::delete (public)

 workflow::deputy::delete -user_id user_id -deputy_id deputy_id

Delete deputy information for a certain user_id and deputy_id.

Switches:
-user_id (required)
-deputy_id (required)
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 db_dml db_dml (public) workflow::case::flush_cache workflow::case::flush_cache (private) workflow::deputy::delete workflow::deputy::delete workflow::deputy::delete->db_dml workflow::deputy::delete->workflow::case::flush_cache

Testcases:
No testcase defined.

workflow::deputy::edit (public)

 workflow::deputy::edit -user_id user_id -deputy_id deputy_id \
    -start_day start_day -end_day end_day -message message

Edit deputy information for a certain user_id and deputy_id.

Switches:
-user_id (required)
-deputy_id (required)
-start_day (required)
-end_day (required)
-message (required)
Author:
Peter Marklund
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 db_dml db_dml (public) workflow::deputy::edit workflow::deputy::edit workflow::deputy::edit->db_dml

Testcases:
No testcase defined.

workflow::deputy::new (public)

 workflow::deputy::new [ -user_id user_id ] -deputy_id deputy_id \
    -start_day start_day -end_day end_day [ -message message ]

Create a new deputizing period for a user during which workflow tasks will be assigned to a deputee.

Switches:
-user_id (optional)
The id of the user that is deputizing
-deputy_id (required)
The id of the user to deputize to
-start_day (required)
The start date of the deputizing period. Must be on ANSI format "YYYY-MM-DD"
-end_day (required)
The end date of the deputizing period. Must be on ANSI format "YYYY-MM-DD"
-message (optional)
Any message describing the deputizing
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 ad_conn ad_conn (public) db_dml db_dml (public) workflow::case::flush_cache workflow::case::flush_cache (private) workflow::deputy::new workflow::deputy::new workflow::deputy::new->ad_conn workflow::deputy::new->db_dml workflow::deputy::new->workflow::case::flush_cache

Testcases:
No testcase defined.
[ hide source ] | [ make this the default ]

Content File Source

ad_library {
    Procedures in the workflow::deputy namespace.
    
    @creation-date 2003-06-25
    @author Peter Marklund (peter@collaboraid.biz)
    @cvs-id $Id: deputy-procs.tcl,v 1.2 2013/09/17 19:10:34 gustafn Exp $
}

namespace eval workflow::deputy {}

d_proc -public workflow::deputy::new {
    {-user_id ""}
    {-deputy_id:required}
    {-start_day:required}
    {-end_day:required}
    {-message ""}
} {
    Create a new deputizing period for a user during which workflow
    tasks will be assigned to a deputee.

    @param user_id    The id of the user that is deputizing
    @param deputy_id  The id of the user to deputize to
    @param start_day The start date of the deputizing period. Must be on ANSI format "YYYY-MM-DD"
    @param end_day   The end date of the deputizing period. Must be on ANSI format "YYYY-MM-DD"
    @param message    Any message describing the deputizing

    @author Peter Marklund
} {
    if { $user_id eq "" } {
    set user_id [ad_conn user_id]
    }

    db_dml insert_deputy {}

    # Flush the role assignment info for all cases
    # to make sure cache is in sync with db
    # Do we also need to flush the workflow level cache here?
    workflow::case::flush_cache
}

d_proc -public workflow::deputy::edit {
    {-user_id:required}
    {-deputy_id:required}
    {-start_day:required}
    {-end_day:required}
    {-message:required}
} {
    Edit deputy information for a certain user_id and deputy_id.

    @see workflow::deputy::new

    @author Peter Marklund
} {
    db_dml update_deputy {}
}

d_proc -public workflow::deputy::delete {
    {-user_id:required}
    {-deputy_id:required}
} {
    Delete deputy information for a certain user_id and deputy_id.

    @author Peter Marklund
} {
    db_dml delete_deputy {}

    # Flush the role assignment info for all cases
    # to make sure cache is in sync with db
    # Do we also need to flush the workflow level cache here?
    workflow::case::flush_cache
}