Process management -> IF NOT condition

Moderator: crythias

Post Reply
Raksha
Znuny newbie
Posts: 6
Joined: 01 Jun 2017, 09:30
Znuny Version: 5.0.19
Real Name: Haix
Company: SUBA

Process management -> IF NOT condition

Post by Raksha »

Hello OTRS Community,

at the moment i am building a workflow for a process in our company.
My question is now, if i am creating a Transition there are 3 different types of conditions. Is there any way to get a condition like "If not"? Are there any placeholder symbols i can use or is this not possible?

Thanks for your help and greetings
Raksha
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Process management -> IF NOT condition

Post by RStraub »

You could try to use a negative-lookahead regexp:

Code: Select all

^((?!.*(word1|word2)).*)$

which matches if neither word1 and word2 is used.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
nedmaj
Znuny expert
Posts: 167
Joined: 26 Nov 2014, 20:34
Znuny Version: 6.3.4
Real Name: Samuel Casimiro
Company: Câmara dos Deputados
Contact:

Re: Process management -> IF NOT condition

Post by nedmaj »

Or maybe:

Code: Select all

^(?!word1|word2).*$
Samuel

Znuny 6.3.4 | OTRS 5.0.17
OS: Debian 11 | CentOS 6.5
Database: Postgres | Oracle 12.1
Number of agents: 450 | Number of customers: 20000 | Number of CIs: 30000
Raksha
Znuny newbie
Posts: 6
Joined: 01 Jun 2017, 09:30
Znuny Version: 5.0.19
Real Name: Haix
Company: SUBA

Re: Process management -> IF NOT condition

Post by Raksha »

Hello guys,

thank you for your time and help.
Is this the Syntax if you programm it with Pearl ? Or can i use it like this also in my GUI.
I got no clue about Pearl... if it is working like this i have to ask my superior for some assistance ... :lol: .
I am modelling my process on the admin GUI in the process Management view.

Thanks for you help and i wish you a nice weekend.
Greeting Raksha
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Process management -> IF NOT condition

Post by RStraub »

In the transition you can select how you want to verfiy:
- String
- ValidationModule
- Regular Expression

It *should* suffice if you select "regular expression" and enter either of the strings provided to you.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Raksha
Znuny newbie
Posts: 6
Joined: 01 Jun 2017, 09:30
Znuny Version: 5.0.19
Real Name: Haix
Company: SUBA

Re: Process management -> IF NOT condition

Post by Raksha »

It worked with the Regular Expression and a regexp.
Thanks alot!!!!!

Greetings Raksha
vamador
Znuny newbie
Posts: 1
Joined: 01 Apr 2020, 19:52
Znuny Version: 6.0.17
Real Name: Veónica

Re: Process management -> IF NOT condition

Post by vamador »

Raksha wrote: 02 Jun 2017, 11:16 It worked with the Regular Expression and a regexp.
Thanks alot!!!!!

Greetings Raksha
Hi... can you help me? I have the same issue but I dont know how to do the right regex... Can you tell me which did you use? thanks a lot :)
Post Reply