URL with parameters calling a deployed Decision Service (Cor

Posted by Anverion on 17-Oct-2018 13:40

Hello--

I was wondering if anyone was able to do the following or lead me in the right direction. A call will be made to a deployed decision service that has 1 or more parameters. The URL our look something like this:

http://localhost:8850/validateFile?fileId=1&detailId=0

The decision service (via a service connector) will retrieve the parameters and use those to execute a query. The results of that query will then be used to run the workflow.

I have the basic vocab complete that maps to the database. Right now I'm unsure of the best approach to retrieve parameters and use those parameters as the WHERE clause in my SQL to retrieve the matching records.

Thanks in advance,

Branden

All Replies

Posted by James Arsenault on 18-Oct-2018 07:53

Branden,

If I understand you correctly, you've written your own service callout which you use in a ruleflow and you want your callout to be able to get to the HTTP query parameters to use in forming a DB query. If that's the case, I don't believe there is a way to get the HTTP query parameters within a service callout. However there is a way to get HTTP headers. If you can pass your parameters as HTTP headers you can use

 ICcDataObjectManager.getCcServerHttpInfo()

to get access to the HTTP headers.

That said, the more typical pattern is to pass the parameters as part of the payload message to the decision service. If you did this you can access the payload from your callout.

Have you looked at the bundled EDC and ADC mechanisms for accessing a database?

Jim

Posted by Anverion on 18-Oct-2018 12:17

James--

Thank you for your response. I believe ou are on the right tack if I understand you correctly.

#5 is my concern and the topic of this question

Our new system:

1. Employers send in xml files with earnings

2. ETL parses these files and places them in raw table in the database

3. ELT tools does it's thing and ETLs the data from the raw tables to the regular tables

4. a process then calls a corticon decision service and supplies it with either a fileID (whole file with all details) or a detailID (single detail).

5. I need to get that parameter (fileID or DetailID) and use it in the WHERE clause of my SQL to get my record set.

6. Run the rules on that record set and write the updates to the database.

Thank you so much for your time,

Branden.

Posted by James Arsenault on 19-Oct-2018 15:26

You probably can take advantage of Corticon's built in data access capabilities. I suggest having a look at the Data Integration Guide

documentation.progress.com/.../index.html

This thread is closed