The amazing world of IBM ODM and more

The amazing world of IBM ODM blog - Angello Manrique Vigil
  • HOME
  • ABOUT ME
  • CONTACT ME

Connecting to external Database with ODM API

by Angello Manrique Vigil / Thursday, 17 August 2017 / Published in Debug, Decision Center, Decision Table, Java, ODM API, Rule Designer

The IBM ODM Decision Center and the Rule Execution Server values are stored, by default, in a Derby database that comes with the IBM ODM suite installation. During a rules development project we sometimes need to access these values and insert them on an external database or update this external database accordingly. In this post I will show you how to connect to an external Datase with the ODM API in java and execute a simple query after collecting Decision Center values. You can use this method in your project with any values you need from the Decision Center.

To understand the basics of the ODM API, please refer to my previous post about the IBM ODM API here.


  1. Preparing Decision Center Values
    • In our Java project make sure you can connect successfully to the Decision Center.ODM API connection decision center sample
    • Personalize the values you need from the Decision Center. For example the Rule project name:IBM ODM API rule project name sample
  2. Connecting to an External DB
    • Let’s create a new Java class with the Connection details.odm api db java class sample
    • It is a good practice to have the value of the connection datasource in a properties file.odm api db java properties sample
    • Create a getConnection() method in the DBConnection class and add the following structure:odm api java db sample
    • Return the con variable and call this method from the main ODM API java class:odm api java db method sample

Now you are ready to execute any statement in the external DB using the Decision Center variables. Query statement sample: ps = con.prepareStatement(“INSERT INTO db.dt VALUES (‘”+ruleProject.getName())

I hope you enjoy this tutorial and please feel free to contact me with any query or feedback, thank you!

Tagged under: DecisionTable, Java, ODMAPI, RuleDesigner

About Angello Manrique Vigil

IBM Certified ODM Consultant with 6+ years of experience in designing and developing end to end BRMS and BPM enterprise applications systems. LinkedIn: https://www.linkedin.com/in/angello90/

What you can read next

ODM on Docker!
Custom log file with ODM API
Working with the Decision Center API

2 Comments to “Connecting to external Database with ODM API”

  1. istanbul real estate says :Reply
    September 19, 2017 at 8:36 pm

    Thanks foor finally writing aabout >Connecting too external Database with
    ODM API | The amazing world of IBM ODM and more <Loved it!

    1. Angello Manrique Vigil says :Reply
      September 21, 2017 at 6:58 pm

      I’m glad you loved it! Thanks for the support 🙂

Leave a Reply Cancel reply

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

Categories

  • Ant Tasks
  • Bluemix
  • Cloud
  • Database
  • Debug
  • Decision Center
  • Decision Operation
  • Decision Table
  • Decision Warehouse
  • Docker
  • Domains
  • Java
  • ODM API
  • RPA
  • Rule Authoring
  • Rule Designer
  • Rule Execution Server (RES)
  • Rule Solutions for Office
  • Ruleflow
  • UiPath

Archives

  • August 2018
  • July 2018
  • June 2018
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017

Subscribe

  • Register
  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Tags

AntTasks Bluemix BOM BOM2XOM Cloud Database Debug DecisionCenter DecisionComposer DecisionOperation DecisionService DecisionTable DecisionWarehouse Deployment Docker Domains DynamicDomains Java Lists ODMAPI RES RPA RuleApp RuleDesigner RuleFlow Ruleset RuleSolutionsForOffice SOAP SoapUI UiPath XOM

Recent Posts

  • RPA – UiPath: Working with Excel

    In this blog post we will talk about working wi...
  • ODM on Docker!

    If you are a DevOps enthusiast like me you prob...

Angello Manrique Vigil

IBM Certified ODM Consultant with 6+ years of experience in designing and developing end to end BRMS and BPM enterprise applications systems.
LinkedIn: https://www.linkedin.com/in/angello90/

All rights reserved. Made by Angello Manrique Vigil.

TOP