Collect 2 business Data' Attributes

1
0
-1

Hello,

I created 2 business Data, "Command" and "Test"
I have no problem with collecting Command's attribute because it comes in first.

But the second Business Data Test is not collected in instantiation form but in a Task's form.
And it does'nt work

So am I forced to use 2 instantiation's form so 2 pools to get 2 business Data ?

Thank you

3 answers

1
0
-1

if you want to return 2 different business object you dont need 2 forms, add them in to formOutput object like
formOutput { command: [], test: [] } and set them in form, and set contracts for return objects, then you can use them.

Comments

Submitted by arnaud.norel-ex... on Thu, 07/26/2018 - 17:10

I'm forced to use 2 forms because the second depends on the first. Command should influence the next form (where you complete Test's fields)
You create only one contract ? in the pool ? That's what I did

In my last form i want fields with values inputed in last form and I have nothing for "Test" but i have the values for "Command"
Strangely in my BonitaEngineLog I have no error but this :

2018-07-26 16:10:42.465 +0200 INFOS: org.bonitasoft.engine.api.impl.ProcessAPIImpl THREAD_ID=49 | HOSTNAME=DK287143 | TENANT_ID=1 | The user <walter.bates> has executed the task [name = , display name = , id = <180476>, parent process instance = <10145>, root process instance = <10145>, process definition = <7952167593338254361>] with task inputs: {commandeInput={commandeid=0, commande=}, testInput={testid=0, label=i try something for label, nature=, environment=, adress=, successText=, errorText=, testtype=I try somehting for testtype}}

It's strange because in the log its totally the inverse than in my form : I have not the Command's attributes but I have Test's attributes...

Submitted by arnaud.norel-ex... on Thu, 07/26/2018 - 17:11

In both I did what you said about formOutput

Submitted by msakirkutlu_1359205 on Thu, 07/26/2018 - 21:30

Ok, if you have to use 2 forms then set 2 business variables in pool. Then go to Contract section, click 'Add from data' and select firs business object, it will add all needed objects in contract for selected business data and it will set default value. then add a human task, select your second form to this human task add contracts again. I suggest to you create new forms after you created contracts. Because if you create new form after contracts it will automatically create formInput and formOutput objects it self.

you can study procurement example for reference.
https://community.bonitasoft.com/project/procurement-example1

Submitted by arnaud.norel-ex... on Fri, 07/27/2018 - 11:19

Thank you very much ! It works !

1
0
-1

I created 2 forms : one for "Command" , one for "Test"
Only with the first I can get the Datas inputed by user.

The second doesnt work : I don't get Datas inputed by user.
**However it works alone in an other pool I did ! **

So am I forced to use two pools because I have two business data ?

Thank You

1
0
-1

Can you explain more about what you want do?

Notifications