The kenaflow Field

kenaflow for SharePoint processes list items with list and state machine workflows. Only to this workflow types belongs this article.

General Information

The kenaflow field stores data for helping kenaflow to process the right list items. Mainly it contains the date and time of the last workflow run.

Because multiple workflows can operate on the same list it is necessary to store this workflow specific data with the workflow ID as a key.

Multiple kenaflow instances or servers could operate on the same SharePoint list. This is not recommanded because in this way it is more complicated to lock list items during processing. (All kenaflow instances should use the same "lock folder" than.) - To be able to read and write the kenaflow field from different kenaflow instances this field is not encrypted. But it does not contain sensitive data!

What is it for?

The kenaflow field in the first place supports the execution of so called "last modified" workflows.

"LAST MODIFIED" workflows or workflow states only operate on items that where modified since the last run of the workflow.

BUT kenaflow tries to keep the information about the last editor and the last modification time so that the work of the engine is as transparent as possible for the users. After completion of the work, the fields "Editor" and "Modified" are set to the values before processing by kenaflow. However, this makes it difficult to execute the "LAST MODIFIED" workflow types: During the first run - with modified item - the item is changed by the workflow (or not, depending on the workflow script and intention of the workflow developer) and finally the date of the last modification is set back to the value before processing. At the second run of the engine this item is found again, because the "Modified" date is set to the same value as at the first run.

To solve this problem we have introduced the "kenaflow field". It is a hidden field that is added to every SharEPoint list and library where kenaflow works.

From a technical perspective this field is defined as follows:

<Field 
  Type='Note' 
  ID='06253ACC-EB61-47B6-9D8E-521550E29F5F' 
  Hidden='TRUE' 
  UnlimitedLengthInDocumentLibrary='TRUE' 
  DisplayName='kenaflow' 
  StaticName='kenaflow' 
  Name='kenaflow'/>

It gets added to "all content types" of the list or library!

Change Hash

Since kenaflow version 4.0 the kenaflow field does contain the change hashes for SharePoint list items when you use the property ItemChangeHashFields in the workflow. This means that the workflow does only process list items with changes in the specified field(s). After processing the item the change hash is calculated based on the current item field values. If they are not changed before the next workflow run the item will not be processed.