ITK Function Reference

(V10000.1.0.60_20160308.00)
epm.h
Go to the documentation of this file.
1 /*==============================================================================
2  Copyright (c) 2003-2005 UGS Corporation
3  Unpublished - All Rights Reserved
4  ==============================================================================*/
5 
13 /* */
14 
15 #ifndef EPM_H
16 #define EPM_H
17 
18 #include <epm/cr.h>
19 #include <tc/tc_startup.h>
20 #include <tccore/tctype.h>
21 #include <epm/epm_errors.h>
22 #include <tc/tc_arguments.h>
23 #include <tccore/workspaceobject.h>
24 #include <epm/libepm_exports.h>
25 
26 
40 #define EPM_select_signoff_team_task "select-signoff-team"
41 #define EPM_perform_signoffs_task "perform-signoffs"
46 #define EPM_user_size_c 163
47 
51 typedef enum EPM_signoff_decision_e {
56 
57 #define EPM_comment2_size_c 4000
62 typedef enum EPM_state_e
63 {
64  EPM_unassigned = (1 << 0) /* 1 */
65  ,EPM_pending = (1 << 1) /* 2 */
66  ,EPM_started = (1 << 2) /* 4 */
67  ,EPM_completed = (1 << 3) /* 8 */
68  ,EPM_skipped = (1 << 4) /* 16 */
69  ,EPM_aborted = (1 << 5) /* 32 */
70  ,EPM_failed = (1 << 6) /* 64 */
71  ,EPM_suspended = (1 << 7) /* 132 */
72 } EPM_state_t;
73 
74 
78 #define EPM_assign_action 1
79 #define EPM_start_action 2
80 #define EPM_complete_action 4
81 #define EPM_skip_action 5
82 #define EPM_suspend_action 6
83 #define EPM_resume_action 7
84 #define EPM_undo_action 8
85 #define EPM_abort_action 9
86 #define EPM_fail_action 10
88 #define EPM_perform_action 100
89 #define EPM_add_attachment_action 101
90 #define EPM_remove_attachment_action 102
91 #define EPM_approve_action 104
92 #define EPM_reject_action 105
93 #define EPM_promote_action 106
94 #define EPM_demote_action 107
95 #define EPM_refuse_action 108
96 #define EPM_assign_approver_action 109
97 #define EPM_notify_action 110
99 #define EPM_start_on_complete_action EPM_start_action
100 #define EPM_complete_on_complete_action EPM_complete_action
101 #define EPM_start_on_fail_action EPM_fail_action
102 #define EPM_restart_on_complete_action 200
103 #define EPM_restart_on_fail_action 201
104 #define EPM_start_on_start_action 202
105 #define EPM_claim_action 203
109 #define EPM_user_action 1000
110 
111 typedef int EPM_action_t;
118 #define EPM_target_attachment 1
119 #define EPM_reference_attachment 3
120 #define EPM_signoff_attachment 4
121 #define EPM_release_status_attachment 5
122 #define EPM_comment_attachment 6
123 #define EPM_instruction_attachment 7
124 #define EPM_interprocess_task_attachment 8
125 #define EPM_schedule_task_attachment 9
130 #define EPM_ATT_TARGET "target"
131 #define EPM_ATT_REFERENCE "reference"
132 #define EPM_ATT_PROCESS "process"
133 #define EPM_ATT_SIGNOFF "signoff"
134 #define EPM_ATT_COMMENT "comment"
135 #define EPM_ATT_INSTRUCTION "instruction"
136 #define EPM_ATT_INTERPROCESS_TASK "interprocess_task"
137 #define EPM_ATT_SCHEDULE_TASK "schedule_task"
138 #define EPM_ATT_BOTH "both"
139 #define EPM_ATT_ALL "all"
142 #define EPM_user_attachment 1000
143 
146 #define EPM_max_template_name_length 81
150 #define EPM_Perform 0
151 #define EPM_Review 1
152 #define EPM_Acknowledge 2
153 #define EPM_Notify 3
155 typedef enum EPM_path_type_e{
161 
179 #define EPM_RESULT_Unset "Unset"
180 #define EPM_RESULT_Completed "Completed"
181 #define EPM_RESULT_Approved "Approved"
182 #define EPM_RESULT_Rejected "Rejected"
183 #define EPM_RESULT_Unable_to_complete "Unable_to_complete"
184 #define EPM_RESULT_True "True"
185 #define EPM_RESULT_False "False"
186 #define EPM_RESULT_No_error "No_error"
188 #define EPM_comment_size_c 4000
189 
190 typedef struct EPM_action_message_s{
197 
198 typedef struct EPM_rule_message_s{
204 
205 typedef enum EPM_decision_e{
210 
215 #define EPM_RESULT_TRUE 1
216 #define EPM_RESULT_FALSE 0
219 #define EPM_RESULT_UNSET 2
220 
224 
228 #define EPM_inbox_query 1
229 
230 typedef enum EPM_handler_type_e{
234 
235 typedef enum EPMTaskType
236 {
254 
258 typedef struct EPM_resource_list_s
259 {
260  int count;
263  int *actions;
264  int revQuorum;
265  int ackQuorum;
268 
273 #define EPM_TEMPLATE_BASED_ON_RELATION_TYPE "EPM_template_based_on"
274 #define EPM_SIGNOFF_PROFILE_RELATION_TYPE "EPM_signoff_profile"
275 #define SUBSCRIBED_REMOTEINBOXES_RELATION_TYPE "subscribed_remoteinboxes"
278 #ifdef __cplusplus
279 extern "C"{
280 #endif
281 
285 extern EPM_API int EPM_init_module();
286 
335 extern EPM_API int EPM_register_rule_handler(
336  const char* handler_name,
339  const char* handler_description,
342  EPM_rule_handler_t function_pointer
343  );
344 
381 extern EPM_API int EPM_register_action_handler(
382  const char* handler_name,
384  const char* handler_description,
387  EPM_action_handler_t function_pointer
388  );
389 
393 extern EPM_API int EPM_add_release_status_to_process(
394  tag_t job,
395  tag_t release_status
396  );
397 
407 extern EPM_API int EPM_ask_decision(
408  tag_t task_tag,
409  tag_t user,
410  EPM_signoff_decision_t* decision,
411  char **comments,
412  date_t* decision_date
413  );
414 
418 extern EPM_API int EPM_ask_if_released(
419  tag_t workspace_object,
420  int* is_released
421  );
422 
428 extern EPM_API int EPM_ask_active_job_for_target(
429  tag_t target_object,
430  int* count,
431  tag_t** jobs
432  );
433 
444 extern EPM_API int EPM_ask_template_access(
445  tag_t task_tag,
446  int* nb_of_accessors,
447  char*** group_names,
449  char*** role_names,
451  int** access_codes
454  );
455 
465 extern EPM_API int EPM_ask_quorum(
466  tag_t task_tag,
467  int* quorum
468  );
469 
475 extern EPM_API int EPM_ask_release_statuses(
476  tag_t job,
477  int* count,
478  tag_t** release_status_objects
479  );
480 
489 extern EPM_API int EPM_find_status_type(
490  const char* status_type,
491  tag_t* status
492  );
493 
504 extern EPM_API int EPM_remove_release_status(
505  tag_t job,
506  tag_t release_status
507  );
508 
520 extern EPM_API int EPM_remove_status_from_targets(
521  tag_t release_status,
522  tag_t root_tag
523  );
524 
539 extern EPM_API int EPM_refresh_job(
540  tag_t job
542  );
543 
552 extern EPM_API int EPM_ask_action_string(
553  EPM_action_t action,
554  char string[WSO_name_size_c + 1]
555  );
556 
584 extern EPM_API int EPM_ask_action_string2(
585  EPM_action_t action,
586  char **string
587  );
588 
597 extern EPM_API int EPM_ask_state_string(
598  EPM_state_t state,
599  char string[WSO_name_size_c + 1]
600  );
601 
618 extern EPM_API int EPM_ask_state_string2(
619  EPM_state_t state,
620  char **string
621  );
622 
633 extern EPM_API int EPM_ask_attachment_string(
634  int attachment_type,
635  char type_string[WSO_name_size_c + 1]
636  );
637 
657 extern EPM_API int EPM_ask_attachment_string2(
658  int attachment_type,
659  char **type_string
660  );
661 
666 extern EPM_API int EPM_ask_all_procedure_names(
667  int* procedure_count,
668  char*** procedure_names
669  );
670 
679 extern EPM_API int EPM_refresh_entire_job(
680  tag_t job
681  );
682 
689 extern EPM_API int EPM_ask_procedure_name(
690  tag_t job,
691  char procedure_name[WSO_name_size_c + 1]
692  );
693 
702 extern EPM_API int EPM_ask_procedure_name2(
703  tag_t job,
704  char **procedure_name
705  );
706 
712 extern EPM_API int EPM_ask_audit_file(
713  tag_t job,
714  tag_t* audit_file
715  );
716 
729  tag_t task,
730  tag_t responsible_party,
731  const char* comments
732  );
733 
738 extern EPM_API int EPM_assign_responsible_party(
739  tag_t task,
740  tag_t responsible_party
741  );
742 
746 extern EPM_API int EPM_ask_responsible_party(
747  tag_t task,
748  tag_t* responsible_party
749  );
750 
754 extern EPM_API int EPM_ask_state(
755  tag_t task,
756  EPM_state_t* state
757  );
758 
769 extern EPM_API int EPM_trigger_action(
770  tag_t task,
771  EPM_action_t action,
772  const char* comments
773  );
774 
787 extern EPM_API int EPM_trigger_action_if_privileged(
788  tag_t task,
789  EPM_action_t action,
790  const char* comments
791  );
792 
809 extern EPM_API int EPM_trigger_secure_action(
810  tag_t task,
811  EPM_action_t action,
812  const char* comments,
813  const char* password
814  );
815 
835 extern EPM_API int EPM_ask_attachments(
836  tag_t task,
837  int attachment_type,
838  int* count,
839  tag_t** attachments
840  );
841 
848 extern EPM_API int EPM_ask_all_attachments(
849  tag_t task,
850  int* count,
851  tag_t** attachments,
852  int** attachment_types
853  );
854 
858 extern EPM_API int EPM_ask_typed_attachments(
859  tag_t task,
860  const char* object_type,
861  int* count,
862  tag_t** attachments
863  );
864 
880 extern EPM_API int EPM_add_attachments(
881  tag_t task,
882  int count,
883  const tag_t* attachments,
884  const int* attachment_types
885  );
886 
899 extern EPM_API int EPM_remove_attachments(
900  tag_t task,
901  int count,
902  const tag_t* attachments
903  );
904 
909 extern EPM_API int EPM_ask_assigned_tasks(
910  tag_t responsible_party,
911  int query,
915  int* count,
916  tag_t** tasks
917  );
918 
922 extern EPM_API int EPM_ask_root_task(
923  tag_t job_or_task,
924  tag_t* root_task
925  );
926 
930 extern EPM_API int EPM_ask_sub_tasks(
931  tag_t task,
932  int* count,
933  tag_t** tasks
934  );
935 
939 extern EPM_API int EPM_ask_sub_task(
940  tag_t task,
941  const char* sub_task_name,
942  tag_t* sub_task
943  );
944 
953 extern EPM_API int EPM_ask_parent_task(
954  tag_t task,
955  tag_t* parent_task
956  );
957 
964 extern EPM_API int EPM_ask_name(
965  tag_t task,
966  char name[WSO_name_size_c + 1]
967  );
968 
972 extern EPM_API int EPM_ask_name2(
973  tag_t task,
974  char **name
975  );
976 
983 extern EPM_API int EPM_ask_description(
984  tag_t task,
985  char description[WSO_desc_size_c + 1]
986  );
987 
991 extern EPM_API int EPM_ask_description2(
992  tag_t task,
993  char **description
994  );
995 
999 extern EPM_API int EPM_ask_job(
1000  tag_t task,
1001  tag_t* job
1002  );
1003 
1007 extern EPM_API int EPM_search_task_in_job(
1008  tag_t task,
1009  const char* task_name,
1010  tag_t* sub_task
1011  );
1012 
1019 extern EPM_API int EPM_ask_task_dependencies(
1020  const tag_t task,
1021  int* nb_of_predecessors,
1022  tag_t** predecessor_tasks
1023  );
1024 
1037 extern EPM_API int EPM_ask_assigned_processes (
1038  tag_t object_type,
1039  const char* group_name,
1040  int* count,
1041  char*** process_names
1042  );
1043 
1051 extern EPM_API int EPM_ask_default_process(
1052  const char object_type[WSO_name_size_c + 1],
1053  char process_name[WSO_name_size_c + 1]
1054  );
1055 
1060 extern EPM_API int EPM_ask_default_process2(
1061  const char *object_type,
1062  char **process_name
1063  );
1064 
1072 extern EPM_API int EPM_ask_default_process_for(
1073  tag_t workspace_object,
1074  char process_name[WSO_name_size_c + 1]
1075  );
1076 
1081 extern EPM_API int EPM_ask_default_process_for2(
1082  tag_t workspace_object,
1083  char **process_name
1084  );
1085 
1094 extern EPM_API int EPM_remove_task_hold(
1095  tag_t task_tag
1096  );
1097 
1109 extern EPM_API int EPM_get_resource_pool(
1110  tag_t group,
1111  tag_t role,
1112  logical allow_subgroup,
1113  tag_t* resourcepool
1114  );
1115 
1128 extern EPM_API int EPM_ask_resourcepool(
1129  tag_t group,
1130  tag_t role,
1131  logical allow_subgroup,
1132  logical all_members,
1133  tag_t* resourcepool
1134  );
1135 
1139 extern EPM_API int EPM_ask_resource_pool_group_role(
1140  tag_t resourcepool,
1141  tag_t* group,
1142  tag_t* role,
1143  logical* allow_subgroup
1144  );
1145 
1149 extern EPM_API int EPM_get_resource_pool_name(
1150  tag_t resourcepool,
1151  char** resourcepool_name
1152  );
1153 
1157 extern EPM_API int EPM_ask_resource_pool_subscribers(
1158  tag_t resourcepool,
1159  int* u_count,
1160  tag_t** u_tags
1161  );
1162 
1167 extern EPM_API int EPM_ask_out_of_office(
1168  tag_t user,
1169  tag_t* delegate,
1170  date_t* start_date,
1171  date_t* end_date
1172  );
1173 
1187 extern EPM_API int EPM_set_out_of_office(
1188  tag_t user,
1189  tag_t delegate,
1190  date_t start_date,
1191  date_t end_date
1192  );
1193 
1201 extern EPM_API int EPM_set_out_of_office_delegate(
1202  tag_t user,
1203  tag_t delegate
1204  );
1205 
1213 extern EPM_API int EPM_set_out_of_office_dates(
1214  tag_t user,
1215  date_t start_date,
1216  date_t end_date
1217  );
1218 
1222 extern EPM_API int EPM_set_task_due_date(
1223  tag_t task,
1224  date_t due_date
1225  );
1226 
1230 extern EPM_API int EPM_reset_task_due_date(
1231  tag_t task
1232  );
1233 
1237 extern EPM_API int EPM_ask_task_due_date(
1238  tag_t task,
1239  date_t* due_date
1240  );
1241 
1248 extern EPM_API int EPM_set_task_late(
1249  tag_t task,
1250  logical late_flag
1251  );
1252 
1256 extern EPM_API int EPM_ask_task_late(
1257  tag_t task,
1258  logical* late_flag
1259  );
1260 
1268 extern EPM_API int EPM_set_task_duration(
1269  tag_t task,
1270  int years,
1271  int weeks,
1272  int days,
1273  int hours,
1274  int minutes
1275  );
1276 
1282 extern EPM_API int EPM_ask_task_duration(
1283  tag_t task,
1284  int* yrs,
1285  int* wks,
1286  int* dys,
1287  int* hrs,
1288  int* mns
1289  );
1290 
1295 extern EPM_API int EPM_ask_users_late_tasks(
1296  tag_t user,
1297  int* count,
1299  tag_t** late_tasks
1301  );
1302 
1306 extern EPM_API int EPM_add_subscribed_resource_pools(
1307  tag_t user,
1308  int count,
1309  const tag_t* resourcepools
1310  );
1311 
1315 extern EPM_API int EPM_remove_subscribed_resource_pools(
1316  tag_t user,
1317  int count,
1318  const tag_t* resourcepools
1319  );
1320 
1324 extern EPM_API int EPM_set_subscribed_remote_inboxes(
1325  tag_t user,
1326  int count,
1327  const tag_t *site_tags
1328  );
1329 
1333 extern EPM_API int EPM_remove_all_subscribed_remote_inboxes(
1334  tag_t user
1335  );
1336 
1340 extern EPM_API int EPM_ask_subscribed_remote_inboxes(
1341  tag_t user,
1342  int *count,
1343  tag_t **site_tags
1344  );
1345 
1349 extern EPM_API int EPM_ask_remote_inbox(
1350  tag_t user,
1351  tag_t site,
1352  tag_t* remote_inbox
1353  );
1354 
1358 extern EPM_API int EPM_ask_subscribed_resource_pools(
1359  tag_t user,
1360  int* count,
1361  tag_t** resourcepools
1362  );
1363 
1369 extern EPM_API int EPM_ask_late_task_recipients(
1370  tag_t task,
1371  int* count,
1372  tag_t** recipients
1375  );
1376 
1382 extern EPM_API int EPM_set_late_task_recipients(
1383  tag_t task,
1384  int count,
1385  const tag_t* recipient_tags
1387  );
1388 
1389 
1399 extern EPM_API int EPM_ask_recipients_for_token(
1400  tag_t task,
1401  const char* token,
1402  int* count,
1403  tag_t** recipient_tags
1404  );
1405 
1406 /* --------------------------------------------------------------------------------------- */
1417 extern EPM_API int EPM_ask_participants_for_token(
1418  tag_t task,
1419  const char* token,
1420  int *gmcount,
1421  tag_t **gmtags,
1422  int *rpcount,
1423  tag_t **rptags
1424  );
1425 
1435  tag_t task,
1436  int *count,
1437  tag_t **recipient_tags
1438  );
1439 
1443 extern EPM_API int EPM_set_adhoc_signoff_selection_done(
1444  tag_t task,
1445  logical selection_done
1446  );
1447 
1451 extern EPM_API int EPM_get_adhoc_signoff_selection_done(
1452  tag_t task,
1453  logical* selection_done
1454  );
1455 
1462 extern EPM_API int EPM_set_condition_task_result(
1463  tag_t task,
1464  int condition
1468  );
1469 
1476 extern EPM_API int EPM_get_condition_task_result(
1477  tag_t task,
1478  int* condition
1482  );
1483 
1492 extern EPM_API int EPM_demote_task(
1493  const tag_t task_tag,
1494  const char* comments
1495  );
1496 
1506 extern EPM_API int EPM_promote_task(
1507  const tag_t task_tag,
1508  const char* comments
1509  );
1510 
1519 extern EPM_API int EPM_ask_review_task_name(
1520  const tag_t task_tag,
1521  char review_task_name[WSO_name_size_c+1]
1522  );
1523 
1529 extern EPM_API int EPM_ask_review_task_name2(
1530  const tag_t task_tag,
1531  char **review_task_name
1532  );
1533 
1550 extern EPM_API int EPM_ask_review_task_names(
1551  tag_t task_tag,
1552  int* count,
1553  char*** review_task_names
1554  );
1555 
1560 extern EPM_API int EPM_get_type_tasks(
1561  const tag_t job_tag,
1562  const EPM_task_type_t task_type,
1563  int* number_of_tasks,
1564  tag_t** task_tags
1565  );
1566 
1572 extern EPM_API int EPM_set_decision(
1573  tag_t task_tag,
1574  tag_t user,
1575  CR_signoff_decision_t descision,
1576  const char comments[CR_comment_size_c + 1],
1577  const logical auto_complete
1580  );
1581 
1588 extern EPM_API int EPM_set_task_decision(
1589  tag_t task_tag,
1590  tag_t signoffTag,
1591  CR_signoff_decision_t descision,
1592  const char comments[CR_comment_size_c + 1]
1593  );
1594 
1605 extern EPM_API int EPM_set_task_decision2(
1606  tag_t task_tag,
1607  tag_t signoff_tag,
1608  CR_signoff_decision_t descision,
1609  const char *comments
1610  );
1611 
1618 extern EPM_API int EPM_set_secure_task_decision(
1619  tag_t task_tag,
1620  tag_t signoff_tag,
1621  CR_signoff_decision_t descision,
1622  const char comments[CR_comment_size_c + 1],
1623  const char* password
1624  );
1625 
1637 extern EPM_API int EPM_set_secure_task_decision2(
1638  tag_t task_tag,
1639  tag_t signoff_tag,
1640  CR_signoff_decision_t descision,
1641  const char *comments,
1642  const char* password
1643  );
1644 
1645 
1656 extern EPM_API int EPM_ask_assigned_process_templates(
1657  int number_of_object_type_names,
1658  char** object_type_names,
1659  const char* group_name,
1660  int* count,
1661  tag_t** process_templates
1662  );
1663 
1667 extern EPM_API int EPM_is_valid_performer(
1668  tag_t task,
1669  logical* valid
1670  );
1671 
1681 extern EPM_API int EPM_ask_required_reviewer_types(
1682  tag_t task,
1683  int* count,
1684  tag_t** required_accessors
1685  );
1686 
1700 extern EPM_API int EPM_ask_accessor_tags(
1701  tag_t group,
1702  logical allow_subgroups,
1703  tag_t role,
1704  int* n_accessors,
1705  tag_t** accessors
1706  );
1707 
1723 extern EPM_API int EPM_create_process_deferred_start(
1724  const char* name, /* <I> Name of the process */
1725  const char* description, /* <I> Process description */
1726  const tag_t process_template, /* <I> Process template tag */
1727  int attachment_count, /* <I> Number of attachments */
1728  const tag_t* attachments, /* <I> Attachments to the process */
1729  const int* attachment_types, /* <I> Attachment types like target or reference */
1730  tag_t* new_process /* <O> New process */
1731 );
1732 
1747 extern EPM_API int EPM_create_process(
1748  const char* name,
1749  const char* description,
1750  const tag_t process_template,
1751  int attachment_count,
1752  const tag_t* attachments,
1753  const int* attachment_types,
1754  tag_t* new_process
1755  );
1756 
1775 extern EPM_API int EPM_create_assigned_process(
1776  const char* name,
1777  const char* description,
1778  tag_t process_template,
1779  const char* privileged_user,
1780  int user_count,
1781  char** user_list,
1782  date_t due_date,
1783  int attachment_count,
1784  const tag_t* attachment_list,
1785  const int* attachment_types,
1786  const char* container_uid,
1787  char* relation_name,
1791  tag_t* new_process
1792  );
1793 
1794 
1798 extern EPM_API int EPM_ask_tasks(
1799  const tag_t process,
1800  EPM_state_t task_state,
1801  int* count,
1802  tag_t** tasks
1803  );
1804 
1808 extern EPM_API int EPM_ask_task_result_dependency(
1809  const tag_t dependent_task,
1810  const tag_t predecessor_task,
1811  int* result
1812  );
1813 
1817 extern EPM_API int EPM_clear_process_stage(
1818  const tag_t task
1819  );
1820 
1824 extern EPM_API int EPM_ask_task_forms(
1825  const tag_t task,
1826  int* count,
1827  tag_t** forms
1828  );
1829 
1838 extern EPM_API int EPM_ask_unassigned_profiles(
1839  tag_t job,
1840  tag_t task,
1841  int* count,
1842  tag_t** unassigned_profile_tags
1843  );
1844 
1849 extern EPM_API int EPM_ask_unassigned_roles(
1850  tag_t job,
1851  tag_t task,
1852  int* count,
1853  char*** unassigned_role_names
1854  );
1855 
1864 extern EPM_API int EPM_ask_unassigned_profile_names(
1865  tag_t task,
1866  int* count,
1867  char*** unassigned_profile_names
1868  );
1869 
1874 extern EPM_API int EPM_ask_required_roles(
1875  tag_t job,
1876  tag_t task,
1877  int* count,
1878  char*** required_role_names
1879  );
1880 
1889 extern EPM_API int EPM_ask_required_profile_names(
1890  tag_t task,
1891  int* count,
1892  char*** required_profile_names
1893  );
1894 
1907 extern EPM_API int EPM_attach_sub_processes(
1908  tag_t parent_process_tag,
1909  int count,
1910  const tag_t* secondary_processes_tags
1911  );
1912 
1921 extern EPM_API int EPM_remove_sub_processes(
1922  tag_t parent_process_tag,
1923  int count,
1924  const tag_t* secondary_processes_tags
1925  );
1926 
1935 extern EPM_API int EPM_ask_sub_processes(
1936  tag_t parent_process_tag,
1937  int* count,
1938  tag_t** secondary_processes_tags
1939  );
1940 
1944 extern EPM_API int EPM_ask_parent_processes(
1945  tag_t subprocess_tag,
1946  int* count,
1947  tag_t** parent_processes_tags
1948  );
1949 
1959 extern EPM_API int EPM_assignment_list_create(
1960  const char* list_name,
1961  int desc_length,
1962  char** desc_array,
1963  tag_t proc_template,
1964  logical is_shared,
1965  int resources_count,
1966  const tag_t* templates_array,
1967  const EPM_resource_list_t* resources,
1968  tag_t* new_assn_List
1969 );
1970 
1980 extern EPM_API int EPM_assignment_list_edit(
1981  tag_t assn_list,
1982  const char* list_name,
1983  int desc_length,
1984  char** desc_array,
1985  tag_t proc_template,
1986  logical is_shared,
1987  int resources_count,
1988  const tag_t* templates_array,
1989  const EPM_resource_list_t* resources
1990 );
1991 
2001 extern EPM_API int EPM_assignment_list_describe(
2002  tag_t assn_list,
2003  char** list_name,
2004  int* desc_length,
2005  char*** desc_array,
2006  logical* is_shared,
2007  tag_t* proc_template,
2008  int* resources_count,
2009  tag_t** templates_array,
2010  tag_t** resources
2011 );
2012 
2016 extern EPM_API int EPM_resource_list_create(
2017  int count,
2018  const tag_t *resources,
2019  const tag_t *profiles,
2020  const int *actions,
2021  int rev_quorum,
2022  int ack_quorum,
2023  int wait_for_undecided_reviewers,
2024  tag_t* resource_list
2025 );
2026 
2030 extern EPM_API int EPM_resource_list_edit(
2031  tag_t resource_list,
2032  int count,
2033  const tag_t *resources,
2034  const tag_t *profiles,
2035  const int *actions,
2036  int rev_quorum,
2037  int ack_quorum,
2038  int wait_for_undecided_reviewers
2039 );
2040 
2049 extern EPM_API int EPM_resource_list_describe(
2050  tag_t resource_list,
2051  int *rev_quorum,
2052  int *ack_quorum,
2053  int *wait_for_undecided_reviewers,
2054  int *count,
2055  tag_t **resources,
2056  tag_t **profiles,
2057  int **actions
2058 );
2059 
2068 extern EPM_API int EPM_find_assignment_lists(
2069  tag_t resource,
2070  int *num_of_lists,
2071  tag_t **lists
2072 );
2073 
2084 extern EPM_API int EPM_replace_resource_in_lists(
2085  int count,
2086  const tag_t *assn_lists,
2087  tag_t old_resource,
2088  tag_t new_resource
2089 );
2090 
2094 extern EPM_API int EPM_get_assignment_list(
2095  char *list_name,
2096  tag_t *assn_list
2097 );
2098 
2102 extern EPM_API int EPM_assignment_list_extent(
2103  int* n_instances,
2104  tag_t** instance_tags
2105 );
2106 
2110 extern EPM_API int EPM_get_all_assignment_lists(
2111  int* n_own_lists,
2112  tag_t** own_list_tags,
2113  int* n_group_lists,
2114  tag_t** group_list_tags,
2115  int* n_other_lists,
2116  tag_t** other_list_tags
2117 );
2118 
2129 extern EPM_API int EPM_assign_assignment_list(
2130  tag_t process,
2131  tag_t assignment_list
2132 );
2133 
2149 extern EPM_API int EPM_assign_to_all_tasks(
2150  tag_t assignment_list,
2151  int num_of_templates,
2152  const tag_t* task_templates,
2153  const EPM_resource_list_t* resources,
2154  tag_t process
2155 );
2156 
2160 extern EPM_API int EPM_set_surrogate_user(
2161  tag_t user,
2162  tag_t surrogate_user,
2163  date_t start_date,
2164  date_t end_date
2165 );
2166 
2170 extern EPM_API int EPM_remove_surrogate_user(
2171  tag_t user,
2172  tag_t surrogate_user,
2173  int *count,
2174  tag_t **claimed_tasks
2175 );
2176 
2188 extern EPM_API int EPM_claim_as_surrogate(
2189  tag_t task_or_signoff,
2190  logical xfer_checkouts,
2191  int *exceptions_count,
2192  tag_t **exceptions_list
2193 );
2194 
2199 extern EPM_API int EPM_get_current_surrogates(
2200  int user_count,
2201  const tag_t* users,
2202  int* surrogate_count,
2203  tag_t** surrogate_users
2204 );
2205 
2216 extern EPM_API int EPM_release_claim(
2217  tag_t task_or_signoff,
2218  logical xfer_checkouts,
2219  int *exceptions_count,
2220  tag_t **exceptions_list
2221 );
2222 
2226 extern EPM_API int EPM_get_assignmentlists_by_job(
2227  tag_t job_tag,
2228  int* n_own_lists,
2229  tag_t** own_list_tags,
2230  int* n_group_lists,
2231  tag_t** group_list_tags,
2232  int* n_other_lists,
2233  tag_t** other_list_tags
2234 );
2235 
2244 extern EPM_API int EPM_assnlist_get_proc_template(
2245  tag_t assn_list,
2246  tag_t* process_template
2247 );
2248 
2252 extern EPM_API int EPM_set_task_result(
2253  tag_t task,
2254  const char* result
2265  );
2266 
2270 extern EPM_API int EPM_get_task_result(
2271  tag_t task,
2272  char** result
2284  );
2285 
2298 extern EPM_API int EPM_add_reviewers(
2299  tag_t job,
2300  const char* review_task_name,
2301  int add_excess_as_adhoc,
2302  int n_groupmembers,
2303  tag_t* groupmembers
2304  );
2305 
2315 extern EPM_API int EPM_add_reviewers_on_task (
2316  tag_t sst_task,
2317  logical add_excess_as_adhoc,
2318  int n_group_members,
2319  const tag_t * group_members
2320 );
2321 
2325 extern EPM_API int EPM_get_wait_for_undecided_reviewers(
2326  tag_t task,
2327  int* undecided_reviewer_count
2328  );
2329 
2330 
2340 extern EPM_API int EPM_create_participant(
2341  tag_t assignee,
2342  tag_t participant_type,
2343  tag_t* participant
2344 );
2345 
2349 extern EPM_API int EPM_get_participanttype(
2350  char* type_name,
2351  tag_t* participant_type
2352 );
2353 
2363 extern EPM_API int EPM_get_participants(
2364  const char* participant_value,
2365  tag_t task,
2366  int* member_count,
2367  tag_t** members,
2368  int* rp_count,
2369  tag_t** rps,
2370  logical single_participant
2371 );
2372 
2382 extern EPM_API int EPM_get_participant(
2383  const char* participant_value,
2384  tag_t task,
2385  tag_t* member,
2386  tag_t* rp,
2387  logical* is_resourcepool
2388 );
2389 
2400 extern EPM_API int EPM_claim_task(
2401  tag_t task_tag,
2402  tag_t signoff
2403 );
2404 
2405 
2406 /*
2407  Checks if the provided Task is claimable by the currently logged-in user.
2408 
2409  If the task is assigned to resource pool and the logged-in user is
2410  neither dba, nor the task responsible party, nor the owner of the job, the returned value @p allow_claim is false.
2411  <br/>Otherwise, the returned value @p allow_claim is true.
2412 
2413  @returns
2414  <ul>
2415  <li>#ITK_ok on success
2416  <li>#EPM_invalid_argument if the @p task is #NULLTAG
2417  <li>#EPM_invalid_object if the @p is not a valid Task
2418  </ul>
2419 
2420 
2421 */
2422 extern EPM_API int EPM_is_task_claimable(
2423  tag_t task,
2424  logical* allow_claim
2425  );
2426 
2427 /*
2428  Checks if the logged-in User has the specified privilege on the target object(s) of a given task.
2429 
2430  @returns
2431  <ul>
2432  <li>#ITK_ok on success
2433  <li>#EPM_invalid_object if the input task tag is incorrect
2434  <li>#EPM_access_denied if the privilege name is incorrect
2435  </ul>
2436 */
2437 extern EPM_API int EPM_check_access(
2438  tag_t task,
2439  const char * privilege,
2440  logical* verdict
2441  );
2442 
2443 #ifdef __cplusplus
2444 }
2445 #endif
2446 
2451 #define EBR_decision_t EPM_decision_t
2452 #define EBR_undecided EPM_undecided
2453 #define EBR_nogo EPM_nogo
2454 #define EBR_go EPM_go
2456 #define EPM_task_action_t EPM_action_t
2457 #define EPM_task_state_t EPM_state_t
2459 #define EPM_assign_task EPM_assign_action
2460 #define EPM_start_task EPM_start_action
2461 #define EPM_complete_task EPM_complete_action
2462 #define EPM_skip_task EPM_skip_action
2463 #define EPM_suspend_task EPM_suspend_action
2464 #define EPM_resume_task EPM_resume_action
2465 #define EPM_undo_task EPM_undo_action
2466 #define EPM_abort_task EPM_abort_action
2467 #define EPM_do_task EPM_perform_action
2468 #define EPM_project_task_attachment EPM_schedule_task_attachment
2469 
2473 #include <epm/libepm_undef.h>
2474 #endif