
################
TransitionAction
################


****
NAME
****


Kernel::System::ProcessManagement::DB::TransitionAction


***********
DESCRIPTION
***********


Process Management DB TransitionAction backend


****************
PUBLIC INTERFACE
****************


new()
=====


Don't use the constructor directly, use the ObjectManager instead:


.. code-block:: perl

     my $TransitionActionObject = $Kernel::OM->Get('Kernel::System::ProcessManagement::DB::TransitionAction');



TransitionActionAdd()
=====================


add new TransitionAction

returns the id of the created TransitionAction if success or undef otherwise


.. code-block:: perl

     my $ID = $TransitionActionObject->TransitionActionAdd(
         EntityID => 'TA1',                                              # mandatory, exportable unique identifier
         Name     => 'NameOfTransitionAction',                           # mandatory
         Config   => {                                                   # mandatory, transition action configuration to be stored in YAML format
             Scope         => 'Global',                                  # mandatory, default 'Global' (Process|Global)
             ScopeEntityID => 'Process-9690ae9ae455d8614d570149b8ab1199' # ScopeEntityID, used if specific scope is set e.g. 'Process'
         },
 
         ParentID => 123                                                 # parent process id, used if scope is 'Process'
     );


Returns:


.. code-block:: perl

     $ID = 567;



TransitionActionDelete()
========================


delete an TransitionAction

returns 1 if success or undef otherwise


.. code-block:: perl

     my $Success = $TransitionActionObject->TransitionActionDelete(
         ID      => 123,
         UserID  => 123,
     );



TransitionActionGet()
=====================


get TransitionAction attributes


.. code-block:: perl

     my $TransitionAction = $TransitionActionObject->TransitionActionGet(
         ID            => 123,            # ID or EntityID is needed
         EntityID      => 'P1',
         UserID        => 123,            # mandatory
     );


Returns:


.. code-block:: perl

     $TransitionAction = {
         ID           => 123,
         EntityID     => 'TA1',
         Name         => 'some name',
         Config         => {
             Scope         => 'Process',
             ScopeEntityID => 'Process-9690ae9ae455d8614d570149b8ab1199',
         },
         CreateTime   => '2012-07-04 15:08:00',
         ChangeTime   => '2012-07-04 15:08:00',
     };



TransitionActionUpdate()
========================


update TransitionAction attributes

returns 1 if success or undef otherwise


.. code-block:: perl

     my $Success = $TransitionActionObject->TransitionActionUpdate(
         ID       => 123,                                                 # mandatory
         EntityID => 'TA1',                                               # mandatory, exportable unique identifier
         Name     => 'NameOfTransitionAction',                            # mandatory
         Config   => {                                                    # mandatory, transition action configuration to be stored in YAML format
             Scope         => 'Global',                                   # mandatory, default 'Global' (Process|Global)
             ScopeEntityID => 'Process-9690ae9ae455d8614d570149b8ab1199', # ScopeEntityID, used if specific scope is set e.g. 'Process'
         }
         UserID   => 123,                                                 # mandatory
     );



TransitionActionList()
======================


get an TransitionAction list


.. code-block:: perl

     my $List = $TransitionActionObject->TransitionActionList(
         UseEntities => 0,                       # default 0, 1 || 0. if 0 the return hash keys are
                                                 #    the transition action IDs otherwise keys are
                                                 #    the transition action entity IDs
         UserID      => 1,
     );
 
     Returns:
 
     $List = {
         1 => 'NameOfTransitionAction',
     }
 
     or
 
     $List = {
         'AD1' => 'NameOfTransitionAction',
     }



TransitionActionListGet()
=========================


get an Transition Action list with all Transition Action details


.. code-block:: perl

     my $List = $TransitionActionObject->TransitionActionListGet(
         UserID      => 1,
     );


Returns:


.. code-block:: perl

     $List = [
         {
             ID             => 123,
             EntityID       => 'TA1',
             Name           => 'some name',
             Config         => $ConfigHashRef,
             CreateTime     => '2012-07-04 15:08:00',
             ChangeTime     => '2012-07-04 15:08:00',
         }
         {
             ID             => 456,
             EntityID       => 'TA2',
             Name           => 'some name',
             Config         => $ConfigHashRef,
             CreateTime     => '2012-07-04 15:09:00',
             ChangeTime     => '2012-07-04 15:09:00',
         }
     ];





