Gerard Cruz
Gerard Cruz

Reputation: 649

How to make an emailed document form make changes to my local database?

I have this sample application regarding Change Requests.

If the form is saved, it will send a form as an email to the listed approvers.

The form has 2 actions - Approve and Reject.

Let's say the approver approves the CR. It will update the emailed form document but the document that resides in my local database won't. Is there a way for me to update the documents in my local database automatically if the recipient(approver) has approved/rejected the document form?

Upvotes: 0

Views: 319

Answers (2)

Newbs
Newbs

Reputation: 1632

The safest design for a highly distributed workflow application, (replicas on multiple servers and local replicas on users laptops) is to have the approvals and updates posted as new responses and not have updates directly to the main WF document. The WF document should then compute the statues based on the responses. Finally, an agent running on ONE server can post the status updates to the document and archive the responses.

This construct will eliminate (or reduce significantly) the possibility of replication and save conflicts. It is particularly needed for WF items that require multiple approvals from people who are disconnected or connected to different servers.

Upvotes: 2

Ken Pespisa
Ken Pespisa

Reputation: 22264

Not automatically, but you can add logic to the approve and reject actions to update the database.

If this database is shared on a server, one way would be to make it a mail-in database. Your approval actions could then trigger an email that goes to that mail-in database address. Your database would then need an agent to process the emails, perhaps simply just parsing the subject line which could contain the UNID or some key that says which document to update along with the response of approved or rejected. This would work in a distributed environment.

If the environment is not distributed, say everyone is always on the same network connected to the same Notes server, then you could write some Lotusscript code to update the remote database directly.

Remember the context that you'll be in. When the emailed form is open in an approvers Notes client, he or she doesn't have access to your local databases. So you'll need to have a place on the server that the response action can update.

Upvotes: 2

Related Questions