Basic ITK Customization Concept Part-02

 

 

 

 

 

 

 

 

 

 

 

 

Types of Server Customization using ITK

1.User Exits:

  • Exit points from standard Teamcenter end-user functionality to a C program.
  • one can use them when you want to call your Customization directly from Teamcenter interactive session.
  • They are already a written function in TC_ROOT folder under include directory that will be modified as per business requirement.

2.Server Exits:

  • Server points from standard Teamcenter functionality to Java.
  • one can use them when you want to call your functions from Java in the Teamcenter Rich client.

3.Custom Exits:

  • It is a way to modify user exits and server exits to avoid unintentional changes in a code that may affect other functionality.
  • Instead of modifying the existing function, one can create our new function and place in the appropriate folder that is in bin folder of TC_ROOT.

Types of User Exits

 

1.Method Message Customization

There are three main conditions of Method Message Customization in ITK.

a.Preaction

  • if you have to perform some action before executing the method is called Pre-action.
Example:  We have discussed one business case-if I have deleted ItemRevision then it copies all dataset of previous ItemRevision to current ItemRevision at the time of deletion.

b.PreCondition:

  • if you have to check any condition before the execution of the method.
Example: We have discussed one business case-if Item is revising please check the condition ItemRevision is release then its work otherwise Item Revision is not released then showing custom error message popup

c.PostAction

  • Use if you have to perform some action after the execution of the method.
Example: We have one business case-if you perform SaveAs operation on ItemRevision the property value on its ItemRevision Master form should be filled automatically.

2.Handler Customization

Handlers are mostly used in the Workflow designer application of Teamcenter. Custom Handlers are the C programs that are compiled and linked into user exit shared libraries. One can create Action Handlers and Rule Handlers using ITK.

a.Action Handler:

  • Perform needed action using workflow.
Example: Create an additional object after the review task.


b.Rule Handler:

  • Perform check during the workflow.
Example: Validates Property and Verify reactions etc.


3.Runtime Property Extensions

Runtime Property Extensions worked on runtime execution with help BMIDE.

Basic Terminologies to write User Exits. 

1.Register Callbacks

  • It is a function that provides entry points to custom libraries. 

2.Custom Register Callbacks

  • This function registers customization for all customization contexts registered in the options dialogue box.
  • This function loads the custom library and calls entry point function pointer to register custom exits.
  • The entry point function contains the custom registration for the required User exits.
Example: int_function name_register_callbacks()

3.Custom Register Exit

a. This function registers custom exit( a custom function pointer) for a given User exit function.
int CUSTOM_register_exit ( const char* context, /* <I> */
const char* base_ftn_name, /* <I> */
CUSTOM_EXIT_ftn_t custom_ftn /* <I> */);
Context: Specifies the context in which this custom exit has to be registered. It is the name of the customization library.
base_ftn_name
Specifies the name of the USER_ exit for which the custom exit must be registered (for example, USER_init_module).
custom_ftn
Specifies the name of the customs exit (a custom function pointer).


4.Custom Execute Callbacks

This function executes the custom callbacks registered for a particular USER_ exit.
int CUSTOM_execute_callbacks ( int* decision, /* <O> */const char* ftn_name, /* <I> */variables /* <I> */ );
decision

Executes one of the following options:

  • ALL_CUSTOMIZATIONS
If you want all other customize to be executed.
  • ONLY_CURRENT_CUSTOMIZATION
if you want only your customization to be executed.
  • NO_CUSTOMIZATIONS
If you want only base functionality to be executed.
ftn_name
Name of the USER_ exit.
variables
The variables that need to be passed to the customs exit (a custom function pointer).

Algorithm (Flow) to write a Program for Method Message Customization and Handlers

1. Please Include all required header files.
2. Define DLLAPI using _descpec (dllexport) keyword.
3.Define PLMerror (We want to show our custom message).
4. Please create Custom Register callbacks function to Register customization and to call the entry point function.
5. Please create Custom Register Exit function to register a custom exit.
6. Please create Custom Execute Callbacks to execute custom callbacks registered for a particular USER_ exit.
7. For Method message customization, Use APIs like ‘Method_Find_Method’ and Method_add_precondition/post-action/preaction (depending on business requirement).
8.For Handlers,Use APIs like EPM_Register_Action/Rule_Handler, EPM_ask_root_task,EPM_ask _attachments etc.

Note: In ITK Customization only rule handler returns Decision.

EPM_decision_t:
{
                                   EPM_ nogo: when not satisfied
                          EPM_undecided: pending
           EPM_go: passed
}
9. Write program logic (custom code) as per requirement under the custom function.

Frequently Used ITK Modules & APIs in Module

1.Application Encapsulation(AE)
This module contains APIs which are mainly dealing with Dataset operations.
Example:
  • AE_ask_dataset_tool
  • AE_find_datasettype
  • AE_import_named_reference
2.Application object module(AOM)
This module contains APIs which are mainly dealing with information and operations related to Business Objects.
Example:
  • AOM_ask_name
  • AOM_Lock
  • AOM_ask_prop_names
3.Bill of Materials(BOM)
This Module contains APIs for BOM line operations
  • BOM_compare
  • BOM_create_window
  • BOM ask window top line.
4.Error message Handlers(EMH)
This Module contains APIs which mainly deals with error operations
  • EMH_ask_error_texts
  • EMH_user_error_base
  • EMH_store_error_s1
5. System Administration(SA)
This Module contains APIs which mainly deals with organization related operations
  • SA_ask_current_role
  • SA_find_group
  • SA_create_user

                                               Popular Teamcenter Article published

Basic ITK Customization Concept Part-01

Teamcenter Customize Error Messages

User Service Mechanism in Teamcenter Customization

Explanation of ITK Login Program

POM Queries in Teamcenter

Teamcenter Workflow Handlers

Microsoft Visual Studio Project configuration for Teamcenter Unified ITK

Teamcenter Unified Customization Basics

Teamcenter Unified Data Model Concept


 


Four Easy Steps to Get Subscribed

Step1:-Enter your Email address and Hit SUBSCRIBE Button.

Step2:-Please check inbox and open the email with the subject lineConfirm your subscription for Global PLM“.

Step3:-Please click “Confirm Follow” and you got the email with the subject” Confirmed subscription to posts on Global PLM”.

Step4:-Voila, You are subscribed.Happy Learning


 

We will more post on  PLM Tutorial–>Teamcenter Customization in upcoming days.

Kindly provide your valuable comment on the below Comment section and We will try to provide the best workaround.

Kindly subscribe to your Email-Id at (http://globalplm.com/) and drop any suggestions/queries to (globalplm2@gmail.com).

Leave a Reply

Your email address will not be published. Required fields are marked *