> For the complete documentation index, see [llms.txt](https://bpmflow.gitbook.io/project/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bpmflow.gitbook.io/project/application-manuals/backoffice-manual/main-menu/processes/define-new-process/gateways-conditions.md).

# Gateways Conditions

In this section gateways evaluation conditions will be described in detail.

When a Split Gateway is in a Process path the BPM Execution Engine will evaluate all possibilities. And it will follow a sub set of all possible path (the sub set depends on the gateway type and the condition).

The conditions are defined inside [Bizagi Modeler](http://www.bizagi.com/en/products/bpm-suite/modeler) ®.

![](/files/-LHA9D9WXxOAFUy3fVB8)

The condition **must be** defined as a Block of only one argument. This argument (process)is the BPM Process Instance itself. In the example above one of the conditions is:

```
[:process | process checkResult = 'rejected']
```

Block: \[:process (argumentName) | (pipe) condition]\
\
&#x20;Where:

* process - represent the process instance.
* checkResult - is the name of a process's variable (a field of any forms of the process or a defined variable).
* 'rejected' - is the value to be used in the comparison.

In this case the variable \[checkResult] is a String.

&#x20;Basic Comparators:\
&#x20;"=" - equal\
&#x20;"!=" - not equal\
&#x20;">="- greater than\
&#x20;"<" - less than\
&#x20;">="- greater than or equal\
&#x20;"<=" - less than or equal

Example with all variable types:\
&#x20;**Number**

```
[:process | process documentId = 123456]
```

**Boolean**\
&#x20;In this case the field is defined as Boolean.

```
[:process | process checkPassed]
```

It is also possible to be defined as:

```
[:process | process checkPassed = true]
```

**String**

```
[:process | process checkPassed = 'passed']
```

**Date**

```
[:process | process sunsetDate = (Date fromString: '10/10/2016')]
```

**Time**

```
[:process | process sunsetTime = (Time fromString: '2:50:11 pm')]
```

**TimeStamp**

```
[:process | process sunsetDate = (TimeStamp fromString: '10/10/2016 2:15:36 pm')]
```

The conditions can be combined:

```
[:process | process sunsetDate = (TimeStamp fromString: '10/10/2016 2:15:36 pm') and:[process checkPassed = 'passed']]
```

```
[:process | process sunsetDate = (TimeStamp fromString: '10/10/2016 2:15:36 pm') or:[process checkPassed ~= 'rejected']]
```

The conditions can compare two Process variables:

```
[:process | process sunsetDate >= process extendedDate]
```

### Recomendations <a href="#recomendations" id="recomendations"></a>

The name of the variable should **NOT** have "-" **Hyphen character**.\
&#x20;If it is so then the evaluation condition **must** be defined as follow:

```
[:process | (process perform: 'string-hyphen-variable') = 'passed']
```

The perform sentence (perform:) must be used with the variable name enclosed with single quotes ('string-hyphen-variable').

**Hyphen Minus** "\_" is accepted as it is:

```
[:process | process hyphen_minus_variable = 123456]
```

### Using 'name' as a field name in a condition <a href="#using-name-as-a-field-name-in-a-condition" id="using-name-as-a-field-name-in-a-condition"></a>

If a form has a field named 'name' and is used in a gateway condition then the codition must be defined as:

```
[:proc | (proc getValueOf: 'name') = 'some name']
```

**This rule is mandatory.**

List of names in the same situation:\
&#x20;andContextApplications\
applicationName\
assignedUserNames\
createdTime\
creator\
creatorEvent\
creatorName\
creatorTask\
currentActivities\
definition\
endEvents\
executedActivities\
executedGateways\
executedScripts\
generateProcessMap\
getActiveArtifacts\
getApplication\
getApplicationName\
getContextApplications\
getDefinitionName\
getExecutedArtifacts\
getFinishedProcessMatrix\
getProcessesTreeAsCollection\
getProcessMatrix\
getRunningArtifacts\
getTopProcess\
hasAndContext\
hasContextApplications\
hasFinalized\
hasOrContext\
hasSubprocesses\
id\
inheritContextApplications\
initialize\
isInCorruptedState\
isSubProcess\
isTopProcess\
orContextApplications\
parentProcess\
postExecution\
printAndContext\
printCurrentRols\
printOrContext\
printParentName\
printProcessState\
printRunningArtifacts\
processId\
processName\
runningGateways\
startEvent\
startEventIsAnonymous\
subprocesses\
transitions\
triggerStartEvent\
userAssignments\
version


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bpmflow.gitbook.io/project/application-manuals/backoffice-manual/main-menu/processes/define-new-process/gateways-conditions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
