Wednesday, March 29, 2017

Oracle BPM: Time for Time Out (2)

In a previous blog posting I discussed a solution to re-initiate a scope in BPMN that is supposed to time out after some time. In this posting I discuss how that solution inspires a couple of other use cases where a time out has to be re-initiated by calling an operation on the process.

In the following process model there are three flow, for three different use cases to re-initiate the time-out of:

  1. A process instance (top flow),
  2. An (asynchronous) Receive activity (middle flow),
  3. A User activity (bottom flow).

Re-initiate Timer for Process Instance

The trick here is to use an Event Based gateway that either fires when the time-out occurs, or responds to the call to the re-initiation operation (Reinitiate Requested in the picture) which passes on a new duration. The Timeout Event Gateway is started again, whereby the the new duration is used to (re)schedule the Time Out timer. The reinitiate Gateway is necessary to loop back, and is the default. The condition of the no flow is "false".

The following picture shows the flow when that happens.

Re-initiate Timer for Receive Activity

The re-initiation of the Receive activity happens through a Boundary Message event. The dummy Gateway does not do anything but is necessary to loop back to. The Receive is then rescheduled with a timer that has a new duration as passed on through the call.

The following picture shows the flow when that happens.

Re-initiate Timer for a User Activity

In the previous two examples, the timer is completely (re)scheduled with the passed-on duration. In the bottom example the time-out of the User activity happens by setting the expiration on the Human Task. This is the recommended way as it will make the expiration visible in Workspace, and make sure the Human Workflow Engine properly cleans up the Human Task (which was not always the case in previous releases of the Oracle BPM Suite).

What happens in this scenario is that the expiry is actually not re-initiated but instead paused for a while using an Update activity with operation "Suspend Timers", then wait, and then continue the timer using an Update activity with operation "Resume Timers". This construction allows usage of an (non-interrupting) Event Subprocess, which has the advantage that it does not clutter the rest of the process model, you keep the same Human Task instance (with the same taskId) plus, if you have multiple Human Tasks at the same time, you can also use this construction to suspend other user activities as well.

The following picture shows the flow when that happens.

If you want to re-initiate the timer in a similar way as in the previous two use cases, then you can use the second solution with a Boundary Timer event and a Boundary Message event. The result will be that the Human Task is actually aborted (as said not in some older 11g versions), and then a new instance is created (with a new taskId!). Depending on your process model you can also put the User activity in a scope of its own, and re-initiate the timer of that as described in the previous posting on this topic.

1 comment:

gygujh said...

Banyak cara yang bisa anda gunakan untuk sembuhkan penyakit menular sexual . Obat Sipilis Diapotik adalah adalah salah satunya tapi jika anda ingin mendapatkan pengobatan maksimal anda bisa coba pengobatan herbal.

Penyakit sipilis adalah salah satu penyakit kelamin menular yang berbahaya. Yang tentunya disebabkan oleh seringnya berganti pasangan seksual pada dengan beberapa orang yang berbeda. Penyakit kelamin ini bisa menular lewat hubungan seksual. Penyakit yang sering disebut dengan raja singa ini bukan hanya berbahaya bagi penderita, tapi tentu saja berbahaya untuk setiap keturunannya.

obat sipilis _Khususnya wanita yang terkena penyakit sipilis yang sedang mengandung anaknya. Anaknya pun akan tertular dari ibunya. Lalu bagaimana tips mengobati sipilis dengan tepat. Dan juga memberikan manfaat yang baik bagi kesehatan kita. Tentunya anda harus mencoba beberapa bahan alami yang sudah diolah dengan baik dan menghasilkan obat yang manjur dalam penyembuhan penyakit sipilis tersebut. Jika dibiarkan, penyakit sipilis ini juga bisa merusak organ tubuh lainnya. Seperti misalnya mata, jantung, otak, dan mengalami kelumpuhan.

Artikel tentang penyakit sipilis dan obat herbal alami ada di bawah:
Obat Sipilis Diapotik Umum
obat sipilis apotik
obat sipilis herbal
obat sipilis manjur di apotik

Jika anda ingin konsultasi atau memesan obat herbal silahkan kunjungi pesan obat sipilis ampuh