-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REPORT-862:create an HttpReportProcessor #241
base: master
Are you sure you want to change the base?
Conversation
} | ||
|
||
} catch(IOException e) { | ||
e.getStackTrace(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the use of the above line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is meant to handle the exception and print the error. Just realized printStackTrace()
is a better code. Let me rectify that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you get a chance to look at our openmrs java conventions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Let me try again following them. I have checked the docs for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dkayiwa, I have instead thrown a RuntimeException
with a message. Let me know what you think. Thank you.
@Seremba did you test this and confirm it is working as expected? |
Yes, I manually tested it on openMRS and it worked. |
Do you mind sharing details of how you did the testing? |
I started openMRS, logged in as administrator, went to 'manage modules' deleted the reporting module, and uploaded the omod file on my machine. Looked for report processors, selected HttpReportProcessor from the options, and entered configurations like 'subject', 'connection url', and 'report' information. Then clicked add report processor and it was added. |
@Seremba did your processor send real data via an HTTP POST as per the ticket description? |
Hi @dkayiwa I have made a video recording to demonstrate how the processor potentially works. I hope that can be helpful. |
@Seremba in your video, you simply configured the processor. You did not go ahead to show that your processor actually works by sending HTTP POST data. |
I am kinda stuck, how do I show that the processor works? |
Hi @dkayiwa, sorry for the delay on this! I had to learn more about reporting in OpenMRS before answering. Does the screenshot partly or fully answer the question you have been asking? |
Which webservice or http endpoint did you send the report to? |
Hi @dkayiwa, I am facing this error https://pastebin.com/BZ8Dmphc when I try to run an HTTP POST request. |
@Seremba that error means that you need to first provide the authentication credentials before making the request. |
An HTTP report processor to send reports to a URL via HTTP POST
https://issues.openmrs.org/browse/REPORT-862