GithubHelp home page GithubHelp logo

decision-center-api-samples's People

Contributors

alainrobert avatar fredmerci avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

decision-center-api-samples's Issues

issue with configure-dt-0.0.7.jar . NPE if the argument -unhideColumns is not provided

The command below

java -cp "%ODM_HOME%/teamserver/lib/*;%ODM_HOME%/teamserver/lib/eclipse_plugins/*" com.ibm.odm.tools.ConfigureDT -username rtsAdmin -password rtsAdmin -url http://localhost:9090/decisioncenter -dataSource jdbc/ilogDataSource -decisionService "Miniloan Service" -branch %%current_key -gapCheck false

yields the exception:

java.lang.NullPointerException
        at com.ibm.odm.tools.ConfigureDT.updateDT(ConfigureDT.java:195)
        at com.ibm.odm.tools.ConfigureDT.updateBranch(ConfigureDT.java:162)
        at com.ibm.odm.tools.ConfigureDT.execute(ConfigureDT.java:111)
        at ilog.rules.teamserver.client.internal.BRMServerClient.doExecute(BRMServerClient.java:38)
        at com.ibm.odm.tools.ConfigureDT.main(ConfigureDT.java:301)

This exception does not occur when adding the argument -unhideColumns false

java -cp "%ODM_HOME%/teamserver/lib/*;%ODM_HOME%/teamserver/lib/eclipse_plugins/*" com.ibm.odm.tools.ConfigureDT -username rtsAdmin -password rtsAdmin -url http://localhost:9090/decisioncenter -dataSource jdbc/ilogDataSource -decisionService "Miniloan Service" -branch %%current_key -gapCheck false -unhideColumns false

ConfigureDT stops processing DTs after getting an exception due to a locked DT

If there are locked DT's , throws exception and appears to stop processing

$  /opt/IBM/ODM893/jdk/bin/java  -cp "/opt/IBM/ODM893/teamserver/lib/*:/opt/IBM/ODM893/teamserver/lib/eclipse_plugins/*:" com.ibm.odm.tools.ConfigureDT -username rtsAdmin -password rtsAdmin -url http://zzxr760    1.msci.svl.ibm.com:9084/decisioncenter   -dataSource jdbc/ilogDataSource  -decisionService  ,serviceName -branch  MAIN   -autoResize false
Configure DT properties in decision service 'PremierDiscountRules_MainRuleFlow'
Nov 30, 2021 6:02:36 PM com.ibm.rules.decisioncenter.remoting.internal.RemoteSessionHttpExecutorBuilder log
INFO: {"url":"http://zzxr7601.msci.svl.ibm.com:9084/decisioncenter","datasource":"jdbc/ilogDataSource","username":"rtsAdmin","message":"Sign in successfully","date":"November 30, 2021 6:02:36 PM"}
Nov 30, 2021 6:02:36 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@24bb3131: startup date [Tue Nov 30 18:02:36 PST 2021]; root of context hierarchy
Nov 30, 2021 6:02:36 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [ilog/rules/teamserver/client/client-applicationContext.xml]
Nov 30, 2021 6:02:37 PM com.ibm.rules.decisioncenter.remoting.internal.RemoteSessionHttpExecutorBuilder log
INFO: {"url":"http://zzxr7601.msci.svl.ibm.com:9084/decisioncenter","datasource":"jdbc/ilogDataSource","username":"rtsAdmin","message":"Sign in successfully","date":"November 30, 2021 6:02:37 PM"}
Nov 30, 2021 6:02:37 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@a3bfabf1: startup date [Tue Nov 30 18:02:37 PST 2021]; root of context hierarchy
Nov 30, 2021 6:02:37 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [ilog/rules/teamserver/client/client-applicationContext.xml]
-- skipping lines --
Updating 489 DT in serviceName in branch MAIN
ilog.rules.teamserver.model.IlrObjectLockedException: GBRDR0031E: The element 'rule1' of type 'decision table' is already locked by user user1
        at ilog.rules.teamserver.ejb.service.IlrSessionFacadeImpl.commit(IlrSessionFacadeImpl.java:1436)
        at ilog.rules.teamserver.ejb.service.IlrSessionFacadeImpl.commit(IlrSessionFacadeImpl.java:1131)
.

\]

 Deleted the entries , ran configureDT cmd again and it appears to continue processing .

ConfigureDT requires 2 changes

Proposed changes to ConfigureDT-
https://github.com/ODMDev/decision-center-api-samples/tree/master/configureDT

  1. Utility cannot perform a "deep" or recursive config for every branch in the hierarchy (i.e. nested)
    as this creates a data integrity conflict across versions as well as transaction timeouts which rolls-back the entire task
    when session times out for very large projects with many DT's and nested branches.

Therefore when a DS and branch is specified , only the DTs within a given branch
should be modified and not all DTs in sub-branches or nested branches.

additional parameter [-branch <branch_name> ] is required

 Specifies a branch within a Decision Service.
 If empty, default is the  main branch of the Decision Service

resulting in the following syntax, changes shown in bold:

java -cp "<odm_home>/teamserver/lib/:<odm_home>/teamserver/lib/eclipse_plugins/:"com.ibm.odm.tools.ConfigureDT - username -password -url -dataSource -decisionService [-branch ] [-overlapCheck true|false] [-gapCheck true|false] [-manualOrdering true|false] [-autoResize true|false]

This implies that DT's only within the dsName / branchName will be modified even if there are child (or nested) branches
within this branch.

  1. Additional changes are needed to the ODM session code to prevent session timeouts for branches with many DTs.
    this implies that for any ConfigureDT invocation given a dsName and branchName, regardless of the number of DT's affected or length of time required to complete without any additional actions needed, such as manually extending the transaction timeout in WebSphere or within the ODM Decision Center admin console.

Task could potentially take many hours to complete, well beyond a "reasonable WebSphere max transaction duration"
needed as an upper limit for other WebSphere transactions and ConfigureDT method shall handle accordingly
without any additional actions needed to complete, which is not the case currently
even for a Decision Service with no nested branches.

Add setVisibility parameter to configureDT

setVisibility argument adds capability to set visible flag to true for all columns in DTs (only if set to false ) in the branch.

proposed change for the customer might look like this-

java -cp "<ODM_HOME>/teamserver/lib/:<ODM_HOME>teamserver/lib/eclipse_plugins/:" com.ibm.odm.tools.ConfigureDT -username username -password passwrd -url URL
-dataSource jdbc/ilogDataSource -decisionService decisionServiceName -branch branchName -autoResize [true/false] -setVisibility [true/false]

issue with configure-dt-0.0.3.jar . unexpected argument -unhideColumns

issue with configure-dt-0.0.3.jar …

[root@zzxr7601 ~]# /opt/IBM/ODM893/jdk/bin/java -cp
“/opt/IBM/ODM893/teamserver/lib/:/opt/IBM/ODM893/teamserver/lib/eclipse_plugins/:” com.ibm.odm.tools.ConfigureDT -username rtsAdmin -password rtsAdmin -url http://zzxr7601.msci.svl.ibm.com:9084/decisioncenter -dataSource jdbc/ilogDataSource -decisionService PremierDiscountRules_MainRuleFlow -branch OPR-MAIN -autoResize false -unhideColumns true
unexpected argument -unhideColumns
usage:
java com.ibm.odm.tools.ConfigureDT -username username -password password -url url -dataSource dataSource -decisionService [-overlapCheck true|false] [-gapCheck true|false] [-manualOrdering true|false] [-autoResize true|false] [-unhideColumns true]
Update all decision tables properties according to option selected in the decision service selected
If an option is not selected the property is not modified. At least one option must be selected

works without -unhideColumns arg

[root@zzxr7601 ~]# /opt/IBM/ODM893/jdk/bin/java -cp “/opt/IBM/ODM893/teamserver/lib/:/opt/IBM/ODM893/teamserver/lib/eclipse_plugins/:” com.ibm.odm.tools.ConfigureDT -username rtsAdmin -password rtsAdmin -url http://zzxr7601.msci.svl.ibm.com:9084/decisioncenter -dataSource jdbc/ilogDataSource -decisionService PremierDiscountRules_MainRuleFlow -branch OPR-MAIN -autoResize false
Configure DT properties in decision service ‘PremierDiscountRules_MainRuleFlow’
Dec 03, 2021 5:26:26 PM com.ibm.rules.decisioncenter.remoting.internal.RemoteSessionHttpExecutorBuilder log
INFO: {“url”:“http://zzxr7601.msci.svl.ibm.com:9084/decisioncenter”,“datasource”:“jdbc/ilogDataSource”,“username”:“rtsAdmin”,“message”:“Sign in successfully”,“date”:“December 3, 2021 5:26:26 PM”}
Dec 03, 2021 5:26:26 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
..
..
[root@zzxr7601 ~]# find /opt/IBM -name configure-dt-*.jar
/opt/IBM/ODM893/teamserver/lib/configure-dt-0.0.3.jar

configure-dt-0.0.5.jar times out when processing many (thousands of) DT's within a branch

As discussed in mtg, need another change to configure-dt to handle cust scenario of ~10,000 DTs within a branch.
under these conditions, cust gets Read timed out exception-

C:\Program Files\IBM\ODM892\jdk\bin>java -cp "C:/Program Files/IBM/ODM892/teamserver/lib/;C:/Program Files/IBM/ODM892/teamserver/lib/eclipse_plugins/;" com.ibm.odm.tools.ConfigureDT -username ***** -password ***** -url http://dwauslodmap01.app.dev.hcscint.net:9080/decisioncenter -dataSource jdbc/ilogDataSource -decisionService PremierDiscountRules_MainRuleFlow -branch TS006207114 -autoResize false -unhideColumns true
Configure DT properties in decision service 'PremierDiscountRules_MainRuleFlow'
..
..
Updating 9280 DT in PremierDiscountRules_Rate in branch TS006207114
org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [http://dwauslodmap01.app.dev.hcscint.net:9080/decisioncenter/remoting/session?__dcsid=4f0e11bbf7ecd8d9906c2483d50650c3]; nested exception is java.net.SocketTimeoutException: Read timed out
at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:226)
at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:153)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy1.commit(Unknown Source)
at ilog.rules.teamserver.model.impl.IlrAbstractSession.commit(IlrAbstractSession.java:1319)
at ilog.rules.teamserver.model.impl.IlrAbstractCachingSession.commit(IlrAbstractCachingSession.java:149)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at ilog.rules.teamserver.client.IlrSessionInvocationHandler.invoke(IlrSessionInvocationHandler.java:43)
at com.sun.proxy.$Proxy2.commit(Unknown Source)
at com.ibm.odm.tools.ConfigureDT.updateDT(ConfigureDT.java:197)
at com.ibm.odm.tools.ConfigureDT.updateBranch(ConfigureDT.java:164)
at com.ibm.odm.tools.ConfigureDT.updateBranch(ConfigureDT.java:169)
at com.ibm.odm.tools.ConfigureDT.execute(ConfigureDT.java:114)
at ilog.rules.teamserver.client.internal.BRMServerClient.doExecute(BRMServerClient.java:38)
at com.ibm.odm.tools.ConfigureDT.main(ConfigureDT.java:264)
Caused by: java.net.SocketTimeoutException: Read timed out
.

Full trace here: https://gist.github.com/rscher/ae0983cb87784d86ac4edaa9762f1ce4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.