Main Page | Modules | Files | Functions | Code Elements | Data Structures | Deprecated

epm/epm.h

Go to the documentation of this file.
00001 /*==============================================================================
00002                 Copyright (c) 2003-2005 UGS Corporation
00003                    Unpublished - All Rights Reserved
00004  ==============================================================================*/
00005 
00013 /*  */
00014 
00015 #ifndef EPM_H
00016 #define EPM_H
00017 
00018 #include <epm/cr.h>
00019 #include <tc/tc_startup.h>
00020 #include <tccore/tctype.h>
00021 #include <epm/epm_errors.h>
00022 #include <tc/tc_arguments.h>
00023 #include <tccore/workspaceobject.h>
00024 #include <epm/libepm_exports.h>
00025 
00026 
00040 #define EPM_select_signoff_team_task     "select-signoff-team"            
00041 #define EPM_perform_signoffs_task        "perform-signoffs"                
00046 typedef enum EPM_signoff_decision_e {
00047              EPM_no_decision         = 0,        
00048              EPM_approve_decision    = 'Y',        
00049              EPM_reject_decision     = 'N'        
00050 } EPM_signoff_decision_t;
00051 
00052 #define EPM_comment2_size_c               240    
00057 typedef enum EPM_state_e
00058 {
00059     EPM_unassigned       = (1 << 0)  /* 1 */    
00060    ,EPM_pending          = (1 << 1)  /* 2 */    
00061    ,EPM_started          = (1 << 2)  /* 4 */    
00062    ,EPM_completed        = (1 << 3)  /* 8 */    
00063    ,EPM_skipped          = (1 << 4)  /* 16 */    
00064    ,EPM_aborted          = (1 << 5)  /* 32 */    
00065    ,EPM_failed           = (1 << 6)  /* 64 */    
00066    ,EPM_suspended        = (1 << 7)  /* 132 */    
00067 } EPM_state_t;
00068 
00069 
00073 #define EPM_assign_action               1        
00074 #define EPM_start_action                2        
00075 #define EPM_complete_action             4        
00076 #define EPM_skip_action                 5        
00077 #define EPM_suspend_action              6        
00078 #define EPM_resume_action               7        
00079 #define EPM_undo_action                 8        
00080 #define EPM_abort_action                9        
00081 #define EPM_fail_action                 10        
00083 #define EPM_perform_action              100        
00084 #define EPM_add_attachment_action       101        
00085 #define EPM_remove_attachment_action    102        
00086 #define EPM_approve_action              104        
00087 #define EPM_reject_action               105        
00088 #define EPM_promote_action              106        
00089 #define EPM_demote_action               107        
00090 #define EPM_refuse_action               108        
00091 #define EPM_assign_approver_action      109        
00092 #define EPM_notify_action               110        
00094 #define EPM_start_on_complete_action     EPM_start_action        
00095 #define EPM_complete_on_complete_action  EPM_complete_action    
00096 #define EPM_start_on_fail_action         EPM_fail_action        
00097 #define EPM_restart_on_complete_action   200                    
00098 #define EPM_restart_on_fail_action       201                    
00099 #define EPM_start_on_start_action        202                    
00103 #define EPM_user_action                 1000
00104 
00105 typedef int EPM_action_t;
00112 #define EPM_target_attachment               1        
00113 #define EPM_reference_attachment            3        
00114 #define EPM_signoff_attachment              4        
00115 #define EPM_release_status_attachment       5        
00116 #define EPM_comment_attachment              6        
00117 #define EPM_instruction_attachment          7        
00118 #define EPM_interprocess_task_attachment    8        
00119 #define EPM_schedule_task_attachment        9        
00124 #define EPM_ATT_TARGET "target"                            
00125 #define EPM_ATT_REFERENCE "reference"                      
00126 #define EPM_ATT_PROCESS "process"                          
00127 #define EPM_ATT_SIGNOFF "signoff"                          
00128 #define EPM_ATT_COMMENT "comment"                          
00129 #define EPM_ATT_INSTRUCTION "instruction"                  
00130 #define EPM_ATT_INTERPROCESS_TASK "interprocess_task"      
00131 #define EPM_ATT_SCHEDULE_TASK "schedule_task"              
00132 #define EPM_ATT_BOTH "both" // target + reference          
00133 #define EPM_ATT_ALL "all"                                  
00136 #define EPM_user_attachment             1000
00137 
00140 #define EPM_max_template_name_length    81        
00144 #define EPM_Perform      0                
00145 #define EPM_Review       1                
00146 #define EPM_Acknowledge  2                
00147 #define EPM_Notify       3                
00149 typedef enum EPM_path_type_e{
00150     EPM_success_path_type,                
00151     EPM_failure_path_type,                
00152     EPM_restart_success_path_type,        
00153     EPM_refail_failure_path_type        
00154 } EPM_path_type_t;
00155 
00173 #define EPM_RESULT_Unset "Unset"                                
00174 #define EPM_RESULT_Completed "Completed"                        
00175 #define EPM_RESULT_Approved "Approved"                            
00176 #define EPM_RESULT_Rejected "Rejected"                            
00177 #define EPM_RESULT_Unable_to_complete "Unable_to_complete"        
00178 #define EPM_RESULT_True "True"                                    
00179 #define EPM_RESULT_False "False"                                
00180 #define EPM_RESULT_No_error "No_error"                            
00182 #define EPM_comment_size_c               4000
00183 
00184 typedef struct EPM_action_message_s{
00185     tag_t                 task;             
00186     EPM_action_t          action;           
00187     EPM_state_t           proposed_state;   
00188     TC_argument_list_t* arguments;          
00189     tag_t                 data;             
00190 } EPM_action_message_t;
00191 
00192 typedef struct EPM_rule_message_s{
00193     tag_t                 task;               
00194     EPM_action_t          proposed_action;    
00195     TC_argument_list_t* arguments;            
00196     tag_t                 tag;                
00197 } EPM_rule_message_t;
00198 
00199 typedef enum EPM_decision_e{
00200     EPM_nogo,             
00201     EPM_undecided,        
00202     EPM_go                
00203 } EPM_decision_t;
00204 
00209 #define EPM_RESULT_TRUE                 1    
00210 #define EPM_RESULT_FALSE                0    
00213 #define EPM_RESULT_UNSET                2
00214 
00216 typedef int (*EPM_action_handler_t) (EPM_action_message_t);
00217 typedef EPM_decision_t   (*EPM_rule_handler_t)   (EPM_rule_message_t);
00218 
00222 #define EPM_inbox_query                 1
00223 
00224 typedef enum EPM_handler_type_e{
00225     EPM_rule_handler_type,                    
00226     EPM_action_handler_type                    
00227 } EPM_handler_type_t;
00228 
00229 typedef enum EPMTaskType
00230 {
00231     eEPMDoTask,                        
00232     eEPMReviewTask,                    
00233     eEPMSelectSignoffTask,            
00234     eEPMPerformSignoffTask,            
00235     eEPMAcknowledgeTask,            
00236     eEPMConditionTask,                
00237     eEPMNotifyTask,                    
00238     eEPMRouteTask,                    
00239     eEPMOrTask,                        
00240     eEPMSyncTask,                    
00241     eEPMAddStatusTask,                
00242     eECMImpactAnalysisTask,            
00243     eECMPrepareECOTask,                
00244     eECMChecklistTask,                
00245     eEPMValidateTask,                
00246     eEPMUnknownTask                    
00247 } EPM_task_type_t;
00248 
00252 typedef struct EPM_resource_list_s
00253 {
00254      int    count;                        
00255      tag_t  *resources;                    
00256      tag_t  *profiles;                    
00257      int    *actions;                    
00258      int    revQuorum;                    
00259      int    ackQuorum;                    
00260      int    waitForUndecidedReviewers;  
00261 } EPM_resource_list_t;
00262 
00267 #define EPM_TEMPLATE_BASED_ON_RELATION_TYPE "EPM_template_based_on"                
00268 #define EPM_SIGNOFF_PROFILE_RELATION_TYPE   "EPM_signoff_profile"                
00269 #define SUBSCRIBED_REMOTEINBOXES_RELATION_TYPE "subscribed_remoteinboxes"        
00272 #ifdef __cplusplus
00273 extern "C"{
00274 #endif
00275 
00279 extern EPM_API int EPM_init_module();
00280 
00329 extern EPM_API int EPM_register_rule_handler(
00330     const char*        handler_name,           
00333     const char*        handler_description,    
00336     EPM_rule_handler_t function_pointer        
00337     );
00338 
00375 extern EPM_API int EPM_register_action_handler(
00376     const char*          handler_name,            
00378     const char*          handler_description,     
00381     EPM_action_handler_t function_pointer         
00382     );
00383 
00387 extern EPM_API int EPM_add_release_status_to_process(
00388     tag_t          job,             
00389     tag_t          release_status    
00390     );
00391 
00401 extern EPM_API int EPM_ask_decision(
00402     tag_t                  task_tag,                         
00403     tag_t                  user,                            
00404     EPM_signoff_decision_t* decision,                       
00405     char                   **comments,                      
00406     date_t*                decision_date                     
00407     );
00408 
00412 extern EPM_API int EPM_ask_if_released(
00413     tag_t          workspace_object,    
00414     int*           is_released          
00415     );
00416 
00422 extern EPM_API int EPM_ask_active_job_for_target(
00423     tag_t          target_object,    
00424     int*           count,           
00425     tag_t**        jobs             
00426     );
00427 
00438 extern EPM_API int EPM_ask_template_access(
00439     tag_t          task_tag,               
00440     int*           nb_of_accessors,          
00441     char***        group_names,             
00443     char***        role_names,              
00445     int**          access_codes             
00448     );
00449 
00459 extern EPM_API int EPM_ask_quorum(
00460     tag_t          task_tag,                
00461     int*           quorum                  
00462     );
00463 
00469 extern EPM_API int EPM_ask_release_statuses(
00470     tag_t          job,                     
00471     int*           count,                   
00472     tag_t**        release_status_objects   
00473     );
00474 
00483 extern EPM_API int EPM_find_status_type(
00484     const char*    status_type,      
00485     tag_t*         status           
00486     );
00487 
00498 extern EPM_API int EPM_remove_release_status(
00499     tag_t          job,             
00500     tag_t          release_status    
00501     );
00502 
00514 extern EPM_API int EPM_remove_status_from_targets(
00515   tag_t         release_status,            
00516   tag_t         root_tag                   
00517                 );
00518 
00533 extern EPM_API int EPM_refresh_job(
00534     tag_t          job      
00536     );
00537 
00546 extern EPM_API int EPM_ask_action_string(
00547     EPM_action_t   action,                                 
00548     char           string[WSO_name_size_c + 1]             
00549     );
00550 
00578 extern EPM_API int EPM_ask_action_string2(
00579     EPM_action_t   action,                                 
00580     char           **string                                
00581     );
00582 
00591 extern EPM_API int EPM_ask_state_string(
00592     EPM_state_t    state,                                  
00593     char           string[WSO_name_size_c + 1]             
00594     );
00595 
00612 extern EPM_API int EPM_ask_state_string2(
00613     EPM_state_t    state,                                  
00614     char           **string                                
00615     );
00616 
00627 extern EPM_API int EPM_ask_attachment_string(
00628     int            attachment_type,                        
00629     char           type_string[WSO_name_size_c + 1]        
00630     );
00631 
00651 extern EPM_API int EPM_ask_attachment_string2(
00652     int            attachment_type,                        
00653     char           **type_string                           
00654     );
00655 
00660 extern EPM_API int EPM_ask_all_procedure_names(
00661     int*           procedure_count,     
00662     char***        procedure_names      
00663     );
00664 
00673 extern EPM_API int EPM_refresh_entire_job(
00674     tag_t          job      
00675     );
00676 
00683 extern EPM_API int EPM_ask_procedure_name(
00684     tag_t          job,                                    
00685     char           procedure_name[WSO_name_size_c + 1]     
00686     );
00687 
00696 extern EPM_API int EPM_ask_procedure_name2(
00697     tag_t          job,                       
00698     char           **procedure_name           
00699     );
00700 
00706 extern EPM_API int EPM_ask_audit_file(
00707     tag_t          job,                       
00708     tag_t*         audit_file                 
00709     );
00710 
00715 extern EPM_API int EPM_assign_responsible_party(
00716     tag_t          task,                      
00717     tag_t          responsible_party          
00718     );
00719 
00723 extern EPM_API int EPM_ask_responsible_party(
00724     tag_t          task,                     
00725     tag_t*         responsible_party          
00726     );
00727 
00731 extern EPM_API int EPM_ask_state(
00732     tag_t          task,       
00733     EPM_state_t*   state       
00734     );
00735 
00746 extern EPM_API int EPM_trigger_action(
00747     tag_t          task,               
00748     EPM_action_t   action,             
00749     const char*    comments            
00750     );
00751 
00764 extern EPM_API int EPM_trigger_action_if_privileged(
00765     tag_t          task,               
00766     EPM_action_t   action,             
00767     const char*    comments            
00768     );
00769 
00786 extern EPM_API int EPM_trigger_secure_action(
00787     tag_t          task,           
00788     EPM_action_t   action,         
00789     const char*    comments,       
00790     const char*    password        
00791     );
00792 
00812 extern EPM_API int EPM_ask_attachments(
00813     tag_t          task,                  
00814     int            attachment_type,       
00815     int*           count,                 
00816     tag_t**        attachments            
00817     );
00818 
00825 extern EPM_API int EPM_ask_all_attachments(
00826     tag_t          task,                    
00827     int*           count,                   
00828     tag_t**        attachments,             
00829     int**          attachment_types         
00830     );
00831 
00835 extern EPM_API int EPM_ask_typed_attachments(
00836   tag_t         task,                                  
00837   const char*   object_type,                           
00838   int*          count,                                 
00839   tag_t**       attachments                            
00840    );
00841 
00857 extern EPM_API int EPM_add_attachments(
00858     tag_t          task,                  
00859     int            count,                 
00860     const tag_t*   attachments,           
00861     const int*     attachment_types       
00862     );
00863 
00876 extern EPM_API int EPM_remove_attachments(
00877     tag_t          task,               
00878     int            count,              
00879     const tag_t*   attachments         
00880     );
00881 
00886 extern EPM_API int EPM_ask_assigned_tasks(
00887     tag_t          responsible_party,      
00888     int            query,                  
00892     int*           count,                  
00893     tag_t**        tasks                   
00894     );
00895 
00899 extern EPM_API int EPM_ask_root_task(
00900     tag_t          job_or_task,        
00901     tag_t*         root_task           
00902     );
00903 
00907 extern EPM_API int EPM_ask_sub_tasks(
00908     tag_t          task,         
00909     int*           count,        
00910     tag_t**        tasks         
00911     );
00912 
00916 extern EPM_API int EPM_ask_sub_task(
00917     tag_t          task,                
00918     const char*    sub_task_name,       
00919     tag_t*         sub_task             
00920     );
00921 
00930 extern EPM_API int EPM_ask_parent_task(
00931     tag_t          task,             
00932     tag_t*         parent_task       
00933     );
00934 
00941 extern EPM_API int EPM_ask_name(
00942     tag_t          task,                            
00943     char           name[WSO_name_size_c + 1]        
00944     );
00945 
00949 extern EPM_API int EPM_ask_name2(
00950     tag_t          task,                            
00951     char           **name                           
00952     );
00953 
00960 extern EPM_API int EPM_ask_description(
00961     tag_t          task,                                   
00962     char           description[WSO_desc_size_c + 1]        
00963     );
00964 
00968 extern EPM_API int EPM_ask_description2(
00969     tag_t          task,                                   
00970     char           **description                           
00971     );
00972 
00976 extern EPM_API int EPM_ask_job(
00977     tag_t          task,     
00978     tag_t*         job       
00979     );
00980 
00984 extern EPM_API int EPM_search_task_in_job(
00985     tag_t          task,          
00986     const char*    task_name,      
00987     tag_t*         sub_task        
00988     );
00989 
00996 extern EPM_API int EPM_ask_task_dependencies(
00997     const tag_t    task,                     
00998     int*           nb_of_predecessors,       
00999     tag_t**        predecessor_tasks         
01000     );
01001 
01014 extern EPM_API int EPM_ask_assigned_processes (
01015     tag_t          object_type,         
01016     const char*    group_name,          
01017     int*           count,               
01018     char***        process_names        
01019     );
01020 
01028 extern EPM_API int EPM_ask_default_process(
01029     const char     object_type[WSO_name_size_c + 1],       
01030     char           process_name[WSO_name_size_c + 1]       
01031     );
01032 
01037 extern EPM_API int EPM_ask_default_process2(
01038     const char     *object_type,        
01039     char           **process_name       
01040     );
01041 
01049 extern EPM_API int EPM_ask_default_process_for(
01050     tag_t          workspace_object,                       
01051     char           process_name[WSO_name_size_c + 1]       
01052     );
01053 
01058 extern EPM_API int EPM_ask_default_process_for2(
01059     tag_t          workspace_object,                       
01060     char           **process_name                          
01061     );
01062 
01071 extern EPM_API int EPM_remove_task_hold(
01072     tag_t          task_tag          
01073     );
01074 
01086 extern EPM_API int EPM_get_resource_pool(
01087     tag_t          group,           
01088     tag_t          role,            
01089     logical        allow_subgroup,  
01090     tag_t*         resourcepool     
01091     );
01092 
01105 extern EPM_API int EPM_ask_resourcepool(
01106     tag_t          group,           
01107     tag_t          role,            
01108     logical        allow_subgroup,  
01109     logical        all_members,     
01110     tag_t*         resourcepool     
01111     );
01112 
01116 extern EPM_API int EPM_ask_resource_pool_group_role(
01117     tag_t          resourcepool,     
01118     tag_t*         group,            
01119     tag_t*         role,             
01120     logical*       allow_subgroup    
01121     );
01122 
01126 extern EPM_API int EPM_get_resource_pool_name(
01127     tag_t          resourcepool,       
01128     char**         resourcepool_name   
01129     );
01130 
01134 extern EPM_API int EPM_ask_resource_pool_subscribers(
01135     tag_t           resourcepool,          
01136     int*            u_count,               
01137     tag_t**         u_tags                 
01138     );
01139 
01144 extern EPM_API int EPM_ask_out_of_office(
01145     tag_t          user,             
01146     tag_t*         delegate,         
01147     date_t*        start_date,       
01148     date_t*        end_date          
01149     );
01150 
01164 extern EPM_API int EPM_set_out_of_office(
01165     tag_t          user,            
01166     tag_t          delegate,        
01167     date_t         start_date,       
01168     date_t         end_date          
01169     );
01170 
01178 extern EPM_API int EPM_set_out_of_office_delegate(
01179     tag_t          user,             
01180     tag_t          delegate          
01181     );
01182 
01190 extern EPM_API int EPM_set_out_of_office_dates(
01191     tag_t          user,             
01192     date_t         start_date,       
01193     date_t         end_date          
01194     );
01195 
01199 extern EPM_API int EPM_set_task_due_date(
01200     tag_t          task,             
01201     date_t         due_date          
01202     );
01203 
01207 extern EPM_API int EPM_reset_task_due_date(
01208     tag_t          task           
01209     );
01210 
01214 extern EPM_API int EPM_ask_task_due_date(
01215     tag_t          task,            
01216     date_t*        due_date         
01217     );
01218 
01225 extern EPM_API int EPM_set_task_late(
01226     tag_t          task,            
01227     logical        late_flag        
01228     );
01229 
01233 extern EPM_API int EPM_ask_task_late(
01234     tag_t          task,           
01235     logical*       late_flag       
01236     );
01237 
01245 extern EPM_API int EPM_set_task_duration(
01246     tag_t          task,             
01247     int            years,            
01248     int            weeks,            
01249     int            days,             
01250     int            hours,            
01251     int            minutes           
01252     );
01253 
01259 extern EPM_API int EPM_ask_task_duration(
01260     tag_t          task,           
01261     int*           yrs,            
01262     int*           wks,            
01263     int*           dys,            
01264     int*           hrs,            
01265     int*           mns             
01266     );
01267 
01272 extern EPM_API int EPM_ask_users_late_tasks(
01273     tag_t          user,           
01274     int*           count,          
01276     tag_t**        late_tasks       
01278     );
01279 
01283 extern EPM_API int EPM_add_subscribed_resource_pools(
01284     tag_t          user,           
01285     int            count,          
01286     const tag_t*   resourcepools   
01287     );
01288 
01292 extern EPM_API int EPM_remove_subscribed_resource_pools(
01293     tag_t          user,           
01294     int            count,          
01295     const tag_t*   resourcepools   
01296     );
01297 
01301 extern EPM_API int EPM_set_subscribed_remote_inboxes(
01302     tag_t user,                 
01303     int count,                  
01304     const tag_t *site_tags       
01305     );
01306 
01310 extern EPM_API int EPM_remove_all_subscribed_remote_inboxes(
01311     tag_t user            
01312     );
01313 
01317 extern EPM_API int EPM_ask_subscribed_remote_inboxes(
01318     tag_t user,            
01319     int *count,            
01320     tag_t **site_tags       
01321     );
01322 
01326 extern EPM_API int EPM_ask_remote_inbox(
01327     tag_t    user,              
01328     tag_t    site,              
01329     tag_t*   remote_inbox        
01330     );
01331 
01335 extern EPM_API int EPM_ask_subscribed_resource_pools(
01336     tag_t          user,          
01337     int*           count,         
01338     tag_t**        resourcepools  
01339     );
01340 
01346 extern EPM_API int EPM_ask_late_task_recipients(
01347     tag_t          task,           
01348     int*           count,          
01349     tag_t**        recipients      
01352     );
01353 
01359 extern EPM_API int EPM_set_late_task_recipients(
01360     tag_t          task,                       
01361     int            count,                      
01362     const tag_t*   recipient_tags               
01364     );
01365 
01366 
01376 extern EPM_API int EPM_ask_recipients_for_token(
01377     tag_t          task,                
01378     const char*    token,               
01379     int*           count,               
01380     tag_t**        recipient_tags       
01381     );
01382 
01383 /* --------------------------------------------------------------------------------------- */
01394 extern EPM_API int EPM_ask_participants_for_token(
01395     tag_t       task,                  
01396     const char* token,                 
01397     int         *gmcount,              
01398     tag_t       **gmtags,              
01399     int         *rpcount,              
01400     tag_t       **rptags               
01401     );
01402 
01411 extern EPM_API int EPM_add_resource_pool_recipients_for_preference(
01412     tag_t          task,                   
01413     int            *count,                 
01414     tag_t          **recipient_tags        
01415     );
01416 
01420 extern EPM_API int EPM_set_adhoc_signoff_selection_done(
01421     tag_t          task,                
01422     logical        selection_done       
01423     );
01424 
01428 extern EPM_API int EPM_get_adhoc_signoff_selection_done(
01429     tag_t          task,                    
01430     logical*       selection_done           
01431     );
01432 
01439 extern EPM_API int EPM_set_condition_task_result(
01440     tag_t          task,                 
01441     int            condition             
01445     );
01446 
01453 extern EPM_API int EPM_get_condition_task_result(
01454     tag_t          task,               
01455     int*           condition           
01459     );
01460 
01469 extern EPM_API int EPM_demote_task(
01470     const tag_t    task_tag,       
01471     const char*    comments        
01472     );
01473 
01483 extern EPM_API int EPM_promote_task(
01484     const tag_t    task_tag,        
01485     const char*    comments         
01486     );
01487 
01496 extern EPM_API int EPM_ask_review_task_name(
01497     const tag_t    task_tag,                                   
01498     char           review_task_name[WSO_name_size_c+1]         
01499     );
01500 
01506 extern EPM_API int EPM_ask_review_task_name2(
01507     const tag_t    task_tag,                                  
01508     char           **review_task_name                         
01509     );
01510 
01527 extern EPM_API int EPM_ask_review_task_names(
01528     tag_t          task_tag,                   
01529     int*           count,                      
01530     char***        review_task_names           
01531     );
01532 
01537 extern EPM_API int EPM_get_type_tasks(
01538     const tag_t           job_tag,           
01539     const EPM_task_type_t task_type,         
01540     int*                  number_of_tasks,   
01541     tag_t**               task_tags          
01542     );
01543 
01549 extern EPM_API int EPM_set_decision(
01550     tag_t                 task_tag,                          
01551     tag_t                 user,                              
01552     CR_signoff_decision_t descision,                         
01553     const char            comments[CR_comment_size_c + 1],   
01554     const logical         auto_complete                      
01557     );
01558 
01565 extern EPM_API int EPM_set_task_decision(
01566     tag_t                 task_tag,                          
01567     tag_t                 signoffTag,                        
01568     CR_signoff_decision_t descision,                         
01569     const char            comments[CR_comment_size_c + 1]    
01570     );
01571 
01582 extern EPM_API int EPM_set_task_decision2(
01583     tag_t                 task_tag,                  
01584     tag_t                 signoff_tag,               
01585     CR_signoff_decision_t descision,                 
01586     const char            *comments                  
01587     );
01588 
01595 extern EPM_API int EPM_set_secure_task_decision(
01596     tag_t                 task_tag,                          
01597     tag_t                 signoff_tag,                       
01598     CR_signoff_decision_t descision,                         
01599     const char            comments[CR_comment_size_c + 1],   
01600     const char*           password                           
01601     );
01602 
01614 extern EPM_API int EPM_set_secure_task_decision2(
01615     tag_t                 task_tag,                          
01616     tag_t                 signoff_tag,                       
01617     CR_signoff_decision_t descision,                         
01618     const char            *comments,                         
01619     const char*           password                           
01620     );
01621 
01622 
01633 extern EPM_API int EPM_ask_assigned_process_templates(
01634     int            number_of_object_type_names,      
01635     char**         object_type_names,                
01636     const char*    group_name,                       
01637     int*           count,                            
01638     tag_t**        process_templates                 
01639     );
01640 
01644 extern EPM_API int EPM_is_valid_performer(
01645     tag_t          task,         
01646     logical*       valid         
01647     );
01648 
01658 extern EPM_API int EPM_ask_required_reviewer_types(
01659     tag_t          task,                     
01660     int*           count,                    
01661     tag_t**        required_accessors        
01662     );
01663 
01677 extern EPM_API int EPM_ask_accessor_tags(
01678     tag_t          group,              
01679     logical        allow_subgroups,    
01680     tag_t          role,               
01681     int*           n_accessors,        
01682     tag_t**        accessors           
01683     );
01684 
01700 extern EPM_API int EPM_create_process_deferred_start(
01701     const char*    name,                               /* <I> Name of the process */
01702     const char*    description,                        /* <I> Process description */
01703     const tag_t    process_template,                    /* <I> Process template tag */
01704     int            attachment_count,                    /* <I> Number of attachments */
01705     const tag_t*   attachments,                        /* <I> Attachments to the process */
01706     const int*     attachment_types,                    /* <I> Attachment types like target or reference */
01707     tag_t*         new_process                          /* <O> New process */
01708 );
01709 
01724 extern EPM_API int EPM_create_process(
01725     const char*          name,                 
01726     const char*          description,          
01727     const tag_t          process_template,      
01728     int                  attachment_count,      
01729     const tag_t*         attachments,          
01730     const int*           attachment_types,      
01731     tag_t*               new_process            
01732     );
01733 
01752 extern EPM_API int EPM_create_assigned_process(
01753   const char*        name,              
01754   const char*        description,       
01755   tag_t              process_template,  
01756   const char*        privileged_user,   
01757   int                user_count,        
01758   char**             user_list,         
01759   date_t             due_date,          
01760   int                attachment_count,  
01761   const tag_t*       attachment_list,   
01762   const int*         attachment_types,  
01763   const char*        container_uid,     
01764   char*              relation_name,     
01768   tag_t*        new_process        
01769   );
01770 
01771 
01775 extern EPM_API int EPM_ask_tasks(
01776     const tag_t    process,       
01777     EPM_state_t    task_state,    
01778     int*           count,         
01779     tag_t**        tasks          
01780     );
01781 
01785 extern EPM_API int EPM_ask_task_result_dependency(
01786     const tag_t    dependent_task,        
01787     const tag_t    predecessor_task,      
01788     int*           result                 
01789     );
01790 
01794 extern EPM_API int EPM_clear_process_stage(
01795     const          tag_t task          
01796     );
01797 
01801 extern EPM_API int EPM_ask_task_forms(
01802     const tag_t    task,     
01803     int*           count,    
01804     tag_t**        forms     
01805     );
01806 
01815 extern EPM_API int EPM_ask_unassigned_profiles(
01816     tag_t          job,                        
01817     tag_t          task,                       
01818     int*           count,                      
01819     tag_t**        unassigned_profile_tags     
01820     );
01821 
01826 extern EPM_API int EPM_ask_unassigned_roles(
01827     tag_t          job,                        
01828     tag_t          task,                       
01829     int*           count,                      
01830     char***        unassigned_role_names       
01831     );
01832 
01841 extern EPM_API int EPM_ask_unassigned_profile_names(
01842     tag_t          task,                       
01843     int*           count,                      
01844     char***        unassigned_profile_names    
01845     );
01846 
01851 extern EPM_API int EPM_ask_required_roles(
01852     tag_t          job,                        
01853     tag_t          task,                       
01854     int*           count,                      
01855     char***        required_role_names         
01856     );
01857 
01866 extern EPM_API int EPM_ask_required_profile_names(
01867     tag_t          task,                       
01868     int*           count,                      
01869     char***        required_profile_names      
01870     );
01871 
01884 extern EPM_API int EPM_attach_sub_processes(
01885     tag_t          parent_process_tag,         
01886     int            count,                      
01887     const tag_t*   secondary_processes_tags    
01888     );
01889 
01898 extern EPM_API int EPM_remove_sub_processes(
01899     tag_t          parent_process_tag,         
01900     int            count,                      
01901     const tag_t*   secondary_processes_tags    
01902     );
01903 
01912 extern EPM_API int EPM_ask_sub_processes(
01913     tag_t          parent_process_tag,         
01914     int*           count,                      
01915     tag_t**        secondary_processes_tags    
01916     );
01917 
01921 extern EPM_API int EPM_ask_parent_processes(
01922     tag_t          subprocess_tag,            
01923     int*           count,                     
01924     tag_t**        parent_processes_tags      
01925     );
01926 
01936 extern EPM_API int EPM_assignment_list_create(
01937     const char*                   list_name,         
01938     int                           desc_length,       
01939     char**                       desc_array,        
01940     tag_t                         proc_template,     
01941     logical                       is_shared,         
01942     int                           resources_count,   
01943     const tag_t*                  templates_array,   
01944     const EPM_resource_list_t*    resources,         
01945     tag_t*                        new_assn_List      
01946 );
01947 
01957 extern EPM_API int EPM_assignment_list_edit(
01958     tag_t                         assn_list,         
01959     const char*                   list_name,         
01960     int                           desc_length,       
01961     char**                        desc_array,        
01962     tag_t                         proc_template,     
01963     logical                       is_shared,         
01964     int                           resources_count,   
01965     const tag_t*                  templates_array,   
01966     const EPM_resource_list_t*    resources          
01967 );
01968 
01978 extern EPM_API int EPM_assignment_list_describe(
01979     tag_t           assn_list,          
01980     char**          list_name,          
01981     int*            desc_length,        
01982     char***         desc_array,         
01983     logical*        is_shared,          
01984     tag_t*          proc_template,      
01985     int*            resources_count,    
01986     tag_t**         templates_array,    
01987     tag_t**         resources           
01988 );
01989 
01993 extern EPM_API int EPM_resource_list_create(
01994     int          count,        
01995     const tag_t  *resources,   
01996     const tag_t  *profiles,    
01997     const int    *actions,     
01998     int          rev_quorum,    
01999     int          ack_quorum,    
02000     int          wait_for_undecided_reviewers, 
02001     tag_t*       resource_list 
02002 );
02003 
02007 extern EPM_API int EPM_resource_list_edit(
02008     tag_t         resource_list,  
02009     int           count,          
02010     const tag_t   *resources,     
02011     const tag_t   *profiles,      
02012     const int     *actions,       
02013     int           rev_quorum,     
02014     int           ack_quorum,     
02015     int           wait_for_undecided_reviewers 
02016 );
02017 
02026 extern EPM_API int EPM_resource_list_describe(
02027     tag_t   resource_list,                      
02028     int     *rev_quorum,                        
02029     int     *ack_quorum,                        
02030     int     *wait_for_undecided_reviewers,      
02031     int     *count,                             
02032     tag_t   **resources,                        
02033     tag_t   **profiles,                         
02034     int     **actions                           
02035 );
02036 
02045 extern EPM_API int EPM_find_assignment_lists(
02046     tag_t    resource,         
02047     int      *num_of_lists,    
02048     tag_t    **lists           
02049 );
02050 
02061 extern EPM_API int EPM_replace_resource_in_lists(
02062     int      count,                   
02063     const tag_t    *assn_lists,       
02064     tag_t    old_resource,            
02065     tag_t    new_resource             
02066 );
02067 
02071 extern EPM_API int  EPM_get_assignment_list(
02072     char    *list_name,  
02073     tag_t   *assn_list   
02074 );
02075 
02079 extern EPM_API int EPM_assignment_list_extent(
02080     int*     n_instances,   
02081     tag_t**  instance_tags  
02082 );
02083 
02087 extern EPM_API int EPM_get_all_assignment_lists(
02088     int*     n_own_lists,        
02089     tag_t**  own_list_tags,      
02090     int*     n_group_lists,      
02091     tag_t**  group_list_tags,    
02092     int*     n_other_lists,      
02093     tag_t**  other_list_tags     
02094 );
02095 
02106 extern EPM_API int EPM_assign_assignment_list(
02107     tag_t    process,             
02108     tag_t    assignment_list      
02109 );
02110 
02126 extern EPM_API int EPM_assign_to_all_tasks(
02127     tag_t                          assignment_list,     
02128     int                            num_of_templates,    
02129     const tag_t*                   task_templates,      
02130     const EPM_resource_list_t*     resources,           
02131     tag_t                          process              
02132 );
02133 
02137 extern EPM_API int EPM_set_surrogate_user(
02138     tag_t   user,                
02139     tag_t   surrogate_user,      
02140     date_t  start_date,          
02141     date_t  end_date             
02142 );
02143 
02147 extern EPM_API int EPM_remove_surrogate_user(
02148     tag_t   user,              
02149     tag_t   surrogate_user,    
02150     int     *count,            
02151     tag_t   **claimed_tasks    
02152 );
02153 
02165 extern EPM_API int EPM_claim_as_surrogate(
02166     tag_t    task_or_signoff,    
02167     logical  xfer_checkouts,     
02168     int      *exceptions_count,  
02169     tag_t    **exceptions_list   
02170 );
02171 
02176 extern EPM_API int EPM_get_current_surrogates(
02177     int             user_count,        
02178     const tag_t*    users,             
02179     int*            surrogate_count,   
02180     tag_t**         surrogate_users    
02181 );
02182 
02193 extern EPM_API int  EPM_release_claim(
02194     tag_t   task_or_signoff,    
02195     logical xfer_checkouts,     
02196     int     *exceptions_count,  
02197     tag_t   **exceptions_list   
02198 );
02199 
02203 extern EPM_API int EPM_get_assignmentlists_by_job(
02204     tag_t    job_tag,            
02205     int*     n_own_lists,        
02206     tag_t**  own_list_tags,      
02207     int*     n_group_lists,      
02208     tag_t**  group_list_tags,    
02209     int*     n_other_lists,      
02210     tag_t**  other_list_tags     
02211 );
02212 
02221 extern EPM_API int EPM_assnlist_get_proc_template(
02222     tag_t    assn_list,          
02223     tag_t*   process_template    
02224 );
02225 
02229 extern EPM_API int EPM_set_task_result(
02230     tag_t          task,                 
02231     const char*    result                
02242     );
02243 
02247 extern EPM_API int EPM_get_task_result(
02248     tag_t          task,               
02249     char**         result              
02261     );
02262 
02272 extern EPM_API int EPM_add_reviewers(
02273     tag_t          job,                    
02274     const char*    review_task_name,       
02275     int            add_excess_as_adhoc,    
02276     int            n_groupmembers,         
02277     tag_t*         groupmembers            
02278     );
02279 
02283 extern EPM_API int EPM_get_wait_for_undecided_reviewers(
02284     tag_t          task,                     
02285     int*           undecided_reviewer_count  
02286     );
02287 
02288 
02298 extern EPM_API int EPM_create_participant(
02299     tag_t        assignee,                       
02300     tag_t        participant_type,               
02301     tag_t*       participant                     
02302 );
02303 
02307 extern EPM_API int EPM_get_participanttype(
02308     char*       type_name,                         
02309     tag_t*      participant_type                   
02310 );
02311 
02321 extern EPM_API int EPM_get_participants(
02322     const char* participant_value,     
02323     tag_t       task,                  
02324     int*        member_count,          
02325     tag_t**     members,               
02326     int*        rp_count,              
02327     tag_t**     rps,                   
02328     logical     single_participant     
02329 );
02330 
02340 extern EPM_API int EPM_get_participant(
02341     const char* participant_value,     
02342     tag_t       task,                  
02343     tag_t*      member,                
02344     tag_t*      rp,                    
02345     logical*    is_resourcepool        
02346 );
02347 
02348 #ifdef __cplusplus
02349 }
02350 #endif
02351 
02356 #define EBR_decision_t                  EPM_decision_t            
02357 #define EBR_undecided                   EPM_undecided            
02358 #define EBR_nogo                        EPM_nogo                
02359 #define EBR_go                          EPM_go                    
02361 #define EPM_task_action_t               EPM_action_t            
02362 #define EPM_task_state_t                EPM_state_t                
02364 #define EPM_assign_task                 EPM_assign_action        
02365 #define EPM_start_task                  EPM_start_action        
02366 #define EPM_complete_task               EPM_complete_action        
02367 #define EPM_skip_task                   EPM_skip_action            
02368 #define EPM_suspend_task                EPM_suspend_action        
02369 #define EPM_resume_task                 EPM_resume_action        
02370 #define EPM_undo_task                   EPM_undo_action            
02371 #define EPM_abort_task                  EPM_abort_action        
02372 #define EPM_do_task                     EPM_perform_action        
02373 #define EPM_project_task_attachment     EPM_schedule_task_attachment
02374 
02378 #include <epm/libepm_undef.h>
02379 #endif