Kernel::System::ProcessManagement::DB::Transition
Process Management DB Transition backend
Don't use the constructor directly, use the ObjectManager instead:
my $TransitionObject = $Kernel::OM->Get('Kernel::System::ProcessManagement::DB::Transition');
add new Trnsition
returns the id of the created Transition if success or undef otherwise
my $ID = $TransitionObject->TransitionAdd( EntityID => 'T1' # mandatory, exportable unique identifier Name => 'NameOfTransition', # mandatory Config => $ConfigHashRef, # mandatory, transition configuration to be stored in # YAML format UserID => 123, # mandatory );
Returns:
$ID = 567;
delete an Transition
returns 1 if success or undef otherwise
my $Success = $TransitionObject->TransitionDelete( ID => 123, UserID => 123, );
get Transition attributes
my $Transition = $TransitionObject->TransitionGet( ID => 123, # ID or EntityID is needed EntityID => 'T1', UserID => 123, # mandatory );
Returns:
$Transition = { ID => 123, EntityID => 'T1', Name => 'some name', Config => $ConfigHashRef, CreateTime => '2012-07-04 15:08:00', ChangeTime => '2012-07-04 15:08:00', };
update Transition attributes
returns 1 if success or undef otherwise
my $Success = $TransitionObject->TransitionUpdate( ID => 123, # mandatory EntityID => 'T1' # mandatory, exportable unique identifier Name => 'NameOfTransition', # mandatory Config => $ConfigHashRef, # mandatory, transition configuration to be stored in # YAML format UserID => 123, # mandatory );
get an Transition list
my $List = $TransitionObject->TransitionList( UseEntities => 0, # default 0, 1 || 0. if 0 the return hash keys are # the transition IDs otherwise keys are the # transition entity IDs UserID => 1, ); Returns: $List = { 1 => 'NameOfTransition', } or $List = { 'T1' => 'NameOfTransition', }
get a Transition list with all Transition details
my $List = $TransitionObject->TransitionListGet( UserID => 1, );
Returns:
$List = [ { ID => 123, EntityID => 'T1', Name => 'some name', Config => $ConfigHashRef, CreateTime => '2012-07-04 15:08:00', ChangeTime => '2012-07-04 15:08:00', } { ID => 456, EntityID => 'T2', Name => 'some name', Config => $ConfigHashRef, CreateTime => '2012-07-04 15:09:00', ChangeTime => '2012-07-04 15:09:00', } ];
This software is part of the OTRS project (https://otrs.org/).
This software comes with ABSOLUTELY NO WARRANTY. For details, see the enclosed file COPYING for license information (GPL). If you did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.