steiners Absent Member.
Absent Member.
1905 views

Bringing free/busy information to another application

Hi

I need to bring calendar information (basic stuff just as the status (free, busy, out of office, and for how long)) to another application.

Reading through the API doc, I think there's two ways to go about this

1) Regularly query the free/busy service (with start/closeFreeBusySessionRequest and getFreeBusyRequest).
2) Create a subscription for interesting events.

Events are often the more efficient way to go about this.. but here I'm struggling a bit, especially since the event definitions don't seen to match up with my expectations (I have no previous Groupwise knowhow but I've worked with Exchange before). I figure I'd need events for type Appointment, and I'd be interested in ItemAccept (accepting an appointment request), ItemModify, ItemPurge, ItemDelete.. but what if a new appointment is created? Would that be a FolderItemAdd?
Also, to add to my confusion, I've been unable to find a way to get appointments.. I figured it would be getItemsRequest.. but there's a remark that lists the object types the request is for and it doesn't list appointment (unlike getItemsRequest which mentions Appointment.. so is that just a documentation error?).

So, I have a list of method calls that is unclear on the one hand, on the other the system limits of the free/busy service are unknown to me. has anybody worked on something similar - if so, what route did you go?
Or what are your experiences with the free busy service vis a vis performance.. while you don't expect calendars to change all the time, there's still the issue of meetings being added to a calendar on short notice, and that information should still make it to the other application.

Thanks
Labels (1)
0 Likes
17 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Bringing free/busy information to another application

FolderItemAdd is the event for when an item is delivered to a folder.
That includes delivered items and creating posted (personal) items.
You could define the event configuration to only fire if the item type is
Appointment.

There is a faster call to get free busy information, but its harder to setup
/ call.
I can help you with that call, if you want.

You use getItemsRequest (or preferably, use the cursor calls) to get items.
You specify to get items from the Calendar folder.
You would need to create a filter to only get Appointment items.

The events are only on a per user basis.
(There are no global events.)

Are you planning to create an event configuration for each user that you are
monitoring?

The POA also has the ability to return the free busy information. It is in a
format that Exchange users can get the information. Would that be a
possibility (an IFB address)?

There would be examples of building a query for Appointments in the forum.
Have you search there. There should be examples of building queries in the
SDK.

Let me know if you have more questions or problems.

Preston




>>>


> Hi
>
> I need to bring calendar information (basic stuff just as the status
> (free, busy, out of office, and for how long)) to another application.
>
> Reading through the API doc, I think there's two ways to go about this
>
> 1) Regularly query the free/busy service (with
> start/closeFreeBusySessionRequest and getFreeBusyRequest).
> 2) Create a subscription for interesting events.
>
> Events are often the more efficient way to go about this.. but here I'm
> struggling a bit, especially since the event definitions don't seen to
> match up with my expectations (I have no previous Groupwise knowhow but
> I've worked with Exchange before). I figure I'd need events for type
> Appointment, and I'd be interested in ItemAccept (accepting an
> appointment request), ItemModify, ItemPurge, ItemDelete.. but what if a
> new appointment is created? Would that be a FolderItemAdd?
> Also, to add to my confusion, I've been unable to find a way to get
> appointments.. I figured it would be getItemsRequest.. but there's a
> remark that lists the object types the request is for and it doesn't
> list appointment (unlike getItemsRequest which mentions Appointment.. so
> is that just a documentation error?).
>
> So, I have a list of method calls that is unclear on the one hand, on
> the other the system limits of the free/busy service are unknown to me.
> has anybody worked on something similar ‑ if so, what route did you go?
>
> Or what are your experiences with the free busy service vis a vis
> performance.. while you don't expect calendars to change all the time,
> there's still the issue of meetings being added to a calendar on short
> notice, and that information should still make it to the other
> application.
>
> Thanks


0 Likes
steiners Absent Member.
Absent Member.

Re: Bringing free/busy information to another application

Hi Preston

I'm interested in free/busy, but the warnings in the dev guide kinda put me off.. if I call it, and I'm being told to wait a minute then clearly it matters how frequently I call this service (or that's my interpretation of the warnings).

My experience with polling vs. events generally leads me to favor events though.. that's why I was also looking at this. Given my requirement, to always be able to tell if a user is free or busy and for how long.. would you advise going down the free/busy route or the event route?


With regards to events and item extraction.. is there a way to limit a getItemsRequest to just calendar items and items that lie in the future? I saw you need a folder identifier for getItemsRequest (container).. is there a way to get that identifier globally or do I have to search every user's folder separately?

>The POA also has the ability to return the free busy information. It is in a
>format that Exchange users can get the information. Would that be a
>possibility (an IFB address)?

I don't think so.. the way I understand it, the app that I need to feed with data works client to client.. so some client application extracts the information from a locally running outlook (or notes). For my implementation, I favor a server to server solution.

>Are you planning to create an event configuration for each user that you are
>monitoring?

The way I understand it, that's what I need to do. I figured I'd need to get a list of users from "my" system, determine how to translate those into user ids that GroupWise uses, and then set an event filter for each of them.

I've not yet gone through the forum other than the first few pages.. let's see if I can find a working example on calendar reading..
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Bringing free/busy information to another application

I'll need to reply in separate posts to return all of the information.

The preferred way would be to query the POA for the IFB information.
There no "gathering" of the data as it happens. (There is no dredging of the
user's data.)
When a request is issued to get the free / busy information for a user, it
happens real time. The current free / busy information for the user at that
instance is returned. The server can act like a client and request the
information from the POA.

This method would have the least impact on the POA.


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Bringing free/busy information to another application

Here is an example of just getting the calendar items from today to two
weeks in the future.

private void testGetCalendarItem()
{
CreateCursorRequest creq = new CreateCursorRequest();
CreateCursorResponse cresp;
DatatypeFactory fact;
DestroyCursorRequest dreq = new DestroyCursorRequest();
DestroyCursorResponse dresp;
Filter filter = new Filter();
FilterEntry entry = new FilterEntry();
FilterGroup and = new FilterGroup();
GregorianCalendar cal;
GregorianCalendar end;
int count;
List<Item> list;
ReadCursorRequest rreq;
ReadCursorResponse rresp;
String container = getFolderId();
XMLGregorianCalendar start;
XMLGregorianCalendar duration;

try
{
fact = DatatypeFactory.newInstance();
cal = (GregorianCalendar)GregorianCalendar.getInstance();
cal.set(Calendar.HOUR, 0);
cal.set(Calendar.MINUTE, 0);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
end = (GregorianCalendar)cal.clone();
end.add(Calendar.DAY_OF_YEAR, 14);
start = fact.newXMLGregorianCalendar(cal);
duration = fact.newXMLGregorianCalendar(end);

and.setOp(FilterOp.AND);

entry.setField("@type");
entry.setValue("Appointment Note Task");
entry.setOp(FilterOp.IS_OF);
and.getElement().add(entry);

entry = new FilterEntry();
entry.setField("source");
entry.setValue("received personal");
entry.setOp(FilterOp.IS_OF);
and.getElement().add(entry);

entry = new FilterEntry();
entry.setField("startDate");
entry.setValue(start.toXMLFormat());
entry.setOp(FilterOp.GTE);
and.getElement().add(entry);

entry = new FilterEntry();
entry.setField("startDate");
entry.setValue(duration.toXMLFormat());
entry.setOp(FilterOp.LT);
and.getElement().add(entry);

filter.setElement(and);

creq.setContainer( container );
creq.setFilter(filter);
creq.setView("default message");
cresp = port.createCursorRequest(creq);

if ( null == cresp || 0 != cresp.getStatus().getCode() )
{
return;
}

do
{
rreq = new ReadCursorRequest();
rreq.setContainer(container);
rreq.setCursor(cresp.getCursor());
rreq.setCount(200);
rresp = port.readCursorRequest(rreq);
if ( null == rresp || 0 != rresp.getStatus().getCode() ||
null == rresp.getItems() || null ==
rresp.getItems().getItem() )
{
break;
}
count = rresp.getItems().getItem().size();
list = rresp.getItems().getItem();
for ( Item item : list )
{
// process list
}
} while ( count == 200 );

dreq = new DestroyCursorRequest();
dreq.setContainer(container);
dreq.setCursor(cresp.getCursor());
}
catch ( DatatypeConfigurationException dce )
{

Logger.getLogger(mvnClientController.class.getName()).log(Level.SEVERE,
null, dce);
}
}

Let me know if you have questions.
Preston


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Bringing free/busy information to another application

Here is some alpha documentation for using the freeBusyRequest.
It returns the free / busy information for a list of users.
It only returns the information for users on the current post office.
If there are users from another post office, it will return those users with
information on how to contact that post office.
It returns a token value to pass to the other post office.
By passing the token, you do not have to login as a user from that post
office.
This method if faster than the other methods to get the free / busy
information.

If you want to use this method, I can give you more help.

<xs:element name="freeBusyRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="users" type="types:FreeBusyUserList"/>
<xs:element name="startDate" type="xs:dateTime"/>
<xs:element name="endDate" type="xs:dateTime"/>
<xs:element name="exclude" type="types:uid" minOccurs="0"/>
<xs:element name="token" type="xs:string" minOccurs="0"/>
<xs:element name="view" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="freeBusyResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="freeBusyInfo" type="types:FreeBusyInfoList"
minOccurs="0"/>
<xs:element name="redirectToHost" type="types:HostFreeBusy"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="status" type="types:Status"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="HostFreeBusy">
<xs:complexContent>
<xs:extension base="tns:Host">
<xs:sequence>
<xs:element name="domain" type="xs:string" minOccurs="0"/>
<xs:element name="postOffice" type="xs:string" minOccurs="0"/>
<xs:element name="idomain" type="xs:string" minOccurs="0"/>
<xs:element name="token" type="xs:string" minOccurs="0"/>
<xs:element name="users" type="tns:FreeBusyUserList"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

freeBusyRequest

The existing free busy logic (startFreeBusySessionRequest,
getFreeBusyRequest, closeFreeBusySessionRequest) is a batch oriented method
of getting free busy information. You set up the users that you wish to get
free busy information on. You then poll to get the information until all the
information has been returned, or you give up waiting. If the users are on
different post offices, the POA will communicate with the other POA(s)
asking for the information. The information is written asynchronously back
in the users database.

The freeBusyRequest works differently. It will gather the free busy
information of the users that are on the same post office and return
immediately. It will also return information on the other users and which
post office(s) they are on (with connection information). It also returns a
token to authenticate to the other post office. The user can then call the
freeBusyRequest on the other post office passing the returned token. This
will enable the user to be authenticated to the other post office without
having to login as a user on the other post office. The free busy
information for the users on that post office is returned. (There is no need
to poll for the information.) The user would contact each post office to get
back the free busy information.

simple example:
private void testBusySearchLive() {
Calendar cal;
DatatypeFactory fact;
FreeBusyUserList fbul = new FreeBusyUserList();
Holder<FreeBusyInfoList> fbil = new Holder<>();
Holder<List<HostFreeBusy>> redirect = new Holder<>();
Holder<Status> status = new Holder<>();
NameAndEmail user;
TimeZone tz = TimeZone.getTimeZone("America/Boise");
XMLGregorianCalendar end = null;
XMLGregorianCalendar start = null;

user = new NameAndEmail();
user.setDisplayName("Preston Stephenson");
// user.setEmail("pstephenson@prestons.provo.novell.com");
// user.setUuid("2D16B180-0922-0000-846C-82BD300F9E1C");
fbul.getUser().add(user);

user = new NameAndEmail();
user.setDisplayName("Craig Johnson");
// user.setEmail("cjohnson@prestons.provo.novell.com");
fbul.getUser().add(user);

user = new NameAndEmail();
user.setDisplayName("Dave Hansen");
user.setEmail("drhansen@prestons.provo.novell.com");
fbul.getUser().add(user);

user = new NameAndEmail();
user.setDisplayName("David Tracy");
user.setEmail("dtracy@prestons.provo.novell.com");
fbul.getUser().add(user);

cal = GregorianCalendar.getInstance();
cal.setTimeZone(tz);
try {
fact = DatatypeFactory.newInstance();
start = fact.newXMLGregorianCalendar((GregorianCalendar)cal);
cal.add(Calendar.WEEK_OF_YEAR, 2);
end = fact.newXMLGregorianCalendar((GregorianCalendar)cal);
} catch (DatatypeConfigurationException ex) {
Logger.getLogger(fxClientController.class.getName()).log(Level.SEVERE,
null, ex);
}
port.freeBusyRequest(fbul, start, end, null, null, "details", fbil,
redirect, status);
}

Preston



0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Bringing free/busy information to another application

Getting events is per user only.
There is no way to get events globally for the post office.

There is quite a lot of work to set up getting the events you need for each
user. Then, processing the events once you get them.
There is quite a bit of work to maintain the event configurations.
There is bit of work to clean up the events after you have processed them.
If you don't clean up the events, it can severely effect the performance of
the POA.

You can set up to receive notification when an event happens for a user.
This can help the performance on the POA.

That all said, it will be a drain on the POA to monitor the events of the
various users.

The POA was designed to only gather the information only when it is needed.
(It doesn't gather the information on the fly.)

I believe that touches all of the items in your post.
If I missed something or you still have questions, let me know.

Preston


0 Likes
steiners Absent Member.
Absent Member.

Re: Bringing free/busy information to another application

Wow.. that's quite a lot of information to digest.

I take it the freeBusyRequest would be preferable over the freeBusy Session (startFreeBusySessionRequest,getFreeBusyRequest, closeFreeBusySessionRequest), correct?
What are the performance considerations to be made here? Is there a request frequency (e.g. 1 request every other minute) that is considered to be okay? I guess up-to-the-second information isn't really necessary and I presume most of the time, appointments are added ahead of the time they actually happen.

I do have some experience with events on other systems where I also need to subscribe per user and gather initial data - so I know it's a bit of work to bring it all together (and some work setting up the listener to get the notifications to then download added/updated/changed items). If there's a reasonable frequency for running freeBusyRequest, I guess that would be the most simple solution.
0 Likes
steiners Absent Member.
Absent Member.

Re: Bringing free/busy information to another application

Wow, that's a lot of information. Thanks 🙂

So if I'm reading this right, the freeBusyRequest would be the most effective solution for my requirements. Are there any performance issues to consider when using it? I figure I wouldn't need up-to-the-second information on appointments as they usually are added in advance. What kind of frequency to calling freeBusyRequest would be okay and not cause any negative effects on the POA?
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Bringing free/busy information to another application

The freeBusyRequest would be preferable over the free busy session
requests.
The freeBusyRequest would be preferable over monitoring the events (unless
you need the information for other reasons).
The preferable would be to only call freeBusyRequest (and format the data)
when someone / something asks for the free busy information for a user.

I'm not sure about how calling freeBusyRequest will effect the performance
of the system. When we put in the event system, it slowed the performance of
the POA by 3% to 5%.

Preston


>>>


> Wow.. that's quite a lot of information to digest.
>
> I take it the freeBusyRequest would be preferable over the freeBusy
> Session (startFreeBusySessionRequest,getFreeBusyRequest,
> closeFreeBusySessionRequest), correct?
> What are the performance considerations to be made here? Is there a
> request frequency (e.g. 1 request every other minute) that is considered
> to be okay? I guess up‑to‑the‑second information isn't really

necessary
> and I presume most of the time, appointments are added ahead of the time
> they actually happen.
>
> I do have some experience with events on other systems where I also need
> to subscribe per user and gather initial data ‑ so I know it's a bit of
> work to bring it all together (and some work setting up the listener to
> get the notifications to then download added/updated/changed items). If
> there's a reasonable frequency for running freeBusyRequest, I guess that
> would be the most simple solution.


0 Likes
steiners Absent Member.
Absent Member.

Re: Bringing free/busy information to another application

Unfortunately, I don't know when somebody is asking for the data. I need to inject calendar information into a unified communication app.. and their clients show presence information. The system has support for Outlook and Notes, where running clients extract the calendar, then publish that information, and the server sends the information (current status, and how long untl something changes (next appointment)) to everybody who is subscribed. So there's no way of knowing when a client may request the presence state of another user and I have to inject that information to the server so it's available whenever somebody displays the presence of a user.
Consequently, I would have to extract the information regularly. The existing integrations they have are pretty quick in catching changes, so I think the solution I have to build for Groupwise should be similar. Of course, the polling interval would be configurable, but any test system I build would in no way replicate a production system - so if anybody has any experience on effects the freeBusysRequest has on the POA performance it would be good to know.
Do you know what the freeBusyRequest does behind the scenes? I guess if the system keeps a state in cache that is updated every time somebody changes one of their appointments (or gets a new one), it would have no significant effect on performance.
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Bringing free/busy information to another application

Sorry, I am confused. The POA can publish the users calendar information in
a format that an Outlook user can consume. As far as I remember it functions
the same. If the system has support for Outlook and Notes, it should be able
to obtain the GroupWise information in the same manner.

The freeBusyRequest queries the user's database and returns the free busy
information as it is at the time of the request. There is no state that is
cached.

Preston


>>>


> Unfortunately, I don't know when somebody is asking for the data. I need
> to inject calendar information into a unified communication app.. and
> their clients show presence information. The system has support for
> Outlook and Notes, where running clients extract the calendar, then
> publish that information, and the server sends the information (current
> status, and how long untl something changes (next appointment)) to
> everybody who is subscribed. So there's no way of knowing when a client
> may request the presence state of another user and I have to inject that
> information to the server so it's available whenever somebody displays
> the presence of a user.
> Consequently, I would have to extract the information regularly. The
> existing integrations they have are pretty quick in catching changes, so
> I think the solution I have to build for Groupwise should be similar. Of
> course, the polling interval would be configurable, but any test system
> I build would in no way replicate a production system ‑ so if anybody
> has any experience on effects the freeBusysRequest has on the POA
> performance it would be good to know.
> Do you know what the freeBusyRequest does behind the scenes? I guess if
> the system keeps a state in cache that is updated every time somebody
> changes one of their appointments (or gets a new one), it would have no
> significant effect on performance.


0 Likes
steiners Absent Member.
Absent Member.

Re: Bringing free/busy information to another application

While the system supports Outlook and Notes, it has a plugin for each client that exports calendar information to the third party app - so you'd actually have to run an Outlook client on every client machine.. and then the Outlook client needs to be running. Not something you'd want to do in a Groupwise environment.

Is there anything I should know regarding authorization when using freeBusyRequest? I gather it would take some special permissions for a user to be able to request that info from everybody else? Or is that something that's open to everybody? (I'm thinking of how the calendar feature works in Exchange where users need to explicitly share their calendars (or the admin does it for them), and where you can have special admins that have default access rights to mailboxes). I've scanned through the admin guide but have not found anything regarding configuration of an admin for soap.
0 Likes
steiners Absent Member.
Absent Member.

Re: Bringing free/busy information to another application

Just one additional question with regards to this request.. would it return a list of appointments within the start/end dates (just like the getFreeBusyRequest)?
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Bringing free/busy information to another application

The information is the same.


>>>


> Just one additional question with regards to this request.. would it
> return a list of appointments within the start/end dates (just like the
> getFreeBusyRequest)?


0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.