New Session

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
blente
Posts: 3
Joined: Tue Nov 22, 2005 6:04 am

New Session

Post by blente »

I have a Business Object called Set and a BO called User, where each User is connected to a specific Set.
Next I have a BO called Date and one called Session.
Each Date can contain multiple Sessions.
Equal to the User connected to the Set, I have the BO Usersession under Session.
On a specific date I want to create a new Session. The Session should create a record in Usersession for each of the Users in a given Set, thus remembering the user-characteristics from that Date, wich gives me the possibility to exclude a User by deleting the corresponding record, and furthermore I can calculate a totals from all the Usersessions for each User and so on.

So:
I enter the Set I want to use and in the Date-portal I press the Create-New-Button.
In the BO Session there is a rule defined:

If Session IS NEW Then
EXPORT Users TO 'My documents\Users.csv'
IMPORT Usersessions FROM 'My documents\Users.csv'

But the file 'My documents\Users.csv' isnt created and Aware tells my that it cant find the file.

What is wrong/is there a better way to do it?
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

You should be able to achieve what you want without using export/import. Assuming you associate a new Session with a Set when you create the session, you can add a rule with two actions to object Session that would create a user session for each user in the set when the session is created:

If Session IS NEW Then
FIND User WHERE User IN Session.Set.Users
CREATE Usersession FOR EACH User WITH Usersession.Session = Session, Usersession.User = User

If objects Session and Set are associated via the Date object, the rule would look like this:

If Session IS NEW Then
FIND User WHERE User IN Session.Date.Set.Users
CREATE Usersession FOR EACH User WITH Usersession.Session = Session, Usersession.User = User
Aware IM Support Team
blente
Posts: 3
Joined: Tue Nov 22, 2005 6:04 am

Post by blente »

Thank you for the interesting answer.
All relationships are "Peer" and have created there own Reference-Attribute.
I am now stopped by the first action:

FIND User WHERE User IN Session.Set.Users

The response I get is:

"Validation error in action 1. Error analysing path Session.Set.Users Reference lists in the middle of the identifier are not allowed"

What could that mean?
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

This happens most probably because attribute Set in the object Session is marked as "Multiple allowed". Please untick this box and it should work fine.
Aware IM Support Team
Post Reply