Hi,
I’m discovering Bonita 7 and trying the new forms and contracts. Since I don’t use any business data in my test, only pool variables, how can I map the contract with that data?.
Yes, it may be a dumb question, but I’m very confused with this.
Thanks in advance.
Hi dbravo,
Thanks for downloading BonitaBPM 7.
You can map contract input with all kind of variables. Contract input values are accessible as Expression in the Operations of your Task.
So if you want to store a value in pool variable you can just add an operation like this :
myPoolVariable Takes value of myInput
If you want to retrieve the value of child input of a COMPLEX input, go like this:
myPoolVariable Takes value of [groovyExpression] myInput.myChildInput [/groovyExpression]
However we strongly recommend to use BDM when you go to “real” use case.
Some improvement are being made in the roadmap to ease the mapping of a business data with a contract.
I Hope you enjoy the new version.
Romain.
Dear dbravo,
i’m facing the same problem. I created a contract in the form at the pool level and I need to access it.
Did you find a way to map (or read) a contract associated to he initial (pool) form with a variable (BDM, pool variable, process variable… it does not matter)?
Hi Romain,
Thanks for your answer.
Well, I cannot try your method because I cant add an operation on a start form neither when I try it doing via Groovy script connector. Then, How can I map the contract with the pool variables in the initial form?.
Thanks in advance.
Hi,
You may use the default value of your business data to initialize it with contract input values.
You will have to use a script for now.
Regards
I was able to access the contents of a contract created at the pool level as follows:
- After creating the contract and assigning a value to the same I created a process variable and put The default value as the same value as the contract content, so I was able to easily access the contents of a contract that was created in the pool.
I hope it helped you