Wait between Tasks

Hi,

We have a simple 2 user task scenario for payment process…

1- Payment Approve
2- Payment Execute

But between this two user task, we need to wait 1 business day.

Start -> Payment_Approve -> Wait_1_Day -> Execute Payment -> EndProcess

I don’t know how to model Wait_1_Day task.

Any help would be appreciated…

Workaround :
Solution 1- Create a user task for Wait_1_Day and assign it to no one, made User Task Expire…
Solution 2 - Make Wait_1_Day as a IS Flow and is set it’s service to sleep().

Regard,
Eksi

You can create task #2 immediately after completion of task #1, but make it visible to user only after 1 day. this can be controled via task creation date or previous task completion date

Thanks for your reply

Yes,

But as BPM manner, business can’t see the process diagram, i mean they would want to see after the process is waiting “1 working day” activity, payment activity is going to occur.

Regards
Eksi

Hi Eksi,

what about suspending the Process after the first task completed and resuming after 1 day to get the second task fired?

This should be able to be achieved by using some build-in functions fo BPM Development.

Regards,
Holger

Hello!

The suspending should be done by some external process/program, right? Because (I think) a process can’t suspend itself and then resume itself.

Do you have some particular functionality in mind when you say “some build-in functions fo BPM Development?” Or do you rather mean “there should be something, but I don’t know exactly what it is?”

sleep isn’t an option IMO since it blocks a thread in IS.

It’s a pity that wM does not provide a timer task. I don’t know an elegant way of implementing a delay in a process and would be interested to learn one.

Eksi/Thomen,

Did anyone of you get a chance to implement it,if yes, can you kindly share the same with us so that it will be helpful to all as even I too don’t know how to get it done.

Thanks,

Please refer to the 9-5-SP1_Administering_Process_Engine.pdf or the equivalent for your wM Verison. Chapter 6 describes the build-in services for PRT/ProcessEngine.

You can implement a service (for a process step), which suspends the process instance after task completion.
Second Service might be a scheduled one, which checks for suspended instances and resume them if they have been waiiting for one day.

Currently we were not yet in a need to implement such a scenario.
We have only processes, which wait at some join conditions for the next event to arive.

Regards,
Holger

Could you please tell what particular service from PRT do you mean? If it’s pub.prt.admin:suspendProcesses then it’s not what I think is needed here because the service operates on process model (not instance!) level, i.e. you’d freeze all instances of the specified process model.

wM implementation of the BPMN notation is not complete here. I think such need can arise rather often, and there is a dedicated element in BPMN for this, which is not implemented in wM. It’s a pity since wM claims to support BPMN (well, not 100%, but still) since wM 8 which is a couple of years old now, and they still do not support this element.

Another element from BPMN which I personally have missed a couple of times is the event based fork.

UPD: Ah, you probably mean the service pub.prt.admin:changeProcessStatus? It could be used indeed. But I still think that the overall implementation would much more complex than it should be with a BPMN implementing product.

Hi

Thanks everyone for answers, especially fml2 because described situation far better than me.

I found example in web to explain what I need (BPMN2.0)
http://camunda.org/bpmn/reference/#events-timer

I don’t want to suspend process. It has no meaning for Business People. I’d rather try to do what i need using Events in User Task (dummy one) with no assignment . Doing setExpire/CompleteTask should solve my problem.

Regards
Mehmet Eksi

Hi MR as173d,

The attachment zip file contains my workaround.

Document is simple

2 Abstract task.

1 (dummy) User task in between two abstracts.

and 2 Task Events for dummy UserTask
First Event (Queued) for setting expiration date (may use business data). (Set Task Expiration Action)
on the Other event (Expiration Date Reached) , just Complete Task

Regards,
Mehmet Eksi

waitBetweenTasksDoc.zip (724 Bytes)


soryy
and this is sample process example

WaitBetweenTasks.zip (2.58 KB)