Tuesday, March 12, 2019

Dynamic Script Validation passing multiple parameters

Here is a small example where i am trying to find if a node exists in alternate hierarchies. if not list which hierarchies it does not exist.

Note: SJ_PropList is a hierarchy level property of list group type. this property stores list of alternate hierarchy that the validation needs to check.

----- Begin -----
var AltHiers =node.Hier.PropValue("Custom.SJ_PropList");
var NodeExistsin = node.PropValue("Core.References");
var missingHiers;
for(i=0;i<AltHiers.length;i++)
{
    if(NodeExistsin.indexOf(AltHiers[i]) == -1)
    {
        if(missingHiers == null)
        {
        missingHiers=AltHiers[i];
        }
        else
        {
            missingHiers=missingHiers+","+AltHiers[i];
        }
    };
};
return{
        success:false,
    parameters:[node.Abbrev,missingHiers]
   // parameters:[1,2] => {0}{1}
}
----- End -----

in the above example i am returning two values in the parameters section of return statement. 
first parameter will be returned to {0} and second will be returned to {1} so on and so forth.

Thursday, January 19, 2017

External Lookup - Database

One of the new addition to DRM is external lookup.
What it does? Well it allows users to query external system for a property value. Currently it supports Database SQL/Procedure and WebServices.

In this blog i will be showing how to create external lookup and use.

Example: We will try to pass a zipcode and receive city name using external connections.

Note: I have already created a table called City_ZIP that constain city/zip/state and related information. 


Step 1
External Connection : We need to create external connection so that DRM know where to query for the data for external lookup.

  • In Administer page of DRM, Click New and select External Connections
  • Enter the database information. make sure the connection is successful by clicking on the plug icon (next to save icon)

  • Click Save and click on the External Operations tab (located at bottom section)


  • Click Add button. Click Statement Tab
  • Enter Name: Get_City
  • Operation Type: Lookup
  • Database Operation type: Statement
  • Parameters: MyZipCode
  • Test Value: 00704 (This is optional. this is just to test. you can use any value that exists in the table). 
  • SQL Statement: Select * from City_Zip where zipcode=<%MyZipCode%>;

  • Click on the plug icon on top right. if everything is correct you should see results.
  • Note: In the statement section remove the test value before saving. If you forget the lookup will always show data for the test value.
  • Click OK. Click Save.

Step 2
Creating properties. We will create two properties. One for storing ZipCode and second will be look up to get CityName

  • Create a Property as Zip_Code
  • Name: Zip_Code
  • Label: Zip_Code
  • Property Level: Global
  • Property Type: Defined
  • Assign to category you want.If you dont assign you'll not be able to see the property.
  • Save

  • Create property : City_Name
  • Property Name: City_Name
  • Label:City_Name
  • Property Level: Global
  • Property Type: External Lookup

    Click on External Lookup Tab
    External Connection: DBConnection (one that you created in Step 1)
    Operation: Get_City
    Parameter Mapping
    Name: MyZipCode
    Param Source Type: Property
    Param Source: Custom.Zip_Code (this is the property we just created in Step 2)
    Column/property Mappings
    Click on the Name List Box and select which column you want to use. In our example we wanted to get City.
    Click Save.


Step 3 : Testing
  • Open Hierarchy
  • Select a node.
  • In the Zip_Code Property enter a valid zip code: example: 00704
  • Click eclipse button on the City_Name Property.
  • you should see a popup list with all the cities within the zip code.
  • Select one of them and it should get saved in the City_Name Property.





    Thursday, January 5, 2017

    Looking for a cheaper way to host DRM? look no further

    I was looking for a cheaper way to host DRM that could be accessed from anywhere in the world.
    Good News, I have successfully setup DRM and Oracle Database on cloud within 15 minutes.

    Welcome to Amazon Cloud Services. 

    As of now i dont think i can get any cheaper deals than be able to host and try DRM instance for Free.

    Currently used

    1. Windows 2012 Base (free tier)
    2. AWS RDS (Oracle Standard instance) (free tier)

    For More details feel free to reach out to me.

    Sunday, January 1, 2017

    DRM User maintenance and provisioning a pain? Not anymore

    The latest version of DRM 11.1.2.4.340 now allows you to synchronize user, role assignment, node access group assignment and property category assignment directly from shared services.

    This will save tons of time for clients as they dont have to create users in both shared services and DRM.

    The synchronization can be scheduled or manually performed or automatically (when user logs in).

    Note: Setting up this feature can be little tricky but once done it works just fine.

    -- Happy New Year ---

    Wednesday, March 9, 2016

    Splunk Services & DRM Conflict

    Recently one of my client have started using Splunk Enterprise. Splunk services seems to be interfering with DRM, especially with the DRM's task event process that writes to windows event. 


    Symptoms:
    When drm services are restarted, none of the engines or other processes are able to start. windows event viewer does not capture reason or any errors related to drm.
    Fix: currently only fix i found was to kill the Splunk service and then start drm services. 



    Thursday, January 14, 2016

    DRM Dinner Event @ NYC


    This is Invite Only event. If any company needs invitation please reach out to the contact in the attachment.


    Monday, December 7, 2015

    Using Autosys to Run DRM Batch Jobs

    In order for autosys to ru ndrm batch jobs, make sure the service account used by the autosys agent has 'Interactive Logon' privilege. without this you will get an error and autosys jobs fail. in other words if you get invalid username/password when autosys job fail then it could be because of the missing interactive logon or the password is invalid.