Section "Runtime"

Settings for all workflow types

MaxExecutionTime

    <entry key="MaxExecutionTime" type="System.Int32" default="600"></entry>

Specifies how long a workflow should be executed. When the time has expired, the workflow asked to stop.

This setting can be overwritten for each workflow or workflow step.

If a workflow step has a larger setting than the workflow itself, the workflow is not terminated during the workflow step execution.

defaultScriptRunTimeout

    <entry key="defaultScriptRunTimeout" type="System.Int32" default="600" comment="in seconds"></entry>

Workflow scripts are executed inside PowerShell. As in every programming language it is possible in PowerShell to create loops. It is not possible for kenaflow to check the "code quality" of a workflow script. If you (accidentally) create an endless loop kenaflow would not be able to stop the script. Therefore it has an security feature that forces scripts to stop if they run too long.

This setting can be overwritten by each workflow.

In the script it is possible to manipulate the runtime:

MaxRuntimeOfChildProcess

    <entry key="MaxRuntimeOfChildProcess" type="System.Int32" default="86400" comment="Time in Sec. before a child process is getting restarted - for security reasons."></entry>

Processes such as "remote event runner" or "global remote event receiver" are stated by the main process of kenaflow that controls the multi process execution of the kenaflow instance.

For stability reasons it's recommanded to restart such "long running" child processes after a certain amount of time.

With this setting you can control the maximum runtime, before the child process shuts itself down. With the setting VariationOfMaxRuntimeOfChildProcess you can vary this maximum execution time so that not every child process shuts itself down at the same moment = amout of time.

VariationOfMaxRuntimeOfChildProcess

    <entry key="VariationOfMaxRuntimeOfChildProcess" type="System.Int32" default="14400" comment="Time in Sec. before a child process is getting restarted - for security reasons."></entry>

Please read the description of setting MaxRuntimeOfChildProcess.

poshQueueSize

	<entry key="poshQueueSize" type="System.Int32" default="5"></entry>

Available since kenaflow 4.0.12.

Remote events are executed in special kenaflow processes that are always running in background, waiting for incoming remote events.

These "remote runner" processes hold prepared PowerShell runtimes for remote event execution.

With this setting you can specify the amount of prepared runtimes.

When starting the remote event execution such a prepared runtime gets initialized with the workflow the remote event belongs to.

If a prepared runtime is used a new one is prepared and added to the queue of prepared runtimes.

After the execution of a remote event the PowerShell runtime session is destroyed.

culture

    <entry key="culture" type="System.Int32" default="1033" comment="This culture overwrites the users culture. Set to -1 to disable."></entry>

This can be used to set the culture of kenaflow scripts. It is used in automatic mode and in debug mode.

The list of LCIDs can be found here:

If set to -1 this feature is disabled. The users culture is used.

This solves a problem that this command could fail, e.g. if debug user has "German" locale and the execution account has "English": [DateTime]::Parse('12/31/2019')

ItemReCheckTime

    <entry key="ItemReCheckTime" type="System.Int32" default="60"></entry>

SharePoint is constantly in use through users and processes such as workflows. List items change. kenaflow uses queries to determine the list items to be processed.

If the query has taken place, it is not executed again until all determined list items have been processed. If the elements change in between, they still appear in the query result that was fetched before.

With the setting "ItemReCheckTime" you can set the point in time, starting at the time of first querying items, from which each list item is to be checked again to determine whether processing is still necessary.

This setting can be overwritten for each workflow or workflow step.

ItemBatchCount

    <entry key="ItemBatchCount" type="System.Int32" default="1000"></entry>

List items for processing are fetched from SharePoint using queries. They are gathered in batches of the size, specified in this setting.

CAUTION: This setting must not collide with the ListitemThreshold set in SharePoint. This number must be smaller. The default setting of SharePoint is 5000, which should not be exceeded. 1000 is optimal.

The setting "ItemReCheckTime" should also be observed. This setting can be overwritten for each workflow or workflow step.

UserProfileCacheLifetime

    <entry key="UserProfileCacheLifetime" type="System.Int32" default="60" comment="in seconds"></entry>

To get informations about users from the User Profile Service Application of SharePoint, you can use the cmdlet Get-KFUserInfo.

This information is cached in the currently running kenaflow process that executes the current workflow.

The informations in the User Profile change from time to time but nomally not in seconds after you query them. Therefore kenaflow uses a caching to reduce the communication overhead to SharePoint.

You can reduce the default cache lifetime for user informations here.

This can be overwritten in each workflow.

Full Section Default

  <section name="runtime">
    <entry key="ItemReCheckTime" type="System.Int32" default="60"></entry>
    <entry key="ItemBatchCount" type="System.Int32" default="1000"></entry>
    <entry key="MaxRuntimeOfChildProcess" type="System.Int32" default="86400" comment="Time in Sec. before a child process is getting restarted - for security reasons."></entry>
    <entry key="VariationOfMaxRuntimeOfChildProcess" type="System.Int32" default="14400" comment="Time in Sec. before a child process is getting restarted - for security reasons."></entry>
    <entry key="MaxExecutionTime" type="System.Int32" default="600"></entry>
    <entry key="UserProfileCacheLifetime" type="System.Int32" default="60" comment="in seconds"></entry>
    <entry key="defaultScriptRunTimeout" type="System.Int32" default="600" comment="in seconds"></entry>
    <entry key="culture" type="System.Int32" default="1033" comment="This culture overwrites the users culture. Set to -1 to disable."></entry>
	<entry key="poshQueueSize" type="System.Int32" default="5"></entry>
  </section>

Discussion