Skip to main content

Hi everybody,

 

I would like to create a button on a form wich allows to pause the workflow for an amount of time to configured. 

Do you know if there is a K2 service instance existing to do so?

I have found one to delete an instance but not to pause a workflow.

 

Thank you for your help

 

Dear ,

Tryin to figure out wt u r tryin to accomplish , so u want to pause the workflow , meaning ? U want to press the button and after that u remove the task from current user ? And give it relative time frame ? Example: pause it for 2 days , then get the task back to the same user u paused by ?

Best regards .

Hello,

 

Yes, you have perfectly understood.

The user press the button on the form, then the task is removed from this user during a period (2 days like in your example). After the 2 days, the same task gets back to the same user.

I hope it would be more understandable.

 

Thank you for your help 

 

 


Dear ,

 

Im gonna show u how i accomplished that approach , nd if it fits ur scenario , u could use it ,

 

For my example , the workflow looked like this ,

 

12577iE301331A6D032DA7.png

 

 

Start Rule , is used to delay tasks , so in this scenario , after the user hits "pause" button , it will go to the "placeholderContent" activity (which does nothing)

it will wait for the amount of time i set in configuration of "start rule" , then u need to make sure u have a line going back to the same activity ,

 

so in short , Pause button clicked , go to empty activity  , configure the "start rule" , delay it for as long time as u need  , then take it back to the same task .

 

Hope this helps!

Best regards.

 


@AhmadAbdullah Note that looping like this is not recommended for long periods of time, as the database entries for the workflow will continue to fill up with repeated state data every time it loops.


@JonathanT  ,  ill keep that in mind thnx for the info ,

but i honestly dont see how couple of pauses for each workflow is gonna cause an issue ,

its true that it will fill extra data in workflow DB table , but it shouldnt be counted as an issue .

 

Best regards.


Reply