Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The value of a persistent variable must be compatible with drany. For further information, see 9.6163.5.23 APL and Ultra Field Types for Python.

Note
titleNote!

A persistent variable is not the same as a normal Python global variable. A normal global variable is not persisted between executions of a workflow. Do not rely on normal global variables for any state necessary to finalize a transaction.

...

Info
titleExample - Persistent variables for Python processing agent


Code Block
counter = persistent(0) # Defines a persistent variable with default value 0

def endBatch():
    debug('endBatch')
    counter.value += 1
    # The persistent variable is persisted after this function block has been executed

def commit():
    debug('commit')
    # The persistent variable is available in commit during both normal and recovery commits
    debug(counter)



Scroll ignore
scroll-viewportfalse
scroll-pdftrue
scroll-officefalse
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmlfalse


Next: