How i can atach a file in bonita?

Hi,

I have created a human task that contains a simple form. This form contains an widged of attach , so what i want to do is when user select a file, i want to store the name of file into database and in the same time saving it in some location of computer.

regards

Hi,

Let me describe how to attach documents with Bonita.

When you upload a document using the upload widget, the widget calls a REST Api that will store the document in a temp folder and returns the location of that temp file.
Then, when you submit the form, you send the information of that temp file to Bonita engine through the contract.
Using the contract input, you can manipulate the document in the operations.

You have an example of the API to manipulate documents here: http://documentation.bonitasoft.com/handling-documents-0

Hope it helps.

Cheers

Thanks for your answer,

But i’m very confuse because i don’t know how i can doing it? i have to create a script task and then implement in it some code?, how i can begin?

many thanks.

can you give me a bit more explanation about what is the contract input, thanks

Hi,

The contract input is basically the definition of what needs to be sent by the client (usually the form) when the task is submit.
For more information, I would recommend to take a look to this tutorial: http://documentation.bonitasoft.com/getting-started-tutorial-2

Cheers