0% found this document useful (0 votes)
24 views

ITK Text Document

Uploaded by

Mirza Rahil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

ITK Text Document

Uploaded by

Mirza Rahil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

#define _CRT_SECURE_NO_WARNINGS

#include <ict/ict_userservice.h>
#include <tccore/tcaehelper.h>
#include <user_exits/aiws_ext.h>
#include <tc/preferences.h>
#include <ss/ss_errors.h>
#include <tccore/custom.h>
#include <itk/mem.h>
#include <tc/tc.h>
#include <user_exits/user_exits.h>
#include <tccore/method.h>
#include <tc/emh.h>
#include <epm/epm.h>
#include <tccore/tctype.h>
#include <tccore/item.h>
#include <epm/epm.h>
#include <tccore/workspaceobject.h>
#include<ae/dataset.h>
#define AE_reference_size_c 32

EPM_decision_t EPM_check_PhysicalFileValidation(EPM_rule_message_t msg)


{
int status;
char * userName;
EPM_decision_t decision = EPM_nogo;
tag_t dataset;
AE_reference_type_t reference_type;
tag_t referenced_object;
char reference_name[AE_reference_size_c + 1];
//MyTeamcenter.pdf "PDF_Reference"

status = AE_find_dataset("doc_pdf",&dataset);
if (dataset != NULLTAG)
{
printf("dataset has been found\n");
decision = EPM_go;
}
if (dataset == NULLTAG)
{
printf("dataset has not been found\n");
decision = EPM_nogo;
}

strcpy(reference_name, "PDF_Reference");
status = AE_ask_dataset_named_ref(dataset, reference_name , &reference_type,
&referenced_object);
if (status == ITK_ok)
{
if (referenced_object != NULLTAG)
{
printf("Dataset Contains Physical Files\n");
decision = EPM_go;
}
if (referenced_object == NULLTAG)
{
printf("There is no Physical File Attached to Dataset\n");
decision = EPM_nogo;
}
}
else
printf("AE_ask_dataset_named_ref not working");

return decision;
}
extern "C" int RH_PhysicalFileValidation_register_custom_handlers(int *decision,
va_list args) {
int rcode = ITK_ok;
*decision = ALL_CUSTOMIZATIONS;
rcode = EPM_register_rule_handler("RH_PhysicalFileValidation", "This is to
check Physical File Validation", EPM_check_PhysicalFileValidation);
printf("Registering start\n");
if (rcode == ITK_ok)
fprintf(stdout, "RH_PhysicalFileValidation successfully registered!\
n");
else
fprintf(stdout, "WARNING - RH_PhysicalFileValidation NOT registered!\
n");
return rcode;
}
extern "C" DLLAPI int RH_PhysicalFileValidation_register_callbacks() {
CUSTOM_register_exit("RH_PhysicalFileValidation",
"USER_gs_shell_init_module",
(CUSTOM_EXIT_ftn_t)RH_PhysicalFileValidation_register_custom_handlers);
return (ITK_ok);
}

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy