Dear forum
Our case comment tabs in Bonita 7.4.3 was great, but our project manager was insist to have a comment field in form. His reason was our end users were not so willing to fill the comment if they have to open the other pages.
May other forum member has experience or solution to use widget as comment field in form and show the result in case comment tab?
Your immediate reply would be appreciated. Thank you very much
Best regards
without having to do too much work…
I would proceed as follows:
This is example code it will not show you yours…but this will work
- In Execution->Contract->Add (not Add from data…) …Name is comment1 - type Text
- Add a Process Variable comment and click the Default Value drop down and select Contract Input comment1
- After the Start add a Script Connector to use the API to addProcessComment (see documentation here: http://documentation.bonitasoft.com/javadoc/api/7.4/index.html and do a search for addProcessComment) to take the process variable comment and (add it to the process case (this is your homework (no code given))
- finally open the form in UI Designer and do the following:
4.1. SAVE A COPY - Save as for going back if necessary
4.2. Add a Text Field to the form and change the label as required
4.3. change the value to formInput.comment1
4.4. change the variable formInput from
{
"selectMultipleBDM01Input" : {
"firstName" : "",
"lastName" : "",
"Company" : ""
}
}
to
{
"selectMultipleBDM01Input" : {
"firstName" : "",
"lastName" : "",
"Company" : ""
},
"comment1" : ""
}
(don’t forget the , after the } )
4.5. And finally change the variable formOutput from
return {
'selectMultipleBDM01Input': $data.formInput.selectMultipleBDM01Input
};
to
return {
'selectMultipleBDM01Input': $data.formInput.selectMultipleBDM01Input,
'comment1': $data.formInput.comment1
};
All done and no major changes…
regards
Seán
PS: As this reply answers your question, please mark as resolved.
Thank you Sean…will try soon and come back to you and will mark resolved when done…
I am still working on the solution but I do believe your answer has giving us a direction. thank you very much.