cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with the Timer event in BPM

hamsa_shree
Participant
0 Kudos

Hello,

I am facing an issue while using Timer event in the BPM. In my scenario I need to collect the messages from PI for 5 minutes and then merge them and send to the target system as a single file. I have used timer event and given the offset as 5 min but while testing the BPM process is getting completed after the 5 min of receiving the last message i.e I send the first 2 messages on  1st min and 2 messages on 2nd min and 1 message on 4th min the process is getting processed only after the 5th min from the last message sent. But I need the process to get executed every 5 min once, whether it has single message or multiple.

Can anyone please help me in solving this issue.

Thanks & Regards,

Hamsa Shree

Accepted Solutions (1)

Accepted Solutions (1)

Vasilis
Advisor
Advisor
0 Kudos

Hi,

please check if this is helpful:

Regards,

Vasilis

hamsa_shree
Participant
0 Kudos

Hi Vasilis,

I have followed the same steps but still not able to achieve the result. I want all messages to be collected within 5 min and the process should terminate but in my case process is getting end after 5 min of receiving the last message.

If i send 4 messages the process is getting completed after 5 min of receiving the 4th message but I want the process to get completed after 5 min of receiving the 1st message.

Thanks & Regards,

Hamsa Shree

Former Member
0 Kudos

Hi Hamsa,

the problem is that the timer gets recreated every time you receive a message. That's what the event based choice does. It until one of the events gets triggered and the cancels all other events.

With the loop in your model after receiving a message, the timer gets started again with a new 5 minute timeout. The solution would be to not use the event based choice but a parallel split instead.

Best regards,

Frank

hamsa_shree
Participant
0 Kudos

Hi Frank,

Thanks for your response. Now the process is getting executed exactly at the 5th min from the 1st message but there one problem here only 2 messages are getting consumed the process the 3rd message is creating a new process after the 5 min .

Could you please help me out here.

Thanks & Regards,

Hamsa Shree

Former Member
0 Kudos

That sounds correct if you send the last message close to 5 minutes after the first message. The process will execute the "Activity Integration Message" Activity 5 minutes after the first message has been received no matter how many messages are still available.

So if that's not what you want you should take a step back and look at your requirements once more.

Additionally keep in mind that timing in distributed systems will most never be perfect due to processing and transmission delays that you have to factor in in your testing. E.g. if you send a message exactly 4:58 minutes after the first message it could or could not be included in your aggregate message depending on how long the transmission takes. Also take things like e.g. queues or complex mappings in PI into account.

Best regards,

Frank

hamsa_shree
Participant
0 Kudos

Hi Frank,

I am sending 4 message in the 1st minute itself but still it is taking only 2 messages into the process and remaining 2 in the next process.

Thanks & Regards,

Hamsa Shree

Former Member
0 Kudos

Hmm, that sounds strange. If you send them at the same time, they should end up in the same process unless you're sending way too much.

I assume that your process looks similar to the following:

If not please let me see your process.

Btw. people here are more likely to help if you flag answers as helpful and ultimately accept an answer.

Best regards,

Frank

hamsa_shree
Participant
0 Kudos

Hi Frank ,

Thank you so much. It worked now as expected. I had made mistakes in the process steps and corrected now and tested, the process is executing after 5 min with all the messages collected within that time span.

Thanks & Regards,

Hamsa Shree

Answers (1)

Answers (1)

PrashantGautam
Advisor
Advisor
0 Kudos

Hi,

Do you have unconditional fork with intermediate event and timer?

can you share more about the modeling done for the process.

Regards

Prashant

hamsa_shree
Participant
0 Kudos

Hi Prashant,

I have created an Event based choice and there is a intermediate event which merges all the messages and a timer to keep track of the time.

Please let me know if you u need further more details.

Thanks & Regards,

Hamsa Shree

PrashantGautam
Advisor
Advisor
0 Kudos

Hi Hamsha,

Try using parallel gateway instead of event based choice.

TnR

Prashant

PrashantGautam
Advisor
Advisor
0 Kudos

Hi,

Can you share the screen shot of the process model

TnR

hamsa_shree
Participant
0 Kudos

Hi Prashant,

Process Model

Thanks & Regards,

Hamsa Shree

PrashantGautam
Advisor
Advisor
0 Kudos

Hi Hamsa,

If you looking to have a process running endlessly then you are missing a loop back to event based gateway. Loop should go back from "Activity Integration Message" to event based gate way.

Regards