
##############
ActivityDialog
##############


****
NAME
****


Kernel::System::ProcessManagement::DB::ActivityDialog


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


Process Management DB ActivityDialog backend


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


new()
=====


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


.. code-block:: perl

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



ActivityDialogAdd()
===================


add new ActivityDialog

returns the id of the created activity dialog if success or undef otherwise


.. code-block:: perl

     my $ID = $ActivityDialogObject->ActivityDialogAdd(
         EntityID    => 'AD1',                                           # mandatory, exportable unique identifier
         Name        => 'NameOfActivityDialog',                          # mandatory
         Config      => {                                                # mandatory, activity dialog 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
     );


Returns:


.. code-block:: perl

     $ID = 567;



ActivityDialogDelete()
======================


delete an ActivityDialog

returns 1 if success or undef otherwise


.. code-block:: perl

     my $Success = $ActivityDialogObject->ActivityDialogDelete(
         ID      => 123,
         UserID  => 123,
     );



ActivityDialogGet()
===================


get Activity Dialog attributes


.. code-block:: perl

     my $ActivityDialog = $ActivityDialogObject->ActivityDialogGet(
         ID            => 123,            # ID or EntityID is needed
         EntityID      => 'P1',
         UserID        => 123,            # mandatory
     );


Returns:


.. code-block:: perl

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



ActivityDialogUpdate()
======================


update ActivityDialog attributes

returns 1 if success or undef otherwise


.. code-block:: perl

     my $Success = $ActivityDialogObject->ActivityDialogUpdate(
         ID          => 123,                                             # mandatory
         EntityID    => 'AD1',                                           # mandatory, exportable unique identifier
         Name        => 'NameOfActivityDialog',                          # mandatory
         Config   => {                                                   # mandatory, activity dialog 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
     );



ActivityDialogList()
====================


get an ActivityDialog list


.. code-block:: perl

     my $List = $ActivityDialogObject->ActivityDialogList(
         UseEntities => 0,                       # default 0, 1 || 0. if 0 the return hash keys are
                                                 #    the activity dialog IDs otherwise keys are the
                                                 #    activity dialog entity IDs
         UserID      => 1,
     );
 
     Returns:
 
     $List = {
         1 => 'NameOfActivityDialog',
     }
 
     or
 
     $List = {
         'AD1' => 'NameOfActivityDialog',
     }



ActivityDialogListGet()
=======================


get an Activity Dialog list with all activity dialog details


.. code-block:: perl

     my $List = $ActivityDialogObject->ActivityDialogListGet(
         UserID      => 1,
     );


Returns:


.. code-block:: perl

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





