OTRS as Requester Webservice

English! place to talk about development, programming and coding
Post Reply
andys
Znuny newbie
Posts: 7
Joined: 18 Aug 2014, 22:48
Znuny Version: 3.2.6

OTRS as Requester Webservice

Post by andys »

I need a remote webservice call to be triggered when a ticket is submitted as "closed".
I followed the documentation to set up the GenericInterface Web Service Management and added my webservice info, however, there is no invoker in the "Add Invoker" drop select list.
I believe I need to hand code and create one but I am new to Perl and don't know what a basic invoker should look like. I found a test invoker here: https://raw.githubusercontent.com/h4ck3 ... st/Test.pm so I created a new file with the same name and imported it in the sysConfig but it doesn't look like it worked. I look at the "GenericInterface" list and I don't see it in there. Nor do I see it in the "Add Invoker" drop select in the webservice. What are the exact steps I need to tale to make this work? Does anyone have any working sample code that I can just drop in and make it work? I can modify it later after I see that the webservice is actually working.
Thanks!
eandrex
Znuny expert
Posts: 213
Joined: 04 Nov 2012, 23:58
Znuny Version: OTRS 4.x
Real Name: Esteban
Company: NORTON DE COLOMBIA

Re: OTRS as Requester Webservice

Post by eandrex »

Hi, take a look at this: viewtopic.php?f=60&t=10090

basically, what you have to do, is create an event (TicketStateUpdate) check if the SateType is set to "closed" and if it is, call your webservice.
eandrex
Znuny expert
Posts: 213
Joined: 04 Nov 2012, 23:58
Znuny Version: OTRS 4.x
Real Name: Esteban
Company: NORTON DE COLOMBIA

Re: OTRS as Requester Webservice

Post by eandrex »

andys wrote: I look at the "GenericInterface" list and I don't see it in there. Nor do I see it in the "Add Invoker" drop select in the webservice. What are the exact steps I need to tale to make this work?
To answer this, it is because OTRS is not yet aware of your module, to do so, you would have to add this to your Config.pm

Code: Select all

$Self->{"GenericInterface::Invoker::Module"}->{"MyTestInvoker"} = {
		"ConfigDialog" => "AdminGenericInterfaceInvokerDefault",
		"Controller" => "Test",
		"Name" => "Test"
	};
in fact, if i am not wrong, if you go to your Sysconfig -> GenericInterface -> GenericInterface::Invoker::ModuleRegistration, there are already two controllers, just enable the test one and you are done
Post Reply