How to make sure that your process closed correctly?

  • 12 May 2022
  • 0 replies

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


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



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.



3- activate finish rule on your process



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

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







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.

0 replies

Be the first to reply!