Will a variable retain its value for the entire execution of Process instance if its scope is set to "Instance"? Does this hold good even if the Process instance is stuck for a long time, or waiting on an Action Item, or if the session expires?
Resolution
Any scoped variable is stored into BPM_CUSTOM_SCRIPT_PROPS table. That is how the system keeps consistent track of scope of that variable, so it does not expire.
INSTANCE variables are only stored for the lifetime of the process instance. Once the process completes the INSTANCE variables stored for the particular process instance are removed.
GLOBAL variables are however always stored in this table once they get set.