Error in Custom Query

1
0
-1

Hi everyone, i am trying to create custom update bdm query. But suddenly when i started the process the error message like this "The business data 'requestCA' with the class name 'com.company.model.RequestCA', is not managed by the current version of the BDM" displayed right after i pressed the run button. I changed the query many times but the message keep appearing. These are queries that i have tried before:

  1. UPDATE Budget SET b.costCode = :costCode AND b.budgetTotal = :budgetTotal AND b.sisa = :sisa AND b.tanggalBudget = :tanggalBudget WHERE b.persistenceId
  2. UPDATE Budget SET b.costCode = :costCode, b.budgetTotal = :budgetTotal, b.sisa = :sisa, b.tanggalBudget = :tanggalBudget WHERE b.persistenceId

All queries that i have tried above, gave me same error message. I want to know what is went wrong. Is it the query or the the BDM version doesn't support custom query.

Thank You

2 answers

1
0
-1

If you don't know how to, I suggest you to folow the tutorial: https://documentation.bonitasoft.com/bonita/7.9/_getting-started-tutorial

To edit your datas, if you modify them by a form, you need to map the input with your business data object in the 'Operation' section of your task.

If you just want to edit without form, just set your business object with your values.

Regards,

Comments

Submitted by yogabaskara17_1... on Thu, 10/17/2019 - 03:09

I think the link that you have shared is too basic, i have followed every step in the link since the first time i learned bonita. None in the link above mentioned editing data in the bdm. In my case i want to do a basic editing data in my project. i want to edit data by selecting a row in a table in the form -> once row selected the field in a row displayed in the text field -> and then in the text field we can edit through the text field and then press submit to send edited data to the bdm.

Submitted by bastien.laurent... on Thu, 10/17/2019 - 08:39

Ok, so, in your form contract, you have a list of your business object we will name as 'myBusinessObjectListInputData'.
In your form, your dataTable is fill by a API variable like :
name value type
myBusinessDatasResult ../{{context.myBusinessVariableName_ref.link}} API

So now, in your formOutput, you need to do something like that:

return { 'myBusinessObjectListInputData': $data.myBusinessDatasResult}

For finish, in your task operation, just match 'myBusinessVariableName' to 'myBusinessObjectListInputData'.

And it will be saved ;)

Regards

Submitted by yogabaskara17_1... on Thu, 10/17/2019 - 10:29

thanks for reply, what you have instructed is similar to what i have done in my project. however, when i checked in the H2 the data won't updated. Here is my .bos file https://www.dropbox.com/s/mayojowlsdkx728/Update.bos?dl=0 i hope you can check out the project and see what i have done. Make sure you run TEST Update-1.0.proc diagram and see what went wrong there. I'm looking forward for your answer.
thank you

Submitted by bastien.laurent... on Thu, 10/17/2019 - 10:41

What's your version of bonita ? Cause i can't open your bos file

Submitted by yogabaskara17_1... on Thu, 10/17/2019 - 10:56

version 7.9

Submitted by yogabaskara17_1... on Thu, 10/17/2019 - 10:56

mine is version 7.9.

1
0
-1

Hello,

I think, the bdm queries is used only for 'SELECT' clause, i don't think that you can usse it for other clause like UPDATE.
To update a businessObject, you need to pass througt an 'Operation' in your process.
Like :
myBusnessObject 'useJaveMethod' -> setMyAttribute() -> myInput.myAttribute.

Regards,

Comments

Submitted by yogabaskara17_1... on Wed, 10/16/2019 - 10:32

hi,

thanks for replying, if it's only for "SELECT" clause then how we can edit or update the data? In this case i want to update the data that i have been previously selected from table row. Do you know how to implement updating data in the bdm?

Thanks,

Notifications