Skip to main content

Hi

I have an activity with smartforms client event.It has actions and corresponding to it I have created outcomes.The issue is that there is one action which doesnot finish it but it does just an update.

I have a requirement when user selects that actions I need to snd a email and keep the task open.

I just wanted to understand how can I achive that scenario

One way is that I can create new activity with mail event and goback to his step again but then the existing task will be closed and a new task will be created for user which i don't want.

Is there any other way to achieve this?

If you are using K2 for Visual Studio, it may be possible to add custom code to achieve this.  Similar to:


http://help.k2.com/kb000307


Hi

 

Thanks for the response

Can you be more elaborate how can I achieve this.

I am using visual studio and I am using smartform client event.Iit automatically does the operation which you suggested me in Kb article but the thing is this K2 doesn't go from this step to next step it stops there so I cannot use another activity based on user selection and I am confused there

 


When an action is of the type 'Update' it will not have an outcome/line similar to a 'Finish' action; and as such you will not be able to design the workflow to use an email event.


 


As such, perhaps custom C# code against SMTP or EWS email sending is needed to implement this functionality when this Update action occurs.  Unfortunately, I do not have any code samples of this.


 



Hi

 

Sorry for the late reply.

I was able to reach there but the thing is this that the email will be dynamic and I need this data from workflow like to,from,server address 

I checked the Configuration varaible but I cannot find this variables values.

Is there any way I can get this values from the object

Thanks in advance


What values are you attempting to retrieve?  Perhaps some of the Objects return by IntelliSense can retrieve the values you need; likely the 'K2' hostContext:


 


If Environment Library values, during Runtime these will be 'StringTables' values:


K2.StringTable["test"]


 


If Process data field:


K2.ProcessInstance.DataFields["test"]


 


Perhaps task user email are accessible via:


K2.ActivityInstanceDestination.User.Email


 


http://help.k2.com/onlinehelp/k2blackpearl/UserGuide/4.7/default.htm#2.Create/K2_for_VisualStudio_K2_Studio/1.Elements.K2VS/Design_Canvas.htm?Highlight=K2.ProcessInstance


Reply