Issues to create a contract on Bonita BPM 7.1.0 documentation.

I am studying the Bonita BPM 7.1.0 documentation by following the tutorial to understand how to create new applications Workflow. Even would like to congratulate once again all staff BonitaSoft, I get more and more excited about the tool. During these studies, I found a part of the documentation that may have been a little misunderstanding.

On page http://documentation.bonitasoft.com/getting-started-tutorial-1 there is a session informing creating call contracts “Create contracts”. Section 4 there is the following guidance:

Specify the attributes to include. By default, all the attributes are checked, so uncheck que Those are not relevant: userId, status and refusalReason.

As prompted, when I remove the fields: userId, status and refusalReason and finalize the system generates an error message with the following information:

There was an error generating the contract from the data.
org.bonitasoft.studio.contract.core.mapping.RootContractInputGenerator.build(RootContractInputGenerator.java:87)
org.bonitasoft.studio.contract.core.mapping.RootContractInputGenerator.buildForInstanciation(RootContractInputGenerator.java:59)
org.bonitasoft.studio.contract.ui.wizard.ContractInputGenerationWizard.performFinish(ContractInputGenerationWizard.java:139)
org.eclipse.jface.wizard.WizardDialog.finishPressed (WizardDialog.java:853)
org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:438)
org.bonitasoft.studio.common.jface.dialog.FinishAndAddCustomWizardDialog.buttonPressed(FinishAndAddCustomWizardDialog.java:70)
org.eclipse.jface.dialogs.Dialog $ 2.widgetSelected (Dialog.java:619)
org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:248)
org.eclipse.swt.widgets.EventTable.sendEvent (EventTable.java:84)
org.eclipse.swt.widgets.Display.sendEvent (Display.java:4353)
org.eclipse.swt.widgets.Widget.sendEvent (Widget.java:1061)
org.eclipse.swt.widgets.Display.runDeferredEvents (Display.java:4172)
org.eclipse.swt.widgets.Display.readAndDispatch (Display.java:3761)
org.eclipse.jface.window.Window.runEventLoop (Window.java:832)
org.eclipse.jface.window.Window.open (Window.java:808)
org.bonitasoft.studio.contract.ui.property.ContractPropertySection.openAddInputWizardDialog(ContractPropertySection.java:258)
org.bonitasoft.studio.contract.ui.property.ContractPropertySection$1.widgetSelected(ContractPropertySection.java:242)
org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:248)
org.eclipse.swt.widgets.EventTable.sendEvent (EventTable.java:84)
org.eclipse.swt.widgets.Display.sendEvent (Display.java:4353)
org.eclipse.swt.widgets.Widget.sendEvent (Widget.java:1061)
org.eclipse.swt.widgets.Display.runDeferredEvents (Display.java:4172)
org.eclipse.swt.widgets.Display.readAndDispatch (Display.java:3761)
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine $ 9.run (PartRenderingEngine.java:1151)
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run (PartRenderingEngine.java:1032)
org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI (E4Workbench.java:148)
org.eclipse.ui.internal.Workbench $ 5.run (Workbench.java:636)
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:579)
org.eclipse.ui.PlatformUI.createAndRunWorkbench (PlatformUI.java:150)
org.bonitasoft.studio.application.BonitaStudioApplication.createAndRunWorkbench(BonitaStudioApplication.java:93)
org.bonitasoft.studio.application.BonitaStudioApplication.start (BonitaStudioApplication.java:88)
org.eclipse.equinox.internal.app.EclipseAppHandle.run (EclipseAppHandle.java:196)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start (EclipseAppLauncher.java:104)
org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:380)
org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:235)
sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)
java.lang.reflect.Method.invoke (Unknown Source)
org.eclipse.equinox.launcher.Main.invokeFramework (Main.java:648)
org.eclipse.equinox.launcher.Main.basicRun (Main.java:603)
org.eclipse.equinox.launcher.Main.run (Main.java:1465)

If I only remove the refusalReason, the system completes the operation course. I believe it is related to the fact that userId and status fields are required fields.

Tested it on my computer and the company’s computer with both 32 and 64 bits and the behavior was the same. I consider important to warn why other people may have this difficulty as well.

Sorry about possible mistakes of description. I’m brazilian and my native language is Portuguese. :wink:

Thanks for reporting the issue.

I can suggest to temporary workarounds:

  • You can change the business object definition to make “userId” and “status” optional attributes
  • Or you can include them in the contract generation and then edit the contract definition

The documentation page will be update right now.

Hi, the same behavior in 7.1.2.

Error Incorrect zip structure to import Ui Designer, Please Help!

This is really weird. Here is what happened to me. I did this exercise twice, the first time it was successful. The contract is generated with all the mandatory attributes in place. Then the second time I encountered the issue mentioned here and the only work around was to set the variables to optional. The only change on the second time is that I changed the package name. I can’t see a relation here, but that is the only different thing. Any insight?

I am facing similar issue. Seems like some problem in BPM tool.
I am following the guide at url: BONITA BPM 7.0 GETTING STARTED

Error I get is:
“An error occured while deploying the business Data Model in engine”.

I also posted it at forum at this link.

Another similar issue I am facing while saving contract. Raised the issue in JIRA with snapshot: Refer the issue .

Thanks!

Can you give a little bit more context about when did you get this error?
Maybe also share the content of the log file.

Thanks