cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

Manipulating Date/Time to be used as workflow exit

Jump to solution

I thought I'd share something I recently did to bolster the resiliency of an existing scheduled WF. 

 

I have a WF that runs every hour and should exit at '57 minutes past the hour' to make sure it doesnt interfere wiht the next run. This was being accomplished by setting a var to the current time and then adding 57 minutes to it.  

 

Unfortunately our recent sharepoint connector stability issues have caused the scheduled job to error out a couple of times a day.   If I manually re-launch the WF 27 minutes into the hour, then the exit time gets set incorrectly and will interfere with the next scheduled job that starts on the hour. 

 

This  Regex can be used to modify an existing var that contains a Nintex formatted "Current date and time" and replaces the minutes with a value of your choice.  In my case, I'm replacing the minutes value with '57' so that no matter what time the WF is launched, it will always exit at 57 minutes past the hour.   You can use this structure to modify other parts of the date/time as well but you'll need to play with the Regex to get it right. 

 

Just sharing for others that may have a similar issue

 

"Apply a Regular Expression"

Operation: Replace

Pattern: 

(?<=:)(?:\\.|[^:\\])*(?=:)

Replacement Text:  57

 

Store the first result as your variable that you need to modify. 

 

Labels: (1)
Tags (3)
Reply
1 Reply
Highlighted
Community Manager Community Manager
Community Manager

Re: Manipulating Date/Time to be used as workflow exit

Jump to solution

Awesome tip!

 

Thanks @Ken_T 

View solution in original post

0 Kudos
Reply