Automatically sign imported documents

Requests for new functionality or improvements in existing functionality. Please provide clear descriptions of your request, an example or if possible a real life scenario.
Post Reply
holzhannes
Posts: 4
Joined: Sat Sep 14, 2019 10:57 am

Automatically sign imported documents

Post by holzhannes » Sat Sep 14, 2019 10:59 am

Is there a way to automatically sign imported or edited documents without a user action?

User avatar
rosarior
Developer
Developer
Posts: 478
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: Automatically sign imported documents

Post by rosarior » Thu Sep 19, 2019 3:00 pm

Not at the moment but if added as a workflow action it can be supported. We'll explore this for addition. Thanks!

holzhannes
Posts: 4
Joined: Sat Sep 14, 2019 10:57 am

Re: Automatically sign imported documents

Post by holzhannes » Sat Dec 28, 2019 11:30 am

Hello Rosario,

Thank you very much for all your work and the news Version. I am using the new Version 3.3.6 and have tested the action to sign documents through a workflow with the action Sign document (detached), but in the actions error log I can see only these errors for the action. Signing manual does work.

Code: Select all

28. Dezember 2019 11:43 	AttributeError; 'NoneType' object has no attribute 'open' 	
28. Dezember 2019 12:02 	AttributeError; 'int' object has no attribute 'sign_file' 	
28. Dezember 2019 12:09 	AttributeError; 'NoneType' object has no attribute 'open' 	
28. Dezember 2019 12:19 	AttributeError; 'NoneType' object has no attribute 'open'
If I try to add an Sign document (embedded) action on saving it is failing with an Internal Server Error action. Do you have any ideas what is wrong?

User avatar
rosarior
Developer
Developer
Posts: 478
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: Automatically sign imported documents

Post by rosarior » Mon Dec 30, 2019 3:48 am

Thanks for the report. An issue has been opened to track this (https://gitlab.com/mayan-edms/mayan-edms/issues/726)

User avatar
rosarior
Developer
Developer
Posts: 478
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: Automatically sign imported documents

Post by rosarior » Tue Dec 31, 2019 8:20 am

The issue has more than one cause. First there was an issue with the key serialization, this was the cause for the message "'int' object has no attribute 'sign_file'". A fix for the issue has been committed (https://gitlab.com/mayan-edms/mayan-edm ... 8a2e8dd026).

The other cause is trying to sign a document during the initial state of a workflow. When the sign action executes the document is only created but has not yet been processed and has no corresponding document version, which is what is actually signed.

The correct workflow is to create 2 states. Add the document sign action to the second state. Add a transition from state 1 to 2 that is triggered when a new version is uploaded.

Instead of raising an error of "'NoneType' object has no attribute 'open' " the commit also add a more descriptive message in the log explaining the above.

Post Reply