Error while compiling the clinical guideline example

51 views
Skip to first unread message

Ajaya Jose

unread,
Feb 19, 2017, 8:53:41 AM2/19/17
to OpenRules
Hi,
Kindly support on this,

I encounter below error while working with forms in Clinical Guidelines Part2 example.
While I build my application, I am getting the below error.

a:58)
     [java]     ... 32 more
     [java] Exception in thread "main" java.lang.NullPointerException: null
     [java] Invalid Code Fragment:
     [java] =========================================
     [java] dialog().isNext(step)
     [java]          ^^^^^^^^^^^^
     [java] =========================================

My files are,
HealthCareForms.xls, Dialog.xls & HealthCare.xls all are given in the part2 examples

OpenRules Support

unread,
Feb 19, 2017, 9:13:05 AM2/19/17
to OpenRules
You are looking to a very old guide which we still haven't modified yet (we will - thank you for pointing us to this issue). It used the function dialog() that had been deprecated and then removed years ago. Meanwhile, please take the latest example of the same we application "HealthCare2" from the workspace "openrules.web" included in the complete release. For your convenience we attached all xls-files. Make sure that you are using the latest templates as well.
HealthCareMain.xls
HealthCareForms.xls
HealthCareRules.xls

Ajaya Jose

unread,
Feb 19, 2017, 11:35:11 AM2/19/17
to OpenRules
Thankyou. Can you please share the latest Dialog.xls

Ajaya Jose

unread,
Feb 20, 2017, 6:44:27 AM2/20/17
to OpenRules
Hi,

I am trying to build the file with the HelathCareMain, HelthCareForms, HealthCareRules & Dialog.xls file.
However I am getting the below error.

     [java] Processing file:/C:/Rule/openrules_6.4.1.decisions/openrules.decisio
ns/openrules.config/Dialog.xls
     [java] IMPORT.STATIC=com.openrules.tools.Methods
     [java] Exception in thread "main" org.openl.syntax.SyntaxErrorException: Er
ror: Type Patient not found

     [java] Invalid Code Fragment:
     [java] =========================================
     [java]  TableLayout PatientInformation(Dialog d,Patient patient)
     [java]                                          ^^^^^^^
     [java] =========================================
     [java]     at file:/C:/Rule/openrules_6.4.1.decisions/openrules.decisions/o
penrules.config/HealthCareForms.xls?sheet=Layouts&cell=B14&start=47&end=53&openl
=

Pls help me to build the file.

OpenRules Support

unread,
Feb 20, 2017, 2:32:27 PM2/20/17
to OpenRules

The error "Type Patient not found" tells us something wrong with your Datatype and Data tables for Patients. We sent you the standard workspace "openrules.web".  It includes the project HealthCare2 with all files correctly implemented. We just checked  - it works without any errors. You should look at this project to compare it with your own version.


Support

Ajaya Jose

unread,
Feb 25, 2017, 5:58:18 AM2/25/17
to OpenRules
I have implemented the files shared with me [ie :HealthCareForms.xls, HealthCareMain & HealthCareRules], while I run build.bat file, I am getting the same error, 

    [java] IMPORT.STATIC=com.openrules.tools.Methods
     [java] Exception in thread "main" org.openl.syntax.SyntaxErrorException: Er
ror: Type Patient not found
     [java] Invalid Code Fragment:
     [java] =========================================
     [java]  TableLayout PatientInformation(Dialog d,Patient patient)
     [java]                                          ^^^^^^^
     [java] =========================================
     [java]     at file:/C:/Rule/openrules_6.4.1.decisions/openrules.decisions/o
penrules.config/HealthCareForms.xls?sheet=Layouts&cell=B14&start=47&end=53&openl

=

1 My Build.bat
------------------
@echo off
cd %~dp0
call define
if "%CLASS_NAME%" == "" set CLASS_NAME=com.openrules.ruleengine.DecisionTest
call ant -f "%~dp0\build.xml" run
pause
-----------------------------------------
2 run.bat
--------------
@echo off
cd %~dp0
call define
call projectRun
pause
-----------------------
3 define.bat
---------------

set FILE_NAME=rules/HealthCareMain.xls

------------------------------------------------------------------
4 projectRun.bat
------------------------------

@echo off
if "%CLASS_NAME%" == "" set CLASS_NAME=com.openrules.ruleengine.DecisionTest
set OR=../openrules.config/lib
set ORLIB=%OR%/openrules.all.jar;%OR%/com.openrules.tools.jar
set POILIB=%OR%/poi-3.10-FINAL-20140208.jar;%OR%/poi-ooxml-3.10-FINAL-20140208.jar;%OR%/poi-ooxml-schemas-3.10-FINAL-20140208.jar;%OR%/xmlbeans-2.3.0.jar;%OR%/dom4j-1.6.1.jar
set APACHELIB=%OR%/commons-logging-1.1.jar;%OR%/commons-logging-api-1.1.jar;%OR%/log4j-1.2.15.jar;%OR%/commons-lang-2.3.jar;%OR%/commons-beanutils.jar
set ALL=./bin;%APACHELIB%;%ORLIB%;%POILIB%
java -Xmx512m -classpath "%ALL%" %CLASS_NAME% "file:%FILE_NAME%" %DECISION_NAME%
echo done
-----------------------------------

I am attaching my build.xml and Dialog.xls

Regards,
Ajay
build.properties
Dialog.xls
build.xml

OpenRules Support

unread,
Feb 25, 2017, 9:44:13 AM2/25/17
to OpenRules
Jose,

You may compare your project with the working project "HealthCare2" included in the standard delivery as a part of "openrules.web". If you want us to help to find an error in your project, please zip your project and send to sup...@openrules.com. We will analyze your entire project and will help.

Support

Ajaya Jose

unread,
Feb 25, 2017, 2:06:39 PM2/25/17
to OpenRules
I have send my project to the support mail id.
Also can you please share the link to access "openrules.web" files with user id and pwd if any?
regards,
Jose


On Saturday, 25 February 2017 20:14:13 UTC+5:30, OpenRules Support wrote:
Jose,

You may compare your project with the working project "HealthCare2" included in the standard delivery as a part of "openrules.web". If you want us to help to find an error in your project, please zip your project and send to support. We will analyze your entire project and will help.

OpenRules Support

unread,
Feb 25, 2017, 3:22:30 PM2/25/17
to OpenRules
Jose,

We've looked at your project and found that it does not have the right structure at all. This project is using Web Forms and should be organized and deployed as a web application on a web server such as Apache Tomcat - while you are trying to use it as a basic rule project. Usually our customers pay a nominal fee to download the complete version of OpenRules, It includes the workspace "openrules.web" with many web projects. You example is presented as "HealthCare2" with the detailed instructions. e.g. see "readme,txt". We've already sent you this workspace for free and you do not need any user id or password to work with it. So, you should try to deploy and try to run the standard project "HealthCare2" before you start making any changes in it.
Let us know if you still have problems.

Support

Ajaya Jose

unread,
Feb 26, 2017, 2:27:35 AM2/26/17
to OpenRules
Thank you for the update. I tried to download the files from below link, by using the access rights provided to me.  However it shows as not an authorised user.

Ajaya Jose

unread,
Feb 27, 2017, 1:34:50 AM2/27/17
to OpenRules
please enable me to download openrules_6.4.1.web.zip 

Ajaya Jose

unread,
Feb 27, 2017, 12:42:41 PM2/27/17
to OpenRules
It is giving me 401 Authorisation required error. by accessing openrules_6.4.1.web.zip  while using my credentials

OpenRules Support

unread,
Feb 27, 2017, 12:52:11 PM2/27/17
to OpenRules
It works fine with correct credentials. Please contact us directly at sup...@openrules.com with information when you received your credentials. Besides we already sent this zip-file to your without any credentials.
Support
Reply all
Reply to author
Forward
0 new messages