Versions Compared

Key

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

Description

This is a simple ActionHandler used to set process variables.

...

Beschreibung

Dies ist ein einfacher ActionHandler, der zum Festlegen von Prozessvariablen verwendet wird.

...

Klasse

Code Block
com.dooris.bpm.actionhandler.ProcessVariableSetter

Parameter

Parameter

Value

name

favorite_offer

value

${offers}

JSON code that was saved in the variable offers with the

Parameter

Default valueStandardwert

DescriptionBeschreibung

Valid examplesGültige Beispiele

nameName

Name of the parameter being set, i.edes zu setzenden Parameters, d.h. "boolaccepted"

timeOfDispatch

value

The value that the variable should assume. Can also be a placeholderWert

Der Wert, den die Variable annehmen soll. Kann auch ein Platzhalter sein: ${year}_${persnr}

${SYS. NOWJETZT,ddTT.MM.yyyy HHJJJJ H:mmMM:ssSS}

${expressversand}

replaceTokensInValue

trueSTIMMT

If the replaceTokensInValue is set to be false, then the content of the given variable will not be resolved at the time of creationWenn replaceTokensInValue auf false gesetzt ist, wird der Inhalt der angegebenen Variablen zum Zeitpunkt der Erstellung nicht aufgelöst!

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 HTTPRestHandler.

see example down below

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

Hier wird der JSON-Pfad für einen bestimmten Teil der zurückgegebenen JSON-Datei eingetragen. (nur einfacher JSON-Pfad ist möglich, z. B. wird kein * akzeptiert)

Kann in Kombination mit HTTPRestHandler.

Siehe Beispiel untenherum

Die vordefinierte Variable ${JETZT}

Mit ${JETZT}kann das aktuelle Datum in eine Variable geschrieben werden. Wenn es nur so wäre, ${SYS. JETZT} aufgerufen wird, wird das Format TT.MM.JJJJ zurückgegeben. Darüber hinaus ist alles, was von Einfaches Datumsformat bestanden werden. Zum Beispiel: ${JETZT,TT.MM.JJJJ HH:MM:SS}

Beispiel

Parameter

Wert

Name

favorite_offer

Wert

${Angebote}

JSON-Code, der in der Variablen gespeichert wurde, bietet mit dem HTTPRestManager
Code Block
languagejs
{
    "services": {
        "spread": 2€,
        "make": 5€,
        "deliver": 10€,
    },
    "products": [
        {
            "name": "Cranberries",
            "color": "red",
        },
        {
            "name": "Mangos",
			"color": "orange",
        },
        {
            "name": "Bananas",
            "color": "yellow",
        },
    ]
}

searchInJson

productsProdukte[1].name

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

...

in der Smartform auf 1 gesetzt ist)

Dies führt dazu, dass die Prozessvariable 'favorite_offer' being set to auf 'Mangos' gesetzt wird



Example:
In the example, we have a part of the process flow for Beispiel:
Im Beispiel haben wir einen Teil des Prozessablaufs für IT-Hardware Request. ProcessVariableSetter actionhandler is added in the ‘forward request for approval' task node. Variable status from the smartform is entered for the parameter name. The new value of the parameter name in the smartform will be the 'forward request for approval’ which was set for the parameter valueDer ProcessVariableSetter-Actionhandler wird im Aufgabenknoten "Anforderung zur Genehmigung weiterleiten" hinzugefügt. Variable Status aus dem SmartForm wird für den Parameter Name. Der neue Wert des Parameters Name In der SmartForm befindet sich die 'Anfrage zur Genehmigung weiterleiten', die für den Parameter Wert.

...


Parameter

ValueWert

nameName

statusStatus

value

forward request for approvalWert

Antrag auf Genehmigung weiterleiten