Update a row in a business object

1
0
-1

Hi,

I would like to update a row in my business object. How can I do that ? If i use transient data I modify the list but not the actual object.

I'm using the default h2 database.

Thanks for your answers,

Pauline

1 answer

1
0
-1
This one is the BEST answer!

Hello, you should use an operation, check here . Hope this helps, Haris

Comments

Submitted by pauline.boukhaled on Mon, 07/07/2014 - 10:09

I'm sorry but I need more informations... I know these operations (expect instanciate with). For example: I have a business object Patient with attributes name and firstname. When I want to change a name of a Patient how can I do that ? Thanks

Submitted by haris.subasic on Mon, 07/07/2014 - 10:26

You will create an operation on your human task. On the left-hand side, you will choose your BO (Patient), for the operator you will choose Java method and on the next screen choose a proper method (I guess something like setFirstName). Finally, on the right-hand side, you will choose your form field (something like field_patient1_FirstName).

Submitted by pauline.boukhaled on Mon, 07/07/2014 - 11:10

I totally agree with you. The point is .. I'm gonna create a new row for this Business Object like that. I want to change a specific row (where name ==“Dupont“) ok then setFirstName("something"). Is it possible to add a condition?

Submitted by haris.subasic on Mon, 07/07/2014 - 13:37

Yes, it is possible, in that case you will use a Query in order to get a row that you need. You can create your custom queries on your business object or you can use generic ones.

Notifications