How to modify a process variable or a bussines variable, from the activity form, witout using the contract?

1
0
-1

Hi all

I am a newbie at Bonita 7.2.0, and have some doubts.

I have added a new porcess variable in the Bonita Studio, and I want to modify the value from a form button, I have one contract in that task to send datas from the form to the bonita flow.
In the button that I use to send the task, I have a javascript expression like this, with ti objects from the contract:

return {
    notificacionRiesgo:$data.notificacionRiesgo,
    iniciar_investigacion:$data.iniciar_investigacion.value
};

Variables:

notificacionRiesgo --> ../{{context.notificacionRiesgo_ref.link}}
iniciar investigacion --> ../API/bpm/activityVariable/{{taskId}}/iniciar_investigacion

And I also have some "Operations" to map values between the contracts and the process variables and bdm variables.
Recently I added the porcess variable iniciar_proceso, and I forgot to add it to the contract, and to the operations of the task to map the value. In consecuence, I didn't get the value in flow instance, is it normal ?

is there any alternative way of mapping the values between the form and the process variables without using a contract and an operation? Because I think it isn't very intuitive.
Some times I add new fields in the form and I forget to add it to the contract, I don't get the values.
I think it's tedious.

Thank you very much.

Any assistance would be greatly appreciated.

Kind regards,
Héctor

Comments

Submitted by hectorta on Thu, 08/04/2016 - 10:16

No one? is everybody on holiday?
Is mandatory use contract to get values to the work flow?

1 answer

1
+1
-1
This one is the BEST answer!

Hi Hector,

Indeed you need the value to be defined in the contract to pass it from the form to the engine. The application built with Bonita follow the MVC pattern where the Model is the BDM, the Controller are the processes and the View are the forms. In order to separate the view from the controller, Bonita introduced the concept of contract. Once you get that concept, I find the development of applications pretty intuitive.

Hope it helps.

Cheers Lio

Comments

Submitted by hectorta on Tue, 08/09/2016 - 10:22

Ok, Thank you very much, I haven't understood this MVC pattern, in this way, but now I understand it better.
Thank you very much.

Notifications