I don’t know how to integrate my master jasper report and sub reports into the Bonitasoft task. I’ve set up my Jasper Documents as Groovy Multiple Script like this :
import org.bonitasoft.engine.bpm.document.DocumentValue;
[
new DocumentValue(“C:/ServiceAgreement.jrxml”),
new DocumentValue(“C:/ServiceAgreement1.jasper”),
new DocumentValue(“C:/ServiceAgreement2.jasper”),
new DocumentValue(“C:ServiceAgreement3.jasper”)
]
But I receive this error message from Bonitasoft error log:
**2016-08-09 09:43:45.917 -0700 org.bonitasoft.console.common.server.page.ResourceRenderer org.bonitasoft.console.common.server.page.ResourceRenderer getFileContent
WARNING: Cannot find the resource file D:\BonitaBPMCommunity-7.2.2\workspace\default\bonita_home\client\tenants\1\work\pages\custompage_ServiceAgreement\resources$data.session.user_name
2016-08-09 09:44:14.580 -0700 org.bonitasoft.engine.api.impl.transaction.flownode.ExecuteFlowNode org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl log
INFO: THREAD_ID=5058 | HOSTNAME=WebDeveloper | TENANT_ID=1 | The user <francisco.hassin> has executed the task [name = , display name = , id = <1220393>, parent process instance = <61089>, root process instance = <61089>, process definition = <5835167032689853950>] with task inputs: {noteContract=false, cashContract=false, sagreementInputContract={InitialServiceFee_string=0.0, InitialTax_string=0.0, ISOCompanyID=1, TermsOfAgreement=null, TechsLines=, NoEquipments=true, BillCity=Santa Ana, CheckNumber=null, AgreementID=1011, RecurringTax=0.0, newRequestProcessInstanceId=61089, equipmentsLines=, CVV2=null, LName=Cuervo, SourceID=3, BillCompanyName=Moore Invenstment Inc., CardFrequency=null, BillAddress=2154 Main St., Address2=, CardName=null, CardExpiration=null, MapPass=true, SignatureURL=none, LocationTypeID=4, SignaturePass=true, InitialDownPayment_string=0.0, persistenceVersion_string=0, BillFName=Moore, BillAddress2=, RecurringServiceFee=0.0, GIPass=true, BillFax=(714) 546-9873, BillTosID_string=1000, FName=Jose, SFPass=false, PaymentType=CREDIT CARD, Email=operations@panchovilla.com, newRequestProcessInstanceId_string=61089, InitialTax=0.0, BillTosID=1000, Phone=(909) 232-5698, DiagramURL=none, TheSameAddress=false, UserID=4513, persistenceVersion=0, BillEmail=operations@mooreenterprise.com, BranchID=1, BillLName=Joe, LocationID_string=null, persistenceId=13, BillPhone=(714) 546-9874, AllowRecurring=false, STPass=false, LocationID=null, CardType=VISA, RecurringTax_string=0.0, areasLines=, CardNumber=null, InitialDownPayment=0.0, RecurringServiceFee_string=0.0, Fax=(909) 232-5697, PONumber=null, NoAreas=true, AgreementPass=true, CreationDate=Tue Aug 09 09:43:45 PDT 2016, UserID_string=4513, InitialServiceFee=125.0, CompanyName=Pancho Villa, AgreementType=GP, ZipCode=92335, AllowOneTime=false, City=Fontana, Status=Pending, serviceTypesLines=[{ServiceFee=125.0, ServiceTypeID=1, SpecialInstructions=none, ServiceFrequencyID=4, TargetID=2, TreatingUnits=0}], BillStateID=CA, StateID=CA, persistenceId_string=13, Address=2587 Valley Blvd., EQPass=false, BillZipCode=92702, SAPass=false}, messageContract=none, ccContract=true, checkContract=false, initialProcessContract=false}
2016-08-09 09:44:14.839 -0700 org.bonitasoft.connectors.jasper.CreateReportFromDataBase org.bonitasoft.connectors.jasper.CreateReportFromDataBase initInputs
INFO: dbDriver org.h2.Driver
2016-08-09 09:44:14.839 -0700 org.bonitasoft.connectors.jasper.CreateReportFromDataBase org.bonitasoft.connectors.jasper.CreateReportFromDataBase initInputs
INFO: jdbcUrl jdbc:h2:tcp://localhost:9091/business_data.db;MVCC=TRUE;DB_CLOSE_ON_EXIT=FALSE;IGNORECASE=TRUE;
2016-08-09 09:44:14.839 -0700 org.bonitasoft.connectors.jasper.CreateReportFromDataBase org.bonitasoft.connectors.jasper.CreateReportFromDataBase initInputs
INFO: user sa
2016-08-09 09:44:14.839 -0700 org.bonitasoft.connectors.jasper.CreateReportFromDataBase org.bonitasoft.connectors.jasper.CreateReportFromDataBase initInputs
INFO: password ******
2016-08-09 09:44:14.839 -0700 org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl log
SEVERE: THREAD_ID=3947 | HOSTNAME=WebDeveloper | TENANT_ID=1 | The work [ExecuteConnectorOfActivity: flowNodeInstanceId = 1220396, connectorDefinitionName = myAgreementReport] failed. The failure will be handled.
2016-08-09 09:44:14.852 -0700 org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl log
SEVERE: THREAD_ID=3947 | HOSTNAME=WebDeveloper | TENANT_ID=1 | org.bonitasoft.engine.core.connector.exception.SConnectorException : “PROCESS_DEFINITION_ID=5835167032689853950 | PROCESS_NAME=New Service Agreement Request | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=61089 | ROOT_PROCESS_INSTANCE_ID=61089 | FLOW_NODE_DEFINITION_ID=7964008443345138615 | FLOW_NODE_INSTANCE_ID=1220396 | FLOW_NODE_NAME=Generate Report | CONNECTOR_IMPLEMENTATION_CLASS_NAME=myAgreementReport | CONNECTOR_INSTANCE_ID=380054 | org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String”
org.bonitasoft.engine.core.connector.exception.SConnectorException: PROCESS_DEFINITION_ID=5835167032689853950 | PROCESS_NAME=New Service Agreement Request | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=61089 | ROOT_PROCESS_INSTANCE_ID=61089 | FLOW_NODE_DEFINITION_ID=7964008443345138615 | FLOW_NODE_INSTANCE_ID=1220396 | FLOW_NODE_NAME=Generate Report | CONNECTOR_IMPLEMENTATION_CLASS_NAME=myAgreementReport | CONNECTOR_INSTANCE_ID=380054 | org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:274)
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnector(ConnectorServiceImpl.java:147)
at org.bonitasoft.engine.connector.ConnectorServiceDecorator.executeConnector(ConnectorServiceDecorator.java:114)
at org.bonitasoft.engine.execution.work.ExecuteConnectorWork.work(ExecuteConnectorWork.java:138)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork.work(FailureHandlingBonitaWork.java:66)
at org.bonitasoft.engine.work.BonitaWork.run(BonitaWork.java:56)
at org.bonitasoft.engine.work.SequenceRunnableExecutor.innerRun(SequenceRunnableExecutor.java:47)
at org.bonitasoft.engine.work.BonitaRunnable.run(BonitaRunnable.java:35)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.execute(ConnectorExecutorImpl.java:125)
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:268)
… 14 more
Caused by: java.util.concurrent.ExecutionException: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.getValue(ConnectorExecutorImpl.java:149)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.execute(ConnectorExecutorImpl.java:122)
… 15 more
Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
at org.bonitasoft.connectors.jasper.CreateReportFromDataBase.initInputs(CreateReportFromDataBase.java:124)
at org.bonitasoft.connectors.jasper.CreateReportFromDataBase.validateInputParameters(CreateReportFromDataBase.java:151)
at org.bonitasoft.engine.core.connector.impl.SConnectorAdapter.validate(SConnectorAdapter.java:64)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl$ExecuteConnectorCallable.call(ConnectorExecutorImpl.java:203)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl$ExecuteConnectorCallable.call(ConnectorExecutorImpl.java:176)
at java.util.concurrent.FutureTask.run(Unknown Source)
… 3 more
**
If someone has already found the solution for this type of error, I would be very grateful for any help. Thank in advance.