CA Service Management

 View Only

ObjectX Basics

By Giedrius Bekintis posted Sep 15, 2015 05:13 PM

  

 

I have decided to do some research and create object by the means of functionality as close to incident as possible

WARNING: if you allergic to spel code, triggers or schema modifications don’t waste your time by reading this post.

   

Step 1 Table.

 

I have created the following table:

 

////////////////////////////////////////////////////////////////////////

// Factory:   zobjectx (objectx)

////////////////////////////////////////////////////////////////////////

 

OBJECT zobjectx {

  DISPLAY_NAME "objectx";

  ATTRIBUTES zobjectx {

    customer SREL cnt;

    delete_flag SREL actbool

      REQUIRED

      {

      ON_NEW DEFAULT 0;

      };

    description STRING 4000;

    open_date DATE

      WRITE_NEW REQUIRED

      {

      ON_NEW DEFAULT NOW;

      };

    requester SREL cnt

      REQUIRED

      {

      ON_NEW DEFAULT USER;

      };

    last_mod_dt DATE { ON_CI SET NOW; };

    last_mod_by SREL cnt { ON_CI SET USER;

                           ON_NEW DEFAULT USER; };

  };

  FACTORY zobjectx {          

    STANDARD_LISTS {

      MLIST OFF;

      RLIST OFF;

    };

    REL_ATTR id;

    COMMON_NAME description;

  };

};

 

 

Step 2. Security

 

Since I want to manage security by standard means I need to enable data partitions and functional access functionality for my object

 

  1. Functional Access -  I have created the following functional access record

        

Defined this functional access for my table:

 

   

  1. Data Partitions – Since it is not possible to do this from interface, we need to load it by using pdm_load

     

    pdm_load –m –i –f dp.load

     

    content of dp.load:

     

    TABLE Controlled_Table

                  del desc obj_name sym

                  { "0" ,"Object X" ,"zobjectx" ,"Object X" }

     

    After that it is necessary to recycle service of CA SDM

     

    Ok now it is possible to define data partitions for my objectx

    

Step 3 Forms:

I have created files detai_zobjectx.htmpl and list_zobjectx.htmpl from the template files in bopcfg (detai.template; list.template). Files attached.

 

Step 4 Scoreboards:

Now I have object and forms, next I would like possibility to define scoreboards for my custom object, and have default filter for inactive objects.

 

Since I need to do some modifications that cannot be controlled by pdm_wsp, I created objectx.mod file where I place schema modifications that are needed for scoreboards

 

Content of object.mod

 

////////////////////////////////////////////////////////////////////////

// Factory:   zobjectx (objectx)

// Description: Fac_Attr_Entry zobjectx

////////////////////////////////////////////////////////////////////////

OBJECT zobjectx {

  FACTORY zobjectx {

    DISPLAY_GROUP "stored_query";

  //domset used for user scoreboard counts

    DOMSET scoreboard_user_bin "id" "" DYNAMIC ;

STANDARD_LISTS {

  WHERE "delete_flag = 0" ;

  MLIST OFF;

  RLIST OFF;

};

 

  };

};

Now I can define stored query and scoreboard for the type ObjectX

 

Conclusion:

 

  1. I have created custom object
  2. I can fully control security for this object
  3. I can write stored queries and scoreboard
  4. I have main forms for my object

  

 

 

Next I will look for the way to create activity log for my object, enable notifications for it and etc. If anyone have experience with that please share your knowledge.

 

2 comments
10 views