Understanding the GenericAgent priorities

Moderator: crythias

Post Reply
wheelshot
OTRS wizard
Posts: 188
Joined: 15 Dec 2014, 20:49
OTRS Version?: 4.0.24
Location: QC, Canada

Understanding the GenericAgent priorities

Post by wheelshot » 05 Apr 2016, 20:28

Hi,

Lets say I have 5 generic agents (a, b, c, e and f). Each of these are triggered on Ticket::QueueUpdate event with different filters that are mutually excluded.

Will be this executed in alpha order or some other way?

Cause I have a weird problem that happens on our instance. My "b" GenericAgent is suppose to trap a ticket and send it to some other queue but its the "f" GenericAgent that traps it (cause the "f" one is the "all other tickets" job) so Im trying to understand what could cause that weird behaviour.

Thanks for you help!

wheelshot
OTRS wizard
Posts: 188
Joined: 15 Dec 2014, 20:49
OTRS Version?: 4.0.24
Location: QC, Canada

Re: Understanding the GenericAgent priorities

Post by wheelshot » 02 May 2016, 14:57

Bump :) Thanks!

EXG133
OTRS superhero
Posts: 217
Joined: 06 Aug 2012, 18:12
OTRS Version?: 3.1.7 & 4.04

Re: Understanding the GenericAgent priorities

Post by EXG133 » 02 May 2016, 17:55

https://github.com/OTRS/otrs/blob/maste ... icAgent.pm
From line 893

Code: Select all

    
    my %JobList = $Self->JobList();
    my %Data;
    JOB_NAME:
    for my $JobName ( sort keys %JobList ) {
        my %Job = $Self->JobGet( Name => $JobName );
        next JOB_NAME if !$Job{Valid};
        $Data{$JobName} = $Job{EventValues};
    }
If I'm reading the perl correctly it will be sorted on the ascii table values.
So if your jobs are really a, b and c they will be executed in order 'abc'.
If they are a,B and c they will be executed in order 'Bac'.

wheelshot
OTRS wizard
Posts: 188
Joined: 15 Dec 2014, 20:49
OTRS Version?: 4.0.24
Location: QC, Canada

Re: Understanding the GenericAgent priorities

Post by wheelshot » 03 May 2016, 14:47

Thanks for your reply.

Here's the list I have:
STI - SAC - FW A STI
...
STI - SAC - FW SRH
STI - SAC - FW SSAP
STI - SAC - FW SSF
STI - SAC - FW SSP
STI - SAC - FW SVE
STI - SAC - FW Z Expertises

So following the logic, one that should be catch in "STI - SAC - FW A STI" shouldnt get trapped in "STI - SAC - FW Z Expertises". Thing is some cases arent trapped and I cant understand why cause the filters and the criterias are all good.

They are all triggered on the same event (Queue update). Could it be cause of that? I have too many GenericAgents being launched at once for the same event?

Thank again for your help!

wheelshot
OTRS wizard
Posts: 188
Joined: 15 Dec 2014, 20:49
OTRS Version?: 4.0.24
Location: QC, Canada

Re: Understanding the GenericAgent priorities

Post by wheelshot » 23 Aug 2016, 22:30

Bump! Any idea? Thanks :)

reneeb
OTRS guru
Posts: 4703
Joined: 13 Mar 2011, 09:54
OTRS Version?: 3.3.x
Company: Perl-Services.de
Contact:

Re: Understanding the GenericAgent priorities

Post by reneeb » 24 Aug 2016, 07:29

What do the GenericAgents do? Do they move tickets to other queues? That would trigger another QueueUpdate event...
Perl / OTRS development: http://perl-services.de
Free OTRS add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de

wheelshot
OTRS wizard
Posts: 188
Joined: 15 Dec 2014, 20:49
OTRS Version?: 4.0.24
Location: QC, Canada

Re: Understanding the GenericAgent priorities

Post by wheelshot » 29 Aug 2016, 15:50

reneeb wrote:What do the GenericAgents do? Do they move tickets to other queues? That would trigger another QueueUpdate event...
They move the ticket to specific queue depending on the customer departement. So for example:

If ticket queue is X and the customer's department is ABC then move it to queue Y.

At the end of all those generic agents, I got a last one that trap everything else that aint in known departments and move it to a specific queue.

I have read and reread all those generic agents filters and none of them are mutually inclusive so im kind of clueless. Plus its only happening to one of the department amongst all.

Post Reply