cancel
Showing results for 
Search instead for 
Did you mean: 

How to end the NW BPM at specifc time every day

Former Member
0 Kudos

Hi Experts,

I am doing NW BPM to collect the messages during the day and end the BPM at 10PM every day, I have done BPM design to collect the messages using this blog

I want to use the expression in Timer Configuration

Can you help me with the expression, i wanted to use expression like get the milliseconds between 10PM and the current time (BPM start time)

For example if the BPM starts at 10AM in the morning, i need to get the milliseconds between 10PM and 10AM and pass the milliseconds in the expression.

Regards,

Santhi.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member194786
Active Contributor
0 Kudos

Hi Santhi,

Try with this:

seconds-from-duration(subtract-dateTimes(dateTime(concat(substring(string(current-dateTime()),0,10),"T22:00:00.000+10:00")) , current-dateTime() )) * 1000

To test it quickly, change the bold part to a closer time (let's say 5 mins from the time of execution) and see if it works. You may need to change the +10:00 part to suit your timezone.

Cheers,

Sanjeev

Snavi
Active Participant
0 Kudos

Hi Santhi,

You can use the in-built functions in BPM mapping to get the milliseconds value in the timer expression

for example in your scenario, you can use hours-from-dateTime function to get the total hours from the dateTime your BPM starts and your expected date time when you want to start the timer. this function will return you the hours, and then multiply this with the constant 3600000 to get the milliseconds

there are other date time functions that you can use, this is just an example

former_member186851
Active Contributor
0 Kudos

Hello Santhi,

This timer is to run the BPM process.

Check of the mapping functions if you have any.