CA Service Management

 View Only

Custom hiersel & hierload & factory to rootcause (RC) 

Jun 13, 2017 01:47 PM

This document will show how to create new hiersel, hierload and new factories to table rootcause (rc).
On this example I'm using the rootcause categorys to request and incidents on detail_in.htmpl.

 

1º) Create 2 new columns on table rootcause (z_cr_flag and z_in_flag - INTEGER);

 

 

 

 

2º) Create 2 new factorys with .mod files just like below: <After install this files, you must restart the CA SDM services>

 

 

File: rc_cr.mod

OBJECT rc {


FACTORY rc_cr{

RESTRICT "z_cr_flag = 1 " { z_cr_flag=1};


STANDARD_LISTS {

MLIST OFF;

RLIST OFF;

SORT_BY "sym";

};

REL_ATTR persistent_id;

COMMON_NAME sym;

};

};        

 

File: rc_in.mod

OBJECT rc {


FACTORY rc_cr{

RESTRICT "z_in_flag = 1 " { z_in_flag=1};


STANDARD_LISTS {

MLIST OFF;

RLIST OFF;

SORT_BY "sym";

};

REL_ATTR persistent_id;

COMMON_NAME sym;

};

};

   

 

3º) Create new files: hiersel_rc_cr.htmpl and hierload_rc_cr.htmpl ||| hiersel_rc_in.htmpl and hierload_rc_in.htmpl 

<You can copy the default files of rc -- hiersel_rc.htmpl and hierload_rc.htmpl -- this files could be located at $NXROOT\bopcfg\www\htmpl\default >

           

After copy the files and rename them, put the new files at $NXROOT\site\mods\www\htmpl\default                   

 

You must change the factory on each one of them, effectly the change must be applied on this part of the code:

 

hiersel_rc_cr.htmpl and hierload_rc_cr.htmpl

<PDM_LIST PREFIX=list FACTORY=rc_cr WHERE="${args.KEEP.HierWc:}"

 

hiersel_rc_in.htmpl and hierload_rc_in.htmpl 

<PDM_LIST PREFIX=list FACTORY=rc_in WHERE="${args.KEEP.HierWc:}"

 

4º) On detail_in.htmpl you must add the follow code to separate each factories:

 

<PDM_IF "$args.zType2" == "I">
<PDM_MACRO name=dtlHier hdr="Categoria de fechamento" attr=rootcause factory=rc_in autofill="no">
<PDM_ELIF "$args.zType2" == "R">
<PDM_MACRO name=dtlHier hdr="Categoria de fechamento" attr=rootcause factory=rc_cr autofill="no">
</PDM_IF>

 

zType2 is the attribute that controls the type of the ticket (Incident or Request).

 

 

     

Statistics
0 Favorited
19 Views
6 Files
0 Shares
2 Downloads
Attachment(s)
zip file
hierload_rc_cr.htmpl.zip   951 B   1 version
Uploaded - May 29, 2019
zip file
hierload_rc_in.htmpl.zip   951 B   1 version
Uploaded - May 29, 2019
zip file
hiersel_rc_cr.htmpl.zip   1 KB   1 version
Uploaded - May 29, 2019
zip file
hiersel_rc_in.htmpl.zip   1 KB   1 version
Uploaded - May 29, 2019
zip file
rc_cr.mod.zip   286 B   1 version
Uploaded - May 29, 2019
zip file
rc_in.mod.zip   286 B   1 version
Uploaded - May 29, 2019

Tags and Keywords

Comments

Mar 30, 2018 09:06 AM

Thank you very much for this example.

 

Could this be accomplished using one .mod file and adding the rc_in factory definition beneath the rc_cr factory?

(BTW, the code in 'rc_in.mod' above shows the factory as 'rc_cr').

 

J.W.

Related Entries and Links

No Related Resource entered.