Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
JoeOmerta

Veteran
Registered:
Posts: 210
Reply with quote  #1 
What is the proper syntax to email an entire role?  Currently i've been trying "GetAddresses(ListUsers(ROLENAME))" and other various combinations, all of which give errors.
0
BMellert

Guru
Registered:
Posts: 688
Reply with quote  #2 
I've never tried that approach, but then again we have user details, such as email address, not stored in eUser so we can't use the built in GetAddress() anyway.

I know when I need to email to a role, I run a query joining eAssignment to my user table to get the email addresses.  Its always worked, though perhaps more work than necessary.  (And its our only real choice since we don't store email address in eUser as mentioned above.)
0
jpesout

Avatar / Picture

Veteran
Registered:
Posts: 107
Reply with quote  #3 
I use Visual Script activities, namely For Each Loop and Send Email. As a data object for For Each I use my own business object (with role name as a parameter).
0
JoeOmerta

Veteran
Registered:
Posts: 210
Reply with quote  #4 
I can use a foreach loop(SelectSQL) with the send email, but is there a way to store each selected variable found in the foreach loop so i can GetEmailAddress(VARIABLE) in the email activity?
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #5 
It's a bit weird. I think you have to use the name of the activity itself as the object. So the variable would be something like:
LoopingActivity.MyField

That is how you reference a list. I think it is documented, but not well. It is easier using a Business Object, to be honest, although I hate creating them for single useage.

Generally we try to keep everything in code, now that we can. It makes it easier to find, document and maintain.

__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.
0
JoeOmerta

Veteran
Registered:
Posts: 210
Reply with quote  #6 
I'd like to avoid creating the business object for just this task because of the number of forms in the future i'll be creating as well.  If i can get this on a single line then i can just copy it over instead of having to make a BO every time i need to do this.
0
BMellert

Guru
Registered:
Posts: 688
Reply with quote  #7 
I have created a script library to look up our email addresses.  One takes a query, one a list of user names (comma delimited if multiple) and a role name.  It selects the values and returns the list.

As you can see, there are multiple approaches this may be accomplished.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!