help me, With this one(SCRIPT)

1
0
-1

, expressionType=TYPE_READ_ONLY_SCRIPT, returnType=, interpreter=GROOVY, dependencies=[ExpressionImpl [name=selectionCustomer, content=selectionCustomer, expressionType=TYPE_VARIABLE, returnType=java.lang.Long, interpreter=null, dependencies=[]]]] at org.bonitasoft.studio.engine.export.EngineExpressionUtil.buildSimpleEngineExpression(EngineExpressionUtil.java:425) at org.bonitasoft.studio.engine.export.EngineExpressionUtil.buildSimpleEngineExpressionWithName(EngineExpressionUtil.java:387) at org.bonitasoft.studio.engine.export.EngineExpressionUtil.createExpression(EngineExpressionUtil.java:315) at org.bonitasoft.studio.exporter.form.FormsExporter.addInitialValueExpression(FormsExporter.java:1614) at org.bonitasoft.studio.exporter.ex.form.FormsExporterEx.addInitialValue(FormsExporterEx.java:454) at org.bonitasoft.studio.exporter.form.FormsExporter.addSpecificFormField(FormsExporter.java:1692) at org.bonitasoft.studio.exporter.form.FormsExporter.performOnWidget(FormsExporter.java:895) at org.bonitasoft.studio.exporter.ex.form.FormsExporterEx.performOnWidget(FormsExporterEx.java:160) at org.bonitasoft.studio.exporter.form.FormsExporter.addWidgets(FormsExporter.java:884) at org.bonitasoft.studio.exporter.form.FormsExporter.addEntryPage(FormsExporter.java:799) at org.bonitasoft.studio.exporter.ex.form.FormsExporterEx.addEntryPage(FormsExporterEx.java:208) at org.bonitasoft.studio.exporter.form.FormsExporter.addEntryPageFlow(FormsExporter.java:2167) at org.bonitasoft.studio.exporter.form.FormsExporter.exportEntryPageFlow(FormsExporter.java:263) at org.bonitasoft.studio.exporter.ex.form.FormsExporterEx.exportEntryPageFlow(FormsExporterEx.java:1257) at org.bonitasoft.studio.exporter.form.FormsExporter.addTask(FormsExporter.java:410) at org.bonitasoft.studio.exporter.form.FormsExporter.addActivities(FormsExporter.java:384) at org.bonitasoft.studio.exporter.form.FormsExporter.createXmlForms(FormsExporter.java:212) at org.bonitasoft.studio.exporter.ex.FormsXMLExporterEx.exportFormsXML(FormsXMLExporterEx.java:61) at org.bonitasoft.studio.application.ex.contribution.ApplicationResourcesProviderEx.addFormsXML(ApplicationResourcesProviderEx.java:46) at org.bonitasoft.studio.exporter.ApplicationResourcesProvider.addResourcesForConfiguration(ApplicationResourcesProvider.java:95) at org.bonitasoft.studio.engine.export.BarExporter.createBusinessArchive(BarExporter.java:140) at org.bonitasoft.studio.engine.export.BarExporter.createBusinessArchive(BarExporter.java:107) at org.bonitasoft.studio.engine.export.BarExporter.createBusinessArchive(BarExporter.java:186) at org.bonitasoft.studio.engine.operation.DeployProcessOperation.deployProcess(DeployProcessOperation.java:183) at org.bonitasoft.studio.engine.operation.DeployProcessOperation.deploy(DeployProcessOperation.java:164) at org.bonitasoft.studio.engine.operation.DeployProcessOperation.run(DeployProcessOperation.java:117) at org.bonitasoft.studio.engine.command.RunProcessCommand$1.run(RunProcessCommand.java:224) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Caused by: org.bonitasoft.engine.expression.InvalidExpressionException: Expression return type is not set on ExpressionImpl [name=editName, content=import groovy.sql.Sql;

def List result =new ArrayList();

Sql sql = BonitaSql.newInstance("jdbc:mysql://localhost:3306/accounts_payable","root","",new com. mysql.jdbc.Driver());

result = sql.firstRow( "SELECT customer_name FROM accounts_payable.customer WHERE id = ('${selectionCustomer}')");

println(result.customer_name)

return result[0];

, expressionType=TYPE_READ_ONLY_SCRIPT, returnType=, interpreter=GROOVY, dependencies=[ExpressionImpl [name=selectionCustomer, content=selectionCustomer, expressionType=TYPE_VARIABLE, returnType=java.lang.Long, interpreter=null, dependencies=[]]]] at org.bonitasoft.engine.expression.ExpressionBuilder.generalCheck(ExpressionBuilder.java:251) at org.bonitasoft.engine.expression.ExpressionBuilder.done(ExpressionBuilder.java:214) at org.bonitasoft.studio.engine.export.EngineExpressionUtil.buildSimpleEngineExpression(EngineExpressionUtil.java:422) ... 27 more

!ENTRY org.bonitasoft.studio.common 4 0 2015-04-23 15:24:30.194 !ERROR forms.xml doesn't export correctly for process named: SDA !STACK 0 java.lang.Exception: forms.xml doesn't export correctly for process named: SDA at org.bonitasoft.studio.application.ex.contribution.ApplicationResourcesProviderEx.addFormsXML(ApplicationResourcesProviderEx.java:59) at org.bonitasoft.studio.exporter.ApplicationResourcesProvider.addResourcesForConfiguration(ApplicationResourcesProvider.java:95) at org.bonitasoft.studio.engine.export.BarExporter.createBusinessArchive(BarExporter.java:140) at org.bonitasoft.studio.engine.export.BarExporter.createBusinessArchive(BarExporter.java:107) at org.bonitasoft.studio.engine.export.BarExporter.createBusinessArchive(BarExporter.java:186) at org.bonitasoft.studio.engine.operation.DeployProcessOperation.deployProcess(DeployProcessOperation.java:183) at org.bonitasoft.studio.engine.operation.DeployProcessOperation.deploy(DeployProcessOperation.java:164) at org.bonitasoft.studio.engine.operation.DeployProcessOperation.run(DeployProcessOperation.java:117) at org.bonitasoft.studio.engine.command.RunProcessCommand$1.run(RunProcessCommand.java:224) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

!ENTRY org.codehaus.groovy.eclipse.core 1 0 2015-04-23 15:30:17.731 !INFO Oops...surroundWithFactory not initialized

1 answer

1
0
-1

It says that you don't set the Result Type.

Where did you put this script ? If this is in a Groovy connector, I don't think you can return anything. If it is in the Operation tab of a task, you need to set the Result type (String by default).

Comments

Submitted by jaylongkit on Thu, 04/23/2015 - 10:01

i made the script on the textfield, on the initial value

i will try to do ur instruction..

Thank you yannick.lombardi:)

than you for the quick responce..

Submitted by yannick.lombardi on Thu, 04/23/2015 - 10:13

An advice : In Bonita BPM, there is a MySQL Connector. You can use it to query value in your database.

Submitted by jaylongkit on Thu, 04/23/2015 - 10:28

yes, already done it:)

Notifications