I have created a module to send that information based on Test.pm (Do not change the name to avoid complications).
When making an event that triggers the sending of data, the console throws the following error.
If I comment the "use strict" the error disappears but when I go to the Invoker debugger, it does not send data or an exit response.
That could be happening?.
My Invoker code it is:
Code: Select all
package Kernel::GenericInterface::Invoker::Test::Test;
#use strict;
use warnings;
use Kernel::System::Ticket;
use Kernel::System::VariableCheck qw(IsString IsStringWithData);
our $ObjectManagerDisabled = 1;
sub new {
my ( $Type, %Param ) = @_;
# allocate new hash for object
my $Self = {};
bless( $Self, $Type );
# check needed params
if ( !$Param{DebuggerObject} ) {
return {
Success => 0,
ErrorMessage => "Got no DebuggerObject!"
};
}
#$Self->{DebuggerObject} = $Param{DebuggerObject};
$Self->{TicketObject} = Kernel::System::Ticket->new( %Param );
return $Self;
}
sub PrepareRequest {
my ( $Self, %Param ) = @_;
my %Ticket = $TicketObject->TicketGet( TicketID => $Param{Data}->{TicketID} );
return {
Success => 1,
Data => {
%Ticket
}
};
}
sub HandleResponse {
my ( $Self, %Param ) = @_;
# if there was an error in the response, forward it
if ( !$Param{ResponseSuccess} ) {
return {
Success => 0,
ErrorMessage => $Param{ResponseErrorMessage},
};
}
return {
Success => 1,
Data => $Param{Data},
};
}
1;
Thanks!