Skip to main content

Hi,

i have a question about activities in K2. How can i make an empty activity, ie an activity that does nothing? I mean, i can put an activity and not put anything inside, but i get compilation errors ( Activity has no events ).

At first sight it might look useless to have such an activity however from a graphical point of view it's very helpfull. For example i have 5 previous activities that have 2 possible outcome : success or failure. instead of linking each previous activity to success and then each activity to failure, which is very messy ( arrows everywhere crossing each other ), i would like to link each of my previous activities to an intermediate empty activity, with only 2 arrows afterwards going towards success or failure.

Does it make sense to you?

 Is there a correct way to do this? or even a trick like an event that does nothing ?

Thank you for your help.
 

Hi Malkir,


Place a Default Server event within the activity.  Default Server events essentially do nothing until you write code behind them.  You also are not forced to specify a destination since server events are executed by the server and client events need human interaction (so you must specify a destination).


-mike


You could probably just use a default server event as the event for the activity you are using as a place holder. It is my understanding you have to have an event in an activity. Since a default server event is a generic sort of event designed to hold custom code to be excuted on the server, you could in theory use that event and not add custom code to it so in the end it would basically do nothing and satisfy the requirement of an activity having at least one event.


Thank you very much for your answers, i'll try to put a default server event.

Reply