Hello,We have read in the forums about using the perl script to send mails to multiple users/group.We would like to know the exact steps for doing this and also how to call the ipl file from the WFM as an external task.Any help would be appreciated.TS.- 6.7.2 SP2OS-LinuxWFM - 1.0.1.1
Ashwini_More: Smitty, like the rest of us, appreciates those who make the effort to use the resources provided by the vendor... and when they have been exhausted, post questions so we can all exercise our minds to fill in the gaps.The more interesting answer to you question for me is, why Perl?Why not Java?It's the modern way you know! Just create a class that uses CSSDK to enumerate a group and extract the email addresses.Once you've got a working class, pop it into yout TeamSite toolkit, build it, and substitute your class for the OOTB one in your workflow. You can reuse the existing email templates, or create your own.The process to acheive this is fully documented in the Workflow Modeler User's Guide. There's even some sample code mentioned in the manuals that you can grab a hold of and bend to your requirements - take a look at "Creating a Custom Email Task" for hints...
One reason to use Perl over Java is you don't have to take down the TeamSite UI when building your workflow. Another would be there are vast amounts of Perl modules that were created for using TeamSite and OpenDeploy. The Java libraries are limited, and there are many desired methods not available OOTB, but you can always create your own.
The more interesting answer to you question for me is, why Perl?Why not Java?It's the modern way you know! Just create a class that uses CSSDK to enumerate a group and extract the email addresses.Once you've got a working class, pop it into yout TeamSite toolkit, build it, and substitute your class for the OOTB one in your workflow. You can reuse the existing email templates, or create your own.
Also, if I recall correctly, the 6.7.2 (vanilla) version of the CSSDK did not correctly handle grouptasks - I believe you need at least 6.7.2 SP2 in order to have a fully functional version of the CSSDK for grouptasks (getting sharedby members, etc.)
Posting the snippet of code that we tried - String testComp = "compliance"; //name of group in OS CSGroup testGroup = client.getGroup(testComp,true); CSIterator testusers = testGroup.getUsers(false); String testEmail = null ; String temp; while (testusers.hasNext()) {CSUser testuser = (CSUser) testusers.next();//giving error on the below line temp = testuser.getEmailAddress(); testEmail = testEmail + "," + temp; temp = null; }testusers are in form of CSIterator. But to get the email address we need to pass string. How can we get it ?
Thanks Smitty. The red line did work.One more thing is we are trying to pass mutiple email address in a string to the function -for eg: abc@yahoo.com,xyz@yahoo.com by concating the email address by a (,) and passing it in the form of String. But it didn't work.
I am not able to make it group email through java class. In java class its giving me error while creating contentXMLTemplate. because in XMLTemplate its taking Targettask owner as a CSUser but in actual case it is a CSGroup.Group Email issue need to get resolve ASAP for me. if it is possible through perl scripting then please help.ThanksAshwini