Answered

How to modify the name of a document generated by a template ?

Hi,

When you use a document template generation, you have to tell the document name but it's a fixed string which is used for all generated document (for example : Invoice).

But, as we want to put the generated document in Alfresco and send it by mail, we want to have a name based on an other attribute of the entity (for example : the invoice number) ; so the document name could be "Invoice 201411001" for example.

Ideally, we want to use an expression to do this.

Is't possible ?

If not, what are the other solutions to have document based on the same template with different names ?

Thank you for your advices.

Best Answer
photo

Dear Philippe,

In the following article, you will find some examples working with rules to modify metadata.

By default, a document uploaded through the ECM control will allow users to manually edit this information.However and when using ECM integration, there are scenarios in which you may want to automatically map business information into a document to be stored at the ECM. This means that you may choose to use a business rule which sets information of the case into the repository's folder metadata. The examples below illustrates the methods to use in a rule which automatically maps information into the uploaded document.

In addition, we want to share with you some articles to set up correctly:

Regards

Comments (8)

photo
0

Dear Philippe,

In the following article, you will find some examples working with rules to modify metadata.

By default, a document uploaded through the ECM control will allow users to manually edit this information.However and when using ECM integration, there are scenarios in which you may want to automatically map business information into a document to be stored at the ECM. This means that you may choose to use a business rule which sets information of the case into the repository's folder metadata. The examples below illustrates the methods to use in a rule which automatically maps information into the uploaded document.

In addition, we want to share with you some articles to set up correctly:

Regards

photo
0

Hi,

Thank you for your answer but it's not applicable when i'm sending the document by mail.

How can i modify the name of the generated document before sending it (on exit action) ?

Thank you for your advices.

photo
0

Dear Philippe,

This is an example to obtain the name of the file: http://help.bizagi.com/bpmsuite/en/index.html?obtain_the_filename_of_an_uplo.htm. If you see, the example uses getXpath to obtain the name, but if you use setXpath, you will be able to change the name as you need. Then, you can use it to send as you need.

Note: It only applies when Bizagi has the upload path by default and it will change the name of file for the new one defenitily.

Regards

photo
0

Hi,

Thank you very much for your help. It works fine.

Kind regards

photo
0

Juan Zuluaga wrote:

Dear Philippe,

This is an example to obtain the name of the file: http://help.bizagi.com/bpmsuite/en/index.html?obtain_the_filename_of_an_uplo.htm. If you see, the example uses getXpath to obtain the name, but if you use setXpath, you will be able to change the name as you need. Then, you can use it to send as you need.

Note: It only applies when Bizagi has the upload path by default and it will change the name of file for the new one defenitily.

Regards

i have an case very similar.

I have an collection in my process and i need generate template files of each row in this collection (this is working). But, i have to change the file names and send these files by email.

When i'm doing the iteration in that collection, an exception is throwed and i can't change the file name(

Error: The process

cannot access the file 'D:\files99\Bizagi\questDev\Docs\10794\1\1454\16316\PO_177'

because it is being used by another process.)Can you help me?

photo
0

Dear Rodrigo,

We think that you are opening the file, but you are not closing it. That why you are getting that message.

Check this article: http://help.bizagi.com/bpmsuite/en/index.html?copy_the_file_content_from_one.htm

If after you check the code, you continue with the issue, share with us your source code of the rule.

Regards

photo
1

Hello Juan,

now i have an similar issue:

I'm trying change an file name, in this case in scope (XPath). But, i haven't success in my expression.

I used the link that you sent to me about rename a file name with iterate over XPath.

Could you help me again?

Thanks in advance.

photo
photo
0

Juan Zuluaga wrote:

Dear Rodrigo,

We think that you are opening the file, but you are not closing it. That why you are getting that message.

Check this article: http://help.bizagi.com/bpmsuite/en/index.html?copy_the_file_content_from_one.htm

If after you check the code, you continue with the issue, share with us your source code of the rule.

Regards

Good morning Juan.

It works!!!

Thank you so much!