I have requirement, where when i grants JDBCGroup entitlement the below
rule will trigger and email the Group information in eMail. This works
fine when i grant one JDBCGroup entitlement.
If i grant multiple JDBCGroup entitlement same time.

For example granting 2 JDBCGroup entitlement, triggers two separate
emails for each JDBCGroup entitlement value.
email is send to user with JDBCGroup "entitlement value" as below

email:1
To:User1
Message: Group1

email:2
To:User1
Message:Group2

If i give send mail action outside the loop it send only the last
granted entitlement value.

Here is what i need:
Send email once with all the JDBCGroup entitlement value granted.

Example:

email:1
To:User1
Message:
Group1
Group2

Basically i need to hold (not overwrite) the group entitlement value
inside the loop, and use it outside the loop.

Below is my current policy

<rule>
<description>Implement JDBC Group Entitlement</description>
<conditions>
<and>
<if-class-name mode="nocase" op="equal">User</if-class-name>
<if-association op="associated"/>
<if-entitlement name="JDBCGroup" op="changing"/>
</and>
</conditions>
<actions>
<do-for-each>
<arg-node-set>
<token-added-entitlement name="JDBCGroup"/>
</arg-node-set>
<arg-actions>
<do-add-dest-attr-value class-name="User" name="CUSTJDBCGroup">
<arg-value type="string">
<token-added-entitlement name="JDBCGroup"/>
</arg-value>
</do-add-dest-attr-value>
<do-send-email-from-template notification-dn="Security\Default
Notification Collection" template-dn="Security\Default Notification
Collection\Havigs JDBC Groups provisioning notification">
<arg-string name="to">
<token-src-attr name="Internet EMail Address"/>
</arg-string>
<arg-string name="firstname">
<token-src-attr name="Given Name"/>
</arg-string>
<arg-string name="lastname">
<token-src-attr name="Surname"/>
</arg-string>
<arg-string name="loginID">
<token-src-attr name="CN"/>
</arg-string>
<arg-string name="bcc">
<token-text xml:space="preserve">abc@novell.com</token-text>
</arg-string>
<arg-string name="secgroup">
<token-added-entitlement name="JDBCGroup"/>
</arg-string>
</do-send-email-from-template>
</arg-actions>
</do-for-each>
</actions>
</rule>


--
lvaradha
------------------------------------------------------------------------
lvaradha's Profile: http://forums.novell.com/member.php?userid=77512
View this thread: http://forums.novell.com/showthread.php?t=454747