ITK Function Reference

(V10000.1.0.60_20160308.00)
user_exits.h
Go to the documentation of this file.
1 /*==============================================================================
2  Copyright (c) 2003-2005 UGS Corporation
3  Unpublished - All Rights Reserved
4  ==============================================================================*/
5 
12 /* */
13 
14 #ifndef USER_EXITS_H
15 #define USER_EXITS_H
16 
17 #include <tc/tc_startup.h>
18 #include <common/emh_const.h>
19 #include <unidefs.h>
20 
21 #include <tccore/method.h>
22 #include <qry/qry.h>
24 #include <sub_mgr/subscription.h>
25 #include <tccore/workspaceobject.h>
26 #include <sa/tcfile.h>
27 #include <ai/aiws_extensions.h>
28 
108 #define USER_EXIT (EMH_UE_error_base + 1)
109 
114 enum IVFType {
119 };
120 
121 typedef enum IVFType IVFType_e, *IVFType_ep;
122 
127 typedef enum IDClass_e_obsolete {
131 } IDClass_e;
132 
137 typedef enum IDFunc_e_obsolete {
142 } IDFunc_e;
143 
147 typedef enum IDValid_t {
153 } IDValid_e;
154 
155 #define USER_DATASET_always_copy 0
156 #define USER_DATASET_never_copy 1
157 #define USER_DATASET_user_chooses 2
158 
160 {
175 
177 
178 #include <user_exits/libuser_exits_exports.h>
179 
180 #ifdef __cplusplus
181  extern "C"{
182 #endif
183 
184 
199 extern USER_EXITS_API char* USER_new_file_name(
200  const char* dataset,
201  const char* ref,
202  const char* ext,
203  const int rev
204  );
205 
206 
210 extern USER_EXITS_API int PEC_Log_Handler (
211  const TcSubscriptionActionMsg_t* subscriptionActionMsg,
212  int nHandlerArgs,
213  char** handlerArgs,
214  va_list otherArgs
215  );
216 
217 
227 extern USER_EXITS_API char* USER_rev_file_name(
228  const char* old_file_name
229  );
230 
246 extern USER_EXITS_API char* USER_default_archive_filename(void);
247 
257 extern USER_EXITS_API char* USER_default_archive_tape_label(void);
258 
266 extern USER_EXITS_API int USER_create_id_counter(
267  char* counter
268  );
269 
270 extern USER_EXITS_API void USER_define_tc_next_id (void);
271 
272 extern USER_EXITS_API void USER_create_instance_item_next_id (void);
273 
286 extern USER_EXITS_API int USER_new_item_id (
287  tag_t old_item,
289  tag_t item_type,
290  logical* mod,
292  char** id
293  );
294 
300 extern USER_EXITS_API int USER_new_item_ids (
301  tag_t item_type,
302  int quantity,
303  logical* mod,
305  char*** ids
306  );
307 
313 extern USER_EXITS_API int USER_new_revision_id(
314  tag_t item_tag,
315  tag_t item_type,
316  logical* mod,
319  char** id
320  );
321 
325 extern USER_EXITS_API int USER_new_revision_id_from_alt_rule(
326  char* rule_suffix,
327  tag_t item_tag,
328  tag_t item_type,
329  logical* mod,
330  char** id
331  );
332 
345 extern USER_EXITS_API int USER_validate_item_rev_id(
346  const char* item_id,
347  const char* rev_id,
348  const char* item_type,
350  char** modified_item_id,
352  char** modified_rev_id,
354  IDValid_e* status
361  );
370 extern USER_EXITS_API int USER_validate_item_rev_id_2(
371  const char* item_id,
372  const char* rev_id,
373  const char* item_type,
375  char** modified_item_id,
377  char** modified_rev_id,
379  IDValid_e* status_item_id,
386  IDValid_e* status_rev_id
394  );
395 
396 /*
397 *
398 * Validates the item and item revision identifiers selected for a new item
399 * revision. This function may reject the supplied IDs, accept them or modify
400 * them. This action is reflected in the value of status.
401 *
402 * This function uses NR_validate_rev_id_field2 ITK function.
403 * This function takes additional item_tag input for validating Rev ID.
404 * Compared to the USER_validate_item_rev_id function, this returns a more
405 * granular valid status - separate status for Item id and Revision Id.
406 * This function will validate Item ID and Rev ID against Naming Rules only.
407 * It will not perform validation for duplicate ID since with MFK enabled it
408 * might be possible to have multiple Items with same ID.
409 *
410 */
411 extern USER_EXITS_API int USER_validate_item_rev_id_3(
412  const char* item_id,
413  const char* rev_id,
414  const tag_t item_tag,
415  const char* item_type,
417  char** modified_item_id,
419  char** modified_rev_id,
421  IDValid_e* status_item_id,
428  IDValid_e* status_rev_id
436  );
437 
451 extern USER_EXITS_API int USER_new_dataset_name (
452  tag_t owner,
459  tag_t dataset_type,
460  tag_t relation_type,
462  const char* basis_name,
464  char** dataset_name,
466  );
467 
473 extern USER_EXITS_API int USER_new_allocation_name (
474  tag_t allocation_map_rev,
475  tag_t alloc_type,
476  char ** new_allocation_name
477  );
478 
484 extern USER_EXITS_API int USER_is_allocation_correct (
485  tag_t allocation_tag,
486  tag_t allocation_window_tag,
488  logical* is_correct
489  );
490 
496 extern USER_EXITS_API int USER_is_allocation_complete (
497  tag_t allocation_tag,
498  tag_t allocation_window_tag,
500  logical* is_complete
501  );
502 
508 extern USER_EXITS_API int USER_is_allocation_configured (
509  tag_t rev_rule,
510  logical* is_configured
511  );
512 
541 extern USER_EXITS_API int USER_copied_dataset_name (
542  tag_t old_owner,
543  tag_t old_dataset,
544  tag_t relation_type,
545  tag_t new_owner,
546  char** dataset_name,
547  logical* modifiable
548  );
549 
554 extern USER_EXITS_API int USER_item_created(
555  const char* item_id,
556  const char* revision_id
557  );
558 
566 extern USER_EXITS_API int USER_item_create_cancelled(
567  const char* item_id,
568  const char* revision_id
570  );
571 
575 extern USER_EXITS_API char* USER_ask_for_new_sequence_no(
576  tag_t parent_bom_revision
577  );
578 
618 extern USER_EXITS_API int USER_ask_new_seqno (
619  tag_t parent_bom_rev,
620  tag_t item,
621  char** seqno
622  );
623 
627 extern USER_EXITS_API int USER_ask_seq_numbers(
628  tag_t parent_bvr,
629  int count,
630  tag_t* child,
631  char*** seqnos
632  );
633 
639 extern USER_EXITS_API int USER_query_execute(
640  const char* name,
641  int num_args,
642  char** keys,
643  char** values,
644  int* n_columns,
645  char*** col_names,
646  QRY_user_query_row_t** rows
647  );
648 
649 extern USER_EXITS_API int USER_query_map_row(
650  const char* query_name,
651  const QRY_user_query_row_t* row,
652  tag_t* tag
653  );
654 
655 extern USER_EXITS_API int USER_query_free_rows(
656  QRY_user_query_row_t* rows,
657  int n_columns
658  );
659 
666 extern USER_EXITS_API int USER_execute_saved_query(
667  const char* name,
668  int num_args,
669  char** keys,
670  char** values,
671  int* num_found,
672  tag_t** found
673  );
674 
678 extern USER_EXITS_API int USER_get_keyword_search_client(
679  const char* name,
680  int num_args,
681  char** names,
682  char** values,
683  char** search_client
684  );
685 
686 extern USER_EXITS_API int USER_process_keyword_search_results(
687  const char* name,
688  FILE* f_ptr,
689  int* num_found,
690  tag_t** results
691  );
692 
693 extern USER_EXITS_API void NOTE_ask_extension(
694  char* file_name,
695  char* extension
696  );
697 
701 extern USER_EXITS_API void USER_invoke_pdm_server(
702  int input_code,
703  char* input_string,
704  int* output_code,
705  char** output_string
706  );
707 
711 extern USER_EXITS_API int USER_invoke_user_code_string(
712  int input_code,
713  const char* input_string,
714  int* output_code,
715  char** output_string
716  );
717 
718 extern USER_EXITS_API int USER_invoke_user_code_taglist(
719  int input_code,
720  const char* input_string,
721  tag_t input_tag,
722  tag_t* output_tag,
723  char** output_string,
724  int* output_count,
725  tag_t** output_taglist
726  );
727 
728 extern USER_EXITS_API int USER_invoke_user_create_objs(
729  tag_t tag,
730  char* form_name,
731  char* num_of_cost_elem,
732  const char* plant,
733  char* currency,
734  char* lead_time,
735  char* supplier,
736  char* percentage,
737  char* titles,
738  char* element_vals,
739  char* ar_number,
740  char* sender_psp,
741  char* receiver_psp,
742  char* sap_index,
743  char* sap_date,
744  char* sap_amount,
745  char* purchase_req,
746  char* comments,
747  char* deleted_index,
748  char* ignored_index,
749  char* modified_index,
750  char* added_index
751  );
752 
753 
754 extern USER_EXITS_API void* user_StringLtoRCreate(
755  char* text
756  );
757 
758 extern USER_EXITS_API int USER_string_compare (
759  const char* s1,
760  const char* s2
761  );
762 
773 extern USER_EXITS_API int USER_new_current_group(
774  tag_t group_tag,
775  tag_t role_tag
776  );
777 
783 extern USER_EXITS_API void USER_register_bomline_attrs(
784  char* attr_class
785  );
786 
790 extern USER_EXITS_API int USER_gs_shell_init_module(void);
791 
795 extern USER_EXITS_API void USER_nx_shell_init_module(void);
796 
797 extern USER_EXITS_API int USER_preinit_module ( void );
798 
799 extern USER_EXITS_API int USER_init_module ( void );
800 
801 extern USER_EXITS_API int USER_exit_module ( void );
802 
811 extern USER_EXITS_API int USER_copy_revision(
812  const char* rev_id,
813  tag_t source_rev
814  );
815 
816 extern USER_EXITS_API int USER_create_revision(
817  tag_t item_tag,
818  const char* rev_id
819  );
820 
821 extern USER_EXITS_API int USER_create_item(
822  const char* item_id,
823  const char* name,
824  const char* type,
825  const char* rev_id
826  );
827 
841 extern USER_EXITS_API int USER_register_properties(void);
842 
855 extern USER_EXITS_API int USER_bom_cmp_start_report(
856  tag_t line1,
857  tag_t line2,
858  int mode,
862  int output
867  );
868 
876 extern USER_EXITS_API int USER_bom_cmp_enter_report(
877  tag_t line1,
878  tag_t line2,
879  int mode,
883  int output
888  );
889 
900 extern USER_EXITS_API int USER_bom_cmp_item_report(
901  tag_t cmp_item,
902  int depth
904  );
905 
917 extern USER_EXITS_API int USER_bom_cmp_parent_report(
918  tag_t bom_line,
919  int depth
920  );
921 
929 extern USER_EXITS_API int USER_bom_cmp_exit_report( );
930 
937 extern USER_EXITS_API int USER_bom_cmp_end_report(
938  logical changes
939  );
940 
946 extern USER_EXITS_API int USER_define_compare_descs();
947 
952 extern USER_EXITS_API int USER_define_bom_compare_modes();
953 
966 extern USER_EXITS_API int USER_ps_default_bom_view_name(
967  tag_t item,
968  tag_t view_type,
969  char** name
970  );
971 
977 extern USER_EXITS_API int USER_ps_default_bvr_name(
978  tag_t item_rev,
979  tag_t view_type,
980  char** name
981  );
982 
988 extern USER_EXITS_API int USER_bomline_is_preferred_ancestor(
989  tag_t bomline_or_appearance,
990  logical is_bomline,
991  logical* is_preferred_ancestor
992  );
993 
1009 extern USER_EXITS_API int USER_ps_update_appr_attr(
1010  tag_t appr,
1011  tag_t parent,
1012  tag_t occ,
1013  tag_t mapping
1014  );
1015 
1019 extern USER_EXITS_API int USER_appr_update_end_item_search_results(
1020  tag_t configuration_rule,
1021  int num_input_search_results,
1022  tag_t* input_search_results,
1023  int* num_output_search_results,
1024  tag_t** output_search_results
1025  );
1026 
1033 {
1034  char* type_name;
1038 
1042 extern USER_EXITS_API int USER_markup_pre_action_handler(
1043  METHOD_message_t* msg,
1044  va_list args
1045  );
1046 
1047 extern USER_EXITS_API int USER_new_dataset_id(
1048  const tag_t relatedTag,
1049  const char* ds_type,
1050  logical* mod,
1051  char** id
1052  );
1053 
1054 extern USER_EXITS_API int USER_new_dataset_rev(
1055  const char* ds_id,
1056  const char* ds_type,
1057  logical* mod,
1058  char** id
1059  );
1060 
1074 extern USER_EXITS_API int USER_new_folder_name(
1075  tag_t parent_tag,
1077  char* parent_type,
1079  char* parent_name,
1081  char* basis_name,
1082  char* folder_type,
1083  logical* mod,
1084  char** new_name
1085  );
1086 
1093 extern USER_EXITS_API int USER_new_form_name(
1094  tag_t parent_tag,
1096  char* parent_type,
1098  char* parent_name,
1100  char* basis_name,
1101  char* form_type,
1102  logical* mod,
1103  char** new_name
1104  );
1105 
1113 extern USER_EXITS_API int USER_ods_check_pubrec_access(
1114  tag_t pubrec_tag,
1115  const char* user_id,
1116  const char* group_name,
1117  const char* role_name,
1118  int client_site_id,
1119  logical* has_read_access
1120  );
1121 
1122 extern USER_EXITS_API int USER_ods_publish_object(
1123  int ods_site_id,
1124  tag_t object_tag
1125  );
1126 
1127 extern USER_EXITS_API int USER_idsm_start_remote_export(
1128  tag_t main_object_tag,
1129  int is_transferring_ownership,
1130  int ie_options,
1131  int remote_site_id,
1132  const char* remote_user_id,
1133  const char* remote_group_name,
1134  const char* remote_role_name
1135  );
1136 
1137 extern USER_EXITS_API int USER_idsm_end_remote_import(
1138  tag_t main_object_tag,
1139  int is_transferring_ownership,
1140  const char* export_directory
1141  );
1142 
1149 extern USER_EXITS_API int USER_end_local_import(
1150  tag_t main_object_tag,
1151  logical is_transferring_ownership,
1152  const char* export_directory
1153  );
1154 
1155 extern USER_EXITS_API int USER_end_import_of_item(
1156  tag_t item_tag
1157  );
1158 
1173 extern USER_EXITS_API int USER_ecm_get_prev_bvr(
1174  tag_t ec_rev_tag,
1175  tag_t bvr_tag,
1176  tag_t* prev_bvr_tag
1177  );
1178 
1185 extern USER_EXITS_API int USER_ecm_define_never_used_relations(
1186  tag_t ec_rev_tag,
1187  tag_t parent_ir_tag,
1188  tag_t aff_bvr_tag,
1189  tag_t pro_bvr_tag
1190  );
1191 
1198 extern USER_EXITS_API int USER_ecm_get_base_revision_rules(
1199  tag_t ec_rev_tag,
1200  tag_t affected_bvr_tag,
1201  tag_t problem_bvr_tag,
1202  logical* is_set,
1203  tag_t* affected_rule_tag,
1204  tag_t* problem_rule_tag
1205  );
1206 
1214 extern USER_EXITS_API int USER_ecm_get_process_name(
1215  tag_t change_rev_tag,
1216  int n_targets,
1217  tag_t* targets,
1218  char** process_name
1219  );
1220 
1226 extern USER_EXITS_API int USER_build_notify_message(
1227  const TcSubscriptionActionMsg_t* theSubscriptionMsg,
1228  char** messageSubject,
1229  int* nMessageLines,
1230  char*** messageLines
1231  );
1232 
1236 extern USER_EXITS_API int USER_build_notify_message_with_locale(
1237  const TcSubscriptionActionMsg_t* theSubscriptionMsg,
1238  const char* localeStr,
1239  char** messageSubject,
1240  int* nMessageLines,
1241  char*** messageLines
1242  );
1243 
1251 extern USER_EXITS_API int USER_add_canned_methods( void );
1252 
1253 extern USER_EXITS_API int USER_synchronize_baseline(
1254  const char* fullFilePathName
1255  );
1256 
1257 extern USER_EXITS_API int USER_baseline_dryrun_validator(
1258  const char* baseRevListFullFileName
1259  );
1260 
1274 extern USER_EXITS_API int USER_appr_item_is_above_ERCT(
1275  tag_t appr_context,
1276  tag_t item_tag,
1277  logical* is_above_erct
1278  );
1279 
1302 extern USER_EXITS_API int USER_validate_dataset_name(
1303  tag_t old_owner,
1304  tag_t old_dataset,
1305  const char* new_item_id,
1306  const char* new_revision_id,
1307  const char* item_type,
1308  const char* dataset_name,
1309  logical* valid
1310  );
1311 
1324 extern USER_EXITS_API int USER_copied_datasets_details(
1325  tag_t old_revision,
1326  const char* new_item_id,
1327  const char* new_revision_id,
1329  const char* new_item_type,
1330  int dataset_count,
1331  tag_t dataset_list[],
1332  USER_DATASET_details_t** details,
1334  logical* allow_duplicates
1335  );
1336 
1340 extern USER_EXITS_API int USER_is_dataset_exportable(
1341  tag_t dataset_tag ,
1342  int n_target_sites,
1343  tag_t* target_sites,
1344  logical is_transferring_ownership,
1345  logical modified_objects_only,
1346  logical* isExportable
1347  );
1348 
1355 extern USER_EXITS_API int USER_ask_display_revisions(
1356  tag_t item_tag,
1357  int* count,
1358  tag_t** revisions
1359  );
1360 
1361 extern USER_EXITS_API int USER_validate_alternate(
1362  tag_t idcontext_tag,
1363  tag_t identifiable_tag,
1364  tag_t altid_type,
1365  tag_t altid_tag,
1366  logical* is_valid
1367  );
1368 
1420 extern USER_EXITS_API int USER_new_alt_id(
1421  tag_t idcontext_tag,
1422  const char* preferred_pattern,
1423  tag_t altid_type_tag,
1424  tag_t parent_altid_tag,
1425  char** new_id
1426  );
1427 
1428 extern USER_EXITS_API int USER_validate_alt_id(
1429  tag_t idcontext_tag,
1430  const char* idfr_type,
1431  const char* new_id,
1432  const char* pattern_name,
1433  char** modified_id,
1434  IDValid_e* status
1435  );
1436 
1445 extern USER_EXITS_API int USER_is_item_rev_mature(
1446  tag_t item_rev_tag,
1447  logical* mature
1448  );
1449 
1450 extern USER_EXITS_API int USER_make_design_rev_primary_precond (
1451  tag_t part_rev,
1452  tag_t design_rev,
1453  logical* isDesignRevEligible
1454  );
1455 
1456 extern USER_EXITS_API int USER_register_plmxml_filters();
1457 
1458 extern USER_EXITS_API int USER_register_plmxml_schema_mappings();
1459 
1460 extern USER_EXITS_API int USER_register_plmxml_actions();
1461 
1462 extern USER_EXITS_API int USER_register_tcplmxml_filters();
1463 
1464 extern USER_EXITS_API int USER_register_tcplmxml_actions();
1465 
1466 extern USER_EXITS_API int USER_register_aiws_extensions();
1467 extern USER_EXITS_API int USER_register_plmxml_import_methods();
1468 extern USER_EXITS_API int USER_register_plmxml_export_methods();
1469 
1470 
1476 extern USER_EXITS_API int USER_register_report_columns(void);
1477 
1478 extern USER_EXITS_API logical USER_report_include_row(
1479  tag_t pff_tag,
1480  int n_tags,
1481  tag_t* obj_tags
1482  );
1483 
1491 extern USER_EXITS_API int USER_evaluate_compound_result(
1492  char* validation_name,
1493  int validation_status,
1494  logical* validation_result
1495  );
1496 
1497 extern USER_EXITS_API int USER_validation_post_action(
1498  tag_t target,
1499  logical validation_result,
1500  int validation_status
1501  );
1502 
1503 extern USER_EXITS_API int TCHANDLER_proxy_link(
1504  void* subMsg,
1505  int nRecipients,
1506  char** recipientList
1507  );
1508 
1519 extern USER_EXITS_API int USER_get_batch_meshing_nr_name
1520 (
1521  const char *meshFileName, /* <I> file name into which to encode mesh size */
1522  const char *meshSize, /* <I> mesh size to encode */
1523  const char *meshFileExt, /* <I> file name extension */
1524  char namedRefName[IMF_filename_size_c + 1] /* <O> resulting named ref name */
1525 );
1526 
1531 extern USER_EXITS_API int USER_get_batch_meshing_nr_name2
1532 (
1533  const char *meshFileName, /* <I> file name into which to encode mesh size */
1534  const char *meshSize, /* <I> mesh size to encode */
1535  const char *meshFileExt, /* <I> file name extension */
1536  char **namedRefName /* <OF> resulting named ref name */
1537 );
1538 
1539 extern USER_EXITS_API int USER_ods_client_publish_extra_attributes(
1540  tag_t object_to_publish, /* <I> Selected object to be published*/
1541  int n_attrs, /* <I> Number of extended attributed to be populated on PubR*/
1542  char** pr_pom_attr_names, /* <I> Attribute names on PubR to be added */
1543  char* attr_values[] /* <O> Attribute values on PubR to be added */
1544  );
1545 
1546 extern USER_EXITS_API int USER_ods_client_ask_extra_attributes(
1547  int* n_attrs, /* <O> Number of extended attributed to be populated on PubR*/
1548  char*** pr_pom_attr_names, /* <OF> Attribute names on PubR to be added */
1549  char*** attr_options /* <OF> Attribute options on PubR to be added */
1550  );
1551 
1552 extern USER_EXITS_API int USER_classification_autocompute_attr();
1553 
1554 extern USER_EXITS_API int USER_compute_effectivity(
1555  tag_t blTag, /* <I> BOMLine tag*/
1556  logical intersectConfigEff, /* <I> If true Occ Effectivity(netEffObjTags) is intersection of
1557  BOMLine Eff with Effectivity on BOMWindow Configuration */
1558  logical *occEffExists, /* <O> true if the occurrence has effectivity defined. */
1559  logical *isConfigured, /* <O> true if the occurrence is configured. */
1560  int *effyCount, /* <O> Occurrence Effectivity count*/
1561  WSOM_effectivity_info_t*** effectivityInfo /* <OF>Occurrence Effectivity */
1562  );
1563 
1564 extern USER_EXITS_API int USER_validate_id(
1565  char* boType, /* <I> The type name */
1566  int nKey, /* <I> Number of MFK key */
1567  char **keys, /* <I> List of MFK keys */
1568  char **values, /* <I> List of MKF vlaues */
1569  logical* isValid /* <O> The result of ID validation */
1570  );
1571 
1582 extern USER_EXITS_API int USER_where_used(
1583  char* bo_type,
1584  tag_t bo_tag,
1585  tag_t revision_rule,
1586  int* num_parents,
1587  tag_t** parents,
1588  int** levels
1589  );
1590 
1591 
1596 #ifdef __cplusplus
1597 }
1598 #endif
1599 
1600 #include <user_exits/libuser_exits_undef.h>
1601 #endif