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?
New Session
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
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
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
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?
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?
-
- Posts: 7532
- Joined: Sun Apr 24, 2005 12:36 am
- Contact: