An error occurred while generating the contract from a data

1
0
-1

Dear Bonitasoft: I am a very new user to this software. I am running Bonitasoft Community 2021.2 on Windows 10. I am working through the getting started tutorial and in the section where one declares contracts. I have followed the directions up to Execution > Contracts > Add from data. A pop window comes up "Select claim attributes to add to contract" wherein I select "description" only and when I click on finish I get the error "An error while generating the contract from a data" appears. The details of the error are below. Any help you can offer would be greatly appreciated. Thank you.

  • An error occurred while generating the contract from a data.
    org.bonitasoft.studio.groovy.GroovyCompilationUnitFactory.newCompilationUnit(GroovyCompilationUnitFactory.java:43)
    org.bonitasoft.studio.contract.core.mapping.expression.FieldToContractInputMappingExpressionBuilder.groovyCompilationUnit(FieldToContractInputMappingExpressionBuilder.java:130)
    org.bonitasoft.studio.contract.core.mapping.expression.FieldToContractInputMappingExpressionBuilder.addScriptDependencies(FieldToContractInputMappingExpressionBuilder.java:106)
    org.bonitasoft.studio.contract.core.mapping.expression.FieldToContractInputMappingExpressionBuilder.toExpression(FieldToContractInputMappingExpressionBuilder.java:72)
    org.bonitasoft.studio.contract.core.mapping.expression.FieldToContractInputMappingExpressionBuilder.toExpression(FieldToContractInputMappingExpressionBuilder.java:62)
    org.bonitasoft.studio.contract.core.mapping.RootContractInputGenerator.buildInitialValueExpression(RootContractInputGenerator.java:85)
    org.bonitasoft.studio.contract.core.mapping.RootContractInputGenerator.buildForInstanciation(RootContractInputGenerator.java:69)
    org.bonitasoft.studio.contract.ui.wizard.ContractInputGenerationWizard.lambda$0(ContractInputGenerationWizard.java:229)
    org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)

Comments

Submitted by marielle.spiteri on Wed, 02/09/2022 - 20:44

The issue that you are observing probably happened when you select/deselect fields that are defined as mandatory in the business data. Something was mixed up there. Make sure the contract with the mandatory attributes matches the automatically generated scripts to initialize the business variable, and update the atributes from the contract. Anyway, something is most likely wrong with your mandatory attribute.

No answers yet.
Notifications