Moving from One Activity to Another

  • 9 March 2009
  • 5 replies
  • 0 views

Badge +3

Hi,


From .NET Code we need to move from one activity to another activity. I understand if Activity 1's last event is a client event then we can move it from .NET Code. But if ii does not have any client event then is it possible to move from .NET Code using K2 BP APIs. For example


Activity 1 (Mail Event, Server Event) --> Activity 2 (Mail Event, Server Event)


Please help


Thank you


Aravindh


 


 


5 replies

Badge +11
Couldn't you just use line rules?
Badge +3

Hi,


Thanks for the reply.


I am sorry. My question was incomplete. Please find below the complete one.


From .NET Code we need to move from one activity to another activity based on certain actions taken by user (Not from Worklist) from a simple ASPX screen.


For example:


Activity 1 (Mail event, Client Event) ------> Activity 2 (Mail Event, Server Event) --> Activity 3 (Mail Event, Server Event) OR
               Activity 4 (Mail Event, Server Event)


In the above workflow - When user approves then it moves to Activity 2. But after activity 2 based on certain actions taken by user from ASP.NET screen
we need to decide whether to send it to Activity 3 or Activity 4. Our problem is we are not able to stop after activity 2 (either it moves to next activity or it
succeeds and ends). is there a way where based on some user actions (Not related to worklist) we can decide whether to move to Activity 3 or Activity 4.


As a temporary solution we have created an extra client event (Dummy event) to Activity 2 and adding a worklist to a dummy ID. By this way we are achieving our needs but I feel
that this is not the right way.


Could you please help?


Thank you
Aravindh

Badge +5

Hi Aravindh,


What you explained here is the exact scenario the "Async Server Event" is used for.


The following post have a very detailed explanation of this : http://k2underground.com/forums/thread/17733.aspx


This is a K2.net 2003 post, but the functionality is exactly the same in K2 blackpearl. Please note that you would require HotFix KB000384 together with K2 blackpearl 807 370 for it to work correctly.


Kind Regards,


Gert


 

Badge +9

Just to add to Gert's suggestion around Async Server Events.  There is coverage around the async server event in KB 272 as well (http://kb.k2workflow.com/articles/kb000272.aspx).  Don't forget about the hotfix KB384 (if you're doing this on version 0807.370)

 

Badge +3

Hi Bob, Gert,


 Thank you very much!


With Regards,


Aravindh

Reply