Creation/modification of repeating/recurring meetings using Java

Hello all,

This question is kind of long, but please bear with me. I’m using the Java API to interface with a Domino 8 server (though any solution would have to work for >= 6.5.X as well).

When a recurring meeting is created, only one Domino item is created to represent all the meetings. All the dates of the various instances are kept in a DateTime vector is several fields of the document (CalendarDateTime for example). Whenever one instance of this repeating meeting is changed (the starting time for instance), the original document is “split” up into X number of documents, where X is of course the number of instances. What happens is that the instance representing the date that was changed keeps the DocID of the original RDV, and Domino creates the other RDVs around the changed RDV (or at least that’s what seems to be happening).

I’m trying to recreate this behaviour using the Java API but I’ve hit a wall. What I try to do is take the recurring RDV and remove all the dates except for the one that has changed. I then create X new documents, and copy each field (using Item.copyToDocument()) to the new RDV. In essence I create clones of the original. I then modify the dates of these clones and save the documents.

Everything seems to work, but these new documents don’t seem to be linked to the original. If I look at the $REF field, it looks valid (they all have the same, original $REF value), but as soon as I open one of these RDVs, I get a “Index not found” error, and the $REF field is changed to a new value. Also, the RDV doesn’t contain the other dates, ie. It seems to be by itself. If I delete one of these copies, Domino doesn’t ask me if I want to delete “just this instance” or “all instances”. Strangely enough, if I delete the modified RDV (the original), it deletes all the other copycats.

I’ve also tried deleting the entire repeating RDV, and then recreating each instance, but the $REF field is special and doesn’t seem to be something that you can set in Java (I get invalid data type errors).

I’m not sure what to do, so if anyone could help, I’d appreciate it!

Subject: Repeating meetings

With repeating meetings when you first create a recurring meeting there is a parent document and a response document.

When you make a change to an instance of a meeting you break out the response document into multiple documents with the $REF pointing to the parent document.

Some date / time fields in the parent and response documents need to stay in synch with the original date / time of the meeting while other fields get updated with the new date / time values.

If a single recurring response document has 5 repeating instances in it and you update say the 3rd one here is what you should do:

  • Instances 1 and 2 stay in the original response document.

  • Instance 3 gets put into a new response document.

  • Instances 4 and 5 get put together in a new response document

  • The $REF for each document should point to the parent document.

I wrote a Lotus Notes email & calendaring application using C/C++ and I can tell there’s lots & lots of rules regarding creation and changes to recurring meetings.

A great resource which will help you is the following link:

http://www-12.lotus.com/ldd/doc/uafiles.nsf/docs/WPNotesCSSchema/$File/csschema.pdf

It’s a fairly complete listing of the Lotus Notes calendaring schema, what fields you need to set and when, and what values should be put into the various fields.

Good luck!

Alex

Subject: Thank you!

Thank you! This is exactly what I need…

I’m still not sure how to go about setting the $REF field, as the Java API gives me an error when I do, but this certainly points me in the right direction.

Subject: Setting $REF field

You’re welcome.

You don’t need to set the $REF field directly. When you call the ‘makeResponse’ method, which you would do for the new instance documents to link them back to the parent document, the $REF field will get automatically set.

Alex