Creating a new FM
Steps to create a new FM in a CM :
1. Defining new opcodes
You must define your custom opcodes, with their numbers, in a header file and execute parse_custom_ops_fields.pl on the file. parse_custom_ops_fields.pl creates an extension to the pcm_tbls.c file. Client applications use pcm_tbls.c to map a field or opcode to its number.
Portal opcodes and their numbers are defined in the ops/*.h files in the <BRM_HOME>/include directory.
To pass new opcodes from a client application to a new FM, use the PCM_OP macro.
To define a new opcode:
a). Create a header file and define your new opcodes by using this format:
#define opcode_name_1 opcode_number_1
For example, you might create a header file named my_opcodes.h with these definitions :
#define MY_OP_SET_AGE 100001
#define MY_OP_SET_LANGUAGE 100002
Important: Numbers upto 100000 are reserved for use by BRM.
b). Run the parse_custom_ops_fields.pl perl script by using this syntax:
parse_custom_ops_fields.pl -L language -I input -O output -P java_package
c). For the applications written in PCM C or PCM COM, create an entry using the following format in the pin.conf each application :
- - ops_fields_extension_file ops_flds_ext
Where ops_flds_ext is the file name and location of the memory-mapped extension file that was created by the parse_custom_ops_fields.pl script.
Make sure that you included your header file both in the application that is calling the opcode and in the custom FM.
2. Writing a function to implement a new opcode
To implement a new opcode in BRM, you have to write a new function that calls the base system opcodes to access the DM. The new function then becomes part of the new FM shared library in UNIX.
The new function you are implementing should conform to the PCM_OP calling convention.
Use the PCM_OP_* reference pages as checklists and templates to determine what your custom function must implement. Pay particular attention to the input and output flists.
Important If you are adding a new function in the fm_utils module that can be called outside the module, add a prototype of that function in the fm_utils.h
3. Creating an opcode-to-function mapping file
You create a configuration program fm_*_config.c to map an opcode name to the function that implements it. This configuration file is read when a dynamic library is created, and the mapping information is stored in it. When a parent CM is inititalized, it configures the opcode-function pairs into itself, and each child CM inherits the same configuration as its parent CM.
The configuration program contains an array of struct cm_fm_config for each opcode and its corresponding function and the config function at the end.
For a definition of this struct (cm_fm_config), see the cm_fm.h file in the BRM_SDK_HOME/include directory.
The following example shows an opcode-to-function configuration file.
Important Include you ".h" file with your new custom opcodes
#ifndef lint
static char Sccs_id[] = "@(#) fm_custom_config.c 1.0 24 May 2011 %";
#endif
#include <stdio.h> /* for FILE * in pcm.h */
#include "ops/base.h"
#include "pcm.h"
#include "cm_fm.h"
#include "ops/my_header.h"
/*******************************************************************
* Opcodes handled by this FM.
*******************************************************************/
struct cm_fm_config my_config[] = {
/* opcode as a u_int, function name (as a string) */
{ MY_FIRST_OPCODE , "op_my_opcode" },
{ 0, (char *)0 }
};
void * my_config_func()
{
return ((void *) (my_config));
}
When the CM gets a MY_FIRST_OPCODE opcode through the PCM_OP call from a client application, the CM looks up at this table and calls the op_cust_create_acct() function.
4. Adding a new FM module to the CM configuration file
The configuration file contain the names of the shared libraries that implement the base and custom opcodes. It also contains the names of the corresponding configuration files that contain the opcode-to-function mappings.
Use the entries for the system FMs in the default CM configuration file pin.conf in the BRM_HOME/sys/cm as an example to add your custom FM entries. For example, the typical entries for custom FMs look like:
- cm fm_module BRM_HOME/lib/my_fm.so my_config - pin
In this example, I'm assuming that the new dynamic library that implements the new custom FM my_fm.so is copied to BRM_HOME/lib directory. "my_config" is the name of the configuration implementation that contains the name-to-function mapping of the new custom OpCode.
5. Compiling and linking a custom FM
Use the libraries in the Portal_SDK_home/lib for linking.
Each custom FM must be created as a shared library on UNIX
Steps to create a new FM in a CM :
- Define new opcodes
- Write a function to implement the new opcode
- Write a program to map opcodes to functions
- Create a shared library on UNIX i.e. ".so" file
- Configure the new FM as part of the CM
1. Defining new opcodes
You must define your custom opcodes, with their numbers, in a header file and execute parse_custom_ops_fields.pl on the file. parse_custom_ops_fields.pl creates an extension to the pcm_tbls.c file. Client applications use pcm_tbls.c to map a field or opcode to its number.
Portal opcodes and their numbers are defined in the ops/*.h files in the <BRM_HOME>/include directory.
To pass new opcodes from a client application to a new FM, use the PCM_OP macro.
To define a new opcode:
a). Create a header file and define your new opcodes by using this format:
#define opcode_name_1 opcode_number_1
For example, you might create a header file named my_opcodes.h with these definitions :
#define MY_OP_SET_AGE 100001
#define MY_OP_SET_LANGUAGE 100002
Important: Numbers upto 100000 are reserved for use by BRM.
b). Run the parse_custom_ops_fields.pl perl script by using this syntax:
parse_custom_ops_fields.pl -L language -I input -O output -P java_package
c). For the applications written in PCM C or PCM COM, create an entry using the following format in the pin.conf each application :
- - ops_fields_extension_file ops_flds_ext
Where ops_flds_ext is the file name and location of the memory-mapped extension file that was created by the parse_custom_ops_fields.pl script.
Make sure that you included your header file both in the application that is calling the opcode and in the custom FM.
2. Writing a function to implement a new opcode
To implement a new opcode in BRM, you have to write a new function that calls the base system opcodes to access the DM. The new function then becomes part of the new FM shared library in UNIX.
The new function you are implementing should conform to the PCM_OP calling convention.
Use the PCM_OP_* reference pages as checklists and templates to determine what your custom function must implement. Pay particular attention to the input and output flists.
Important If you are adding a new function in the fm_utils module that can be called outside the module, add a prototype of that function in the fm_utils.h
3. Creating an opcode-to-function mapping file
You create a configuration program fm_*_config.c to map an opcode name to the function that implements it. This configuration file is read when a dynamic library is created, and the mapping information is stored in it. When a parent CM is inititalized, it configures the opcode-function pairs into itself, and each child CM inherits the same configuration as its parent CM.
The configuration program contains an array of struct cm_fm_config for each opcode and its corresponding function and the config function at the end.
For a definition of this struct (cm_fm_config), see the cm_fm.h file in the BRM_SDK_HOME/include directory.
The following example shows an opcode-to-function configuration file.
Important Include you ".h" file with your new custom opcodes
#ifndef lint
static char Sccs_id[] = "@(#) fm_custom_config.c 1.0 24 May 2011 %";
#endif
#include <stdio.h> /* for FILE * in pcm.h */
#include "ops/base.h"
#include "pcm.h"
#include "cm_fm.h"
#include "ops/my_header.h"
/*******************************************************************
* Opcodes handled by this FM.
*******************************************************************/
struct cm_fm_config my_config[] = {
/* opcode as a u_int, function name (as a string) */
{ MY_FIRST_OPCODE , "op_my_opcode" },
{ 0, (char *)0 }
};
void * my_config_func()
{
return ((void *) (my_config));
}
When the CM gets a MY_FIRST_OPCODE opcode through the PCM_OP call from a client application, the CM looks up at this table and calls the op_cust_create_acct() function.
4. Adding a new FM module to the CM configuration file
The configuration file contain the names of the shared libraries that implement the base and custom opcodes. It also contains the names of the corresponding configuration files that contain the opcode-to-function mappings.
Use the entries for the system FMs in the default CM configuration file pin.conf in the BRM_HOME/sys/cm as an example to add your custom FM entries. For example, the typical entries for custom FMs look like:
- cm fm_module BRM_HOME/lib/my_fm.so my_config - pin
In this example, I'm assuming that the new dynamic library that implements the new custom FM my_fm.so is copied to BRM_HOME/lib directory. "my_config" is the name of the configuration implementation that contains the name-to-function mapping of the new custom OpCode.
5. Compiling and linking a custom FM
Use the libraries in the Portal_SDK_home/lib for linking.
Each custom FM must be created as a shared library on UNIX
Hey Madhu Mohan, Have you worked on pipeline?
ReplyDeleteGood one. Hi Veracious Cobra. what is ur linkedin id? I am into BRM.
ReplyDeleteIam into OBRM implementation, Support and Maintenance having 5 years into this, interested to move to development, Can You please help me..
ReplyDeleteSrini,Please let me know your personal mail id so that I can get in touch with you.
ReplyDeleteHi Sachid, Im into BRM Support and Maintenance having 4 years of experience.
DeleteBro plz share your mail we need help coz I am just starting my carrier with brm
Deletealokupadhayay1997@gmail.com
Dear Sachid,
ReplyDeleteSorry for the delayed reply, my personel mail id is srinivas190@gmail.com.
Regards
Srinivasagopalan
This comment has been removed by the author.
ReplyDeletehi Tausif, sent a mail to you regarding the same.
DeleteHi Sachid,
ReplyDeleteCan you please help me also .I'm into OBRM having 2.6 years of experience in support . Willing to move to development and improve my skills in BRM .
Your guidance is appreciated.please help me out.
Thanks
Arun
0701arun.k@gmail.com
hi Arun, I will mail you with the details.
DeleteHi Sachid,
ReplyDeleteI have 2.5 years experience in OBRM support.I want to move in development , so could you please help me out.....
Leelakrishna
Hi Leela, can you share your details if you are still looking for change
DeletePlease share ur mail id i will forward my Resume and details.
DeleteMy mail id : vogguleelakrishna@gmail.com
Hi Sachid,
ReplyDeleteI have experience in BRM support. Can you help me if you have some requirements for the same.
Ankit
ankitchakraborty.bcrec@gmail.com
Hi Sachid,
ReplyDeleteI'm having 5.5 years of exp in BRM product development & consulting. I have my h1 approved but stamping yet to happen. I'm good in BRM development, migration & Java. Please let me know if there are any opportunities for me.
Thanks,
kn4chotu@gmail.com
Hi Sachid,
ReplyDeleteI'm Abbas. I entering in to BRM support but i have some doubts please clarify them.
BRM is valuable domain ? how much career growth will be in BRM? i type my mail id with this please revert to me.
Thanks,
mohammedabbasyusuf@yahoo.com
hai Brothers,
ReplyDeleteI'm siva.I Entering into BRM development and I have 1 year exp in Development any opp in Brm please inform me.
Thanks
mail:snanda.cheemala@gmail.com
ph:+91 9505503973
linked in : http://in.linkedin.com/in/brmsiva
hai brother, your blog is very interesting...easy to understand... can you me show some info on how to become BRM developer...i'm new in BRM around 5 years on support...but lately seems i need to know further on FM details....
ReplyDeletemy email = zack.azha@gmail.com
Hi Sachid,
ReplyDeleteI am into OBRM Since 6 years, I want to move to Development, Please advice, how to improve my skills for the same.
Thank you,
Arshad
iamarshadshaik@gmail.com
Hi sir
DeleteI am into brm since 4 months only,please give me guidance to write small custom opcodes and also provide me the documentation link if possible
Thanks in Advance
v. srinivas
vunnamsrinivas555@gmail.com
hi sir,
ReplyDeleteI am into brm since 4 months only,i need to go for development side after 1 or 2 years later..so, please give me the giudance as i am a fresher.
So, please provide any documentation or tips to move on with our brm
Thanks&Regards
v.srinivas
vunnamsrinivas555@gmail.com
Hi sir
ReplyDeletei want to move to brm development. having 3 years of experience in brm support and operation.
My mail id: nurul.sky@gmail.com
Hi all,
ReplyDeleteI am new in this field of Oracle BRM and finding it very to understand Oracle BRM. Can anyone here guide me , how to deal with oracle BRM and understand all its concepts.
Thanks and Regards
Tarun Goyal
Hi Sachid,
ReplyDeleteCan you please help me also .I'm into BRM having 3 years of experience in Testing . Willing to move to development and improve my skills in BRM .
Your guidance is appreciated.please help me out.
Thanks
Sai
Hello Sachid,
ReplyDeleteCould you please help me too....I want to deep dive in core BRM.
My email : jnaneshwarc47@gmail.com
Hi Sachid,
ReplyDeleteI am into OBRM having 3+ years of experience in support. I have experience in developing SOAP web services (Java). I am looking for development, Can you please guide?
Email: rohitasaini88@gmail.com
Thanks,
Rohit
Thanks
Rohit
Hi Sachid,
ReplyDeleteI am 2 years experienced in BRM support.
Now I need to learn BRM Dev. I would like to start from writing new opcodes and customizing it.
The above article is good but Can you please provide me the path details and input output examples in detailed way.
My Email id: kuduvashalini89@gmail.com
Thanks in advance!!
Thanks,
Shalini
Hi Sachid,
ReplyDeleteCan you please help me also .I'm into OBRM having 2.8 years of experience in L2 support . Willing to move to development and improve my skills in BRM .
Your guidance is appreciated.please help me out.
thanks,
akshay
akshaykudaturkar@gmail.com