I am trying to run wm.b2b.editn.FAReport:generateFAReport using developer. I am specifying a name as well as a docBeforeYear, Month, Day, docAfterYear, Month, Day, as well as putting values for all fields. What I am trying to do is create a report that will show only current days -1 activity. When I specify a docAfteryear I am getting a nullPointerException. If I leave it blank the report works but I am not getting the results that I am looking for. I think I know why it is happening but was wondering if there is a way to specify a before and after date that will work? I want to create a daily FA report that will show me the previous days activity. For example: On March 3, 2006 I want to run the report to retrieve March 2, 2006 transactions. Before date of March 3, 2006 and an after date of March 2, 2006. Any suggestions how to do this will be greatly appreciated. I also tried to put just the after date information and I still received the NullPointerException.
Have you tried a before date of March 3, 2006 and an after date of March 1, 2006? That should give you the March 2 activity. I think using before March 3 and after Mar 2 results in an empty set.
Just gave that a try and I am still getting the NullPointerException. I think there is a problem with specifying the docAfterYear. If I leave that blank it runs the report. If I put 2006 as the docAfterYear it fails.
Since wm.b2b.editn.FAReport:generateFAReport is a FLOW service, can you step through it and see at exactly which step is throws the exception? If it’s in the wm.b2b.editn.FAReport.getFAReportData step, can you verify that the docAfter parameter has a date string following the format yyyy-MM-dd?
Can you post all the parameters being passed? Perhaps it isn’t the docAfter parameter specifically but another parameter that gets referenced only when docAfter is present.
Ah, I see that now. The orderBy variable, which is required, is dropped in the map step when docAfter is not null or empty. It’s also dropped when FABefore* or FAAfter* are not null/empty. This definitely explains the symptom you’re seeing as orderBy is expected to be present and when it is not, the NPE is thrown.
Additionally, the call to wm.b2b.editn.FAReport:getFAReportData passes in orderByList, which is never initialized. This service should never work as orderBy will always be null–I can’t figure that part out.
Anyway, this looks to be a bug to me. You could modify generateFAReport to remove the variable dropping to double-check. I think you’ll want to contact tech support in any case.
I updated the generateFAReport so that it does not drop the orderBy variable. The report ran as expected. I will contact tech support and let them know about our findings.
I did get this to work with 6.1 but I had to make some changes. I updated the generateFAReport so that it does not drop the orderBy variable. Once I did this it worked fine. I will update the thread with any fixes/solutions that tech support comes back with.
I am not quiet sure whether we installed any fixes for this problem,but its working for us.let me check more how this is working for us,may be some one changed here to make it work.
Update from tech support on the request I sent in:
I have been able to reproduce the issue on my end and will let you know what my team has to say after further analysis on this. Just to let you know if this is identified as a bug we will be releasing a fix for this problem soon. I will post an update on a fix if I get one. Thanks,
Matt
What you have noticed is a small bug that was overlooked and will be fixed in our next release. But we have a simple workaround for this problem that you can use to get going with your project. All you need to do is create a new custom service and the inputs of this service are all same inputs as the generateFAReport service EXCEPT that the orderBy is renamed orderByList. The only step in this service is to invokes the wm.b2b.editn.FAReport:generateFAReport service.
Hope this helps in case someone else runs into this issue!!!