ProcessVariableSetter

Description

This is a simple ActionHandler used to set process variables.


Class

com.dooris.bpm.actionhandler.ProcessVariableSetter

Parameter

Parameter

Default value

Description

Valid examples

Parameter

Default value

Description

Valid examples

name

 

Name of the parameter being set, i.e. "boolaccepted"

timeOfDispatch

value

 

The value that the variable should assume. Can also be a placeholder: ${year}_${persnr}

${SYS.NOW,dd.MM.yyyy HH:mm:ss}

${expressversand}

replaceTokensInValue

true

If the replaceTokensInValue is set to be false, then the content of the given variable will not be resolved at the time of creation!

 

searchInJson

null

Here the JSON path for a specific part of the returned JSON file is entered. (only basic JSON path is possible, no * is accepted for example)

Can be used in combination with https://tim-doc.atlassian.net/wiki/spaces/eng/pages/228298644.

see example down below

dateTimeAutoFormattingAndConversion

false

If this parameter is set to true, timestamps will automatically be converted to the server’s output timezone (defined in tim.properties)

true

The pre-defined variable ${NOW}

 

With ${NOW}, the current date can be written to a variable. If only ${SYS.NOW} is called, the format DD.MM.YYYY is returned. In addition, everything supported by Simple Date Format can be passed. For example: ${NOW,dd.MM.yyyy HH:mm:ss}

 

 

Example

Parameter

Value

Parameter

Value

name

favorite_offer

value

${offers}

JSON code that was saved in the variable offers with the HTTPRestManager
{ "services": { "spread": 2€, "make": 5€, "deliver": 10€, }, "products": [ { "name": "Cranberries", "color": "red", }, { "name": "Mangos", "color": "orange", }, { "name": "Bananas", "color": "yellow", }, ] }

searchInJson

products[1].name

product[${number}].name (if the variable 'number' is set to 1 in the form)

This results in the process variable 'favorite_offer' being set to 'Mangos'



Example:
In the example, we have a part of the process flow for IT-Hardware Request. ProcessVariableSetter actionhandler is added in the ‘forward request for approval' task node. Variable status from the form is entered for the parameter name. The new value of the parameter name in the form will be the 'forward request for approval’ which was set for the parameter value.



Parameter

Value

Parameter

Value

name

status

value

forward request for approval