When to use Simple End Event vs Terminate End Event

Discussions about modeling, execution and management of process/application data.
Forum rules
Make sure every topic contains information about your LSPS version and if relevant also your server OS, client OS, database name and version, and application server name and version.
cbmeeks
 
Posts: 59
Joined: Wed Aug 07, 2013 11:28 pm

When to use Simple End Event vs Terminate End Event

Tue Oct 06, 2015 10:40 pm

I'm struggling to understand when you would use a Simple End Event vs. a Terminate End Event.

Especially when used in a sub-process or reusable sub-process.

Could someone explain the best use-case scenario for each one?

Thanks.

Radovan Cervenka
 
Posts: 48
Joined: Mon Feb 27, 2012 2:47 pm

Re: When to use Simple End Event vs Terminate End Event

Wed Oct 07, 2015 8:26 am

Simple End Event just causes dismissing of the token which arrived to it, but other tokens of its parent (owning) process or sub-process remain unchanged. Terminate End Event causes dismissing of all tokens from its parent (sub-)process. If the (sub-)process contains just one token, there is no difference in execution of these two end events (after disappearing the last token (sub-)process terminates), but you can imagine that in the case of several tokens the behavior is different - activation of a Simple End Event terminates the (sub-)process only when the last token arrives, Terminate End Event terminates its parent immediately after any token arrives.

Does not matter whether these end events appear in process, sub-process or reusable sub-process - behavior is still the same.

cbmeeks
 
Posts: 59
Joined: Wed Aug 07, 2013 11:28 pm

Re: When to use Simple End Event vs Terminate End Event

Wed Oct 07, 2015 3:53 pm

OK, I want to make sure I'm understanding this correctly.

Let's say I have the following process that contains several sub-processes which also contain sub-processes like:

Code: Select all

PROCESS A
    START    ------>     [SUB-PROCESS ALPHA]     ------->   SIMPLE END EVENT



Code: Select all

[SUB-PROCESS ALPHA]
    START    ------->    [SUB-PROCESS BETA]    ------>  [SOME OTHER TASK]   ------>    SIMPLE END EVENT




Code: Select all

[SUB-PROCESS BETA]
    START    ------->   [SOME OTHER TASK]    ------>  [SOME OTHER TASK]   ------>    SIMPLE END EVENT



I have used a SIMPLE END EVENT in all scenarios. Would you say that is the proper way to do this?

I still cannot understand when a TERMINATE END EVENT is actually useful. What would be a use-case for it?

Thanks.

Byron Glueck
 
Posts: 85
Joined: Thu Apr 26, 2012 8:17 pm

Re: When to use Simple End Event vs Terminate End Event

Wed Oct 07, 2015 9:23 pm

A process may be required to finish once one of its started process activities has finished. Using a terminate end event will stop the execution of the remaining process paths or activities.

The process depicted below first performs task 1 and then continues in both directions (parallel split), where task 3 is performed several times on different data sets (task 3 uses looping).

The process is terminated when it reaches the terminate-end event. A terminate end event means that if one of the paths reaches an end, all other process paths (currently performing activities and activities which are waiting to be performed) are ended immediately. This could correspond to a real-life process situation, however unlikely.

diagram-12.jpg
diagram-12.jpg (27.18 KiB) Viewed 8694 times


The example was excerpted from http://goo.gl/GmrmwK
Last edited by Byron Glueck on Wed Oct 07, 2015 9:36 pm, edited 1 time in total.

cbmeeks
 
Posts: 59
Joined: Wed Aug 07, 2013 11:28 pm

Re: When to use Simple End Event vs Terminate End Event

Wed Oct 07, 2015 9:26 pm

OK, I believe I understand now.

So in your diagram, Task 2 and Task 4 start at the same time.

However, if Task 4 finished before Task 2, then Task 3 would never even start. Correct?

If this entire process was a sub-process of a parent, would the parent also immediately end?

Thanks!

Byron Glueck
 
Posts: 85
Joined: Thu Apr 26, 2012 8:17 pm

Re: When to use Simple End Event vs Terminate End Event

Wed Oct 07, 2015 9:48 pm

However, if Task 4 finished before Task 2, then Task 3 would never even start. Correct?

Correct.

If this entire process was a sub-process of a parent, would the parent also immediately end?

No, the parent process should proceed and not (necessarily) end since the Terminate in question is scoped to the subprocess.

cbmeeks
 
Posts: 59
Joined: Wed Aug 07, 2013 11:28 pm

Re: When to use Simple End Event vs Terminate End Event

Wed Oct 07, 2015 9:49 pm

That's what I needed.

Thanks again.

Return to Data modeling

Who is online

Users browsing this forum: No registered users and 1 guest