Checking for activity is exist.

  • 1 February 2007
  • 1 reply
  • 0 views

Badge
I would like some helps for being new to K2.net. I have a process that have 2 parallel activities with infopath. Sometimes it requires only one active to finish the workflow. If activity 1 is finished I need to send email to Activity 2 if it is created from InfoPath to notify that activity 1 is completed.

How do I check to see if the activity 2 is created in order to send email after complete activity 1. If Activity 2 is not created then I don't have to send email to activity.

Thanks in advance.
Uyen

1 reply

Badge +5
Hi,
You could create 2 Boolean ProcessInstance DataFields(act1,act2) that is by default set to false. When a certain activity is activated you can set the appropriate datafield to true. Insert a server event into each activity after all the other events and from there use K2.GotoActivity(<activityName>) which will expire all the other activities leaving only the activity you specified in the Goto. From there you could have a mail event which tests the appropriate variable and if the condition is true send the mail and complete.


Regards

Reply