Skip to main content

Hi All, 

 

Good evening all. Hope you must be doing good!!

 

I am new to K2 development and need your help for below requirement.

 

I have added an Email event in a Workflow activity which should execute if the condition is satisfied.

 

In detail i have an email event placed inside an Activity which has other client event as well. The email event should only execute if the value of a Data field in the workflow contains YES. I cannot keep in in separate activity or choose it to execute on any line rule as it is one of the combined event with other event in that activity.

 

Thank you in advance.

 

RKS

Hi RKS

 

Unfortunately you can't make events within an activity execute conditionally. There are no start or preceding rules for an event, so K2 will execute all activity events in sequence. I would question your statement that you cannot have this email event in a separate activity. There may be design options you haven't considered, such as have parallel paths in your process.

 

You can make the properties of an email event conditional. For example you can use an IF statement in the Subject to change its text.

 

 


Hi Andrew,

Thank you for your reply.

I have actually 2 requirements regarding conditional mail event execution.

The 1st requirement is the email event inside an activity should execute if the value of a Data field contains YES which has some other client events which must execute irrespective of the mail event inside that single activity. You have mentioned about parallel path execution. Do you mean that from 1 previous source activity (say Activity A) with 2 outcome lines will go to 2 different activity one with the mail event (B1) with other events and other activity without mail event (B2) and output outcome of both activity will go the next activity(C) and the among the lines from A to B1 and B2 the line will follow based on data field
Can you please give me some more details about it the parallel path implementation?

The other requirement is the mail event inside an activity should have different subject and content based on the action
E.g. initially the request submitted notification but under rework action go back to same activity but the mail subject and message will be different in the same mail event inside that activity.
Can you please guide me regarding "IF statement " in the mail event. Probably some screenshot will help me a lot.

 

Thanks
RKS


Reply