Skip to main content

Hi All,



i got a activity, which had a mailevent, and then followed by a client event inside. i wan
to add another mail event in between the mail event and the client
event, however, i wan it to follow a condition, if its true, then this
second mail event will trigger, and then goto client event, if not true,
it will just go into the client event. isit possible? hope anyone could
share his/her experience with this scenario on how it can be done. thanks


 


regards,

Martin

Martin,


it is possible. Try keeping the 3 events in 3 different activities, 1 - mail event, 2 - optional mail event, 3 - client event. link the activities 1 & 2 and 1 & 3. keep your condition in the a line rule in the link for the activites 1&2. If the line rule is true then the event 2 will execute.


Krishna


Hi there!


 


Well, Krishna is 100% correct - it's always best practise to not share client events and other events in one activity. To better understand this, have a look at planning options (look for it in Slots and Destinations in the help-file).


 


What I'm getting at is that in most default setups of activities, you'll be creating an Activity Instance for each destination users in the Destination Rule of an activity. In programming terms, think of each Activity Instance as an Object that you create, and the events in the activity as... well, as events. The events will execute for each Instance - so you could end up with the email event firing a few times which you don't really want...


 


If you actually want the above to happen - well, then that's a different story. In that case you can add some code to your Mail Event. Set it up as usual. After that, right click on the event and select View Code. You'll see the WF XOML - right click on the event and view code again - you'll get to the actual C# code... Modify it in there, and voila! :)


 


HTH!


Louis


Reply