servicecatalog / development

An Enterprise-ready Cloud Services Management Software
http://openservicecatalogmanager.org
Apache License 2.0
39 stars 27 forks source link

after hide payment info billing run does not work #74

Closed elfriedegoetz closed 8 years ago

elfriedegoetz commented 8 years ago

Date:2016/05/13

[Steps to reproduce] set "HIDE_PAYMENT_INFORMATION" to true subscribe to a service with native billing start billing run

[Expected result] billing result for the subscription will be created [Observed result] no billing result

DawidCh commented 8 years ago

If you set HIDE_PAYMENT_INFORMATION to false, is billing run generates results?

elfriedegoetz commented 8 years ago

Did you try to reproduce the error? In my Environment it works with HIDE_PAYMENT_INFORMATION is set to false.

DawidCh commented 8 years ago

No, because the steps are not clear. How do you check billing results?

elfriedegoetz commented 8 years ago

What is not clear? I did not understand!

DawidCh commented 8 years ago

I also do not understand. It is easier to talk about the bug rather that wasting whole day to setting up environment from different branch to see that everything is ok. That is why I am asking the questions. I am asking you kindly to answer.

elfriedegoetz commented 8 years ago

After billing run was executed a billing result for the subscription should exist in the Database.

DawidCh commented 8 years ago

To see results in DB you have to run billing against subscription which has been subscribed in already closed billing period. If the results are generated for some period it will not be regenerated again. Results has to be cleared out to generate it again. The configuration setting HIDE_PAYMENT_INFORMATION has nothing in common with results of billing run but only on report. The flag has no impact on generating results.

elfriedegoetz commented 8 years ago

[Steps to reproduce] set "HIDE_PAYMENT_INFORMATION" to true subscribe to a service with native billing start billing run

for this subscription does not exist any billing result up to now. Of course you have to start the billing run for the next billing period This means you have to run it for a date in the future. Do you have the tool for doing this?

DawidCh commented 8 years ago

No, we do not. We use debugger for that purpose. In third comment of this topic you wrote you were able to generate results. So I would clear the results in DB and follow the same steps.

ghost commented 8 years ago

Dawid, when you try to reproduce this, please check if you have external billing subscriptions. I have the same problem. My "guess" is that you need to create a subscription that has external billing, and then create a subscription with native billing. Then execute billing run.

elfriedegoetz commented 8 years ago

Dawid, I think there is a missunderstanding: In my third comment of this topic I wrote:

In my Environment it works with HIDE_PAYMENT_INFORMATION is set to false.>> This means, that billing run works, before I set the hide payment to true. For the new subscription there is no billing result up to this time.

elfriedegoetz commented 8 years ago

[Steps to reproduce] start with a empty DS set "HIDE_PAYMENT_INFORMATION" to true create Service Provider, publish Service create Customer w/o specifying org E-Mail, addr. subscribe to a service with native billing start billing run

-> it seems that this error has something to do with optional fields for the customer organization. It is important to start with an empty db, so that no payment types or email exist. Please check the log file below:

look in System.log: 05/19/2016_15:44:55.824 FSP_INTS-BSS: INFO: ThreadID RMI TCP Connection(17)-10.140.18.59: BillingServiceBean: 00020: Billing run has started. 05/19/2016_15:44:56.417 FSP_INTS-BSS: WARN: ThreadID RMI TCP Connection(17)-10.140.18.59: BillingConditionsEvaluator: 40303: Billing result schema validation failed. Billing result for organization 11000 (tkey) and subscription 11000 (tkey) is invalid, SAX parser reported: cvc-complex-type.2.4.a: Invalid content was found starting with element 'Name'. One of '{Email}' is expected. Billing result is: 8d65d984CU1_orgINVOICE org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 256; cvc-complex-type.2.4.a: Invalid content was found starting with element 'Name'. One of '{Email}' is expected. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:437) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:458) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3237) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1796) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:746) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:378) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2778) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777) at com.sun.org.apache.xerces.internal.jaxp.validation.StreamValidatorHelper.validate(StreamValidatorHelper.java:155) at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:116) at javax.xml.validation.Validator.validate(Validator.java:124) at org.oscm.billingservice.business.calculation.revenue.BillingConditionsEvaluator.isValidBillingResult(BillingConditionsEvaluator.java:52) at org.oscm.billingservice.business.calculation.revenue.RevenueCalculatorBean.performBillingRunForSubscription(RevenueCalculatorBean.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052) at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124) at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388) at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619) at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800) at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571) at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162) at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144) at sun.reflect.GeneratedMethodAccessor359.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861) at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800) at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370) at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360) at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348) at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214) at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:89) at com.sun.proxy.$Proxy391.performBillingRunForSubscription(Unknown Source) at org.oscm.billingservice.service.BillingServiceBean.executeBilling(BillingServiceBean.java:251) at org.oscm.billingservice.service.BillingServiceBean.startBillingRun(BillingServiceBean.java:131) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

DawidCh commented 8 years ago

Martin, what should we do if email and address is not provided for customer organization? We have two options:

  1. Make the fields mandatory while creating customer
  2. Print empty tags in billing result
mdehn commented 8 years ago

Please use empty tags in billing result.

DawidCh commented 8 years ago

[Details of fix] If optional values are not set, empty strings are being used to fullfill mandatory attributes in schema for billing results.

ghost commented 8 years ago

[Build] 2016/08/11 verified