Skip to main content

This article will describe how to suspend your instance if any interruption happened or missing any business rules during process design

in normal case process will terminate if missing any business rules or unexpected behavior happened that will impacted on your instances and  to fix it again will restart a new instances from scratch but if you did the following solution you will move your instance to right activity till redeploy your process again after fix its design

Instructions

1- Create new data field named for example IsClose and set its initial value "0" 

23050i53C3EB0316B7B423.png

 

2- After finish your process design will add a new activity named for example "Recovery" and link it with any activity but in its line rule property make an unlogic condition like 1<> 1 to avoid normal scenarios to go to this sate.

23051iE5CF1B5276905DB6.png

 

3- activate finish rule on your process

23052iE13144589EDCFE0C.png

 

4- then write the following code to check if process didn't close correctly go to to recovery activity 

if (K2.ProcessInstance.DataFieldst"IsClose"].Value.ToString() == "0")

                K2.GotoActivity("TempActivity");

23053iBCBC6C811C701F5C.png

 

23054iDBF7621BEB940231.png

 

 

5- the last action will do that any closing activity add data event to set the mentioned data field IsClose value to "1"

the previous steps will keep your process live even it contains any issues and will detect your process mistakes with out missing your current instances.

Be the first to reply!

Reply