Kernel::System::ProcessManagement::DB::StartEvent

NAME

Kernel::System::ProcessManagement::DB::StartEvent

DESCRIPTION

Process Management DB StartEvent backend

PUBLIC INTERFACE

new()

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

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

StartEventAdd()

add new StartEvent

returns the id of the created start event if success or undef otherwise

    my $ID = $StartEventObject->StartEventAdd(
        EntityID    => 'A1'              # mandatory, exportable unique identifier
        Name        => 'NameOfStartEvent', # mandatory
        Type        => 'TimerStartEvent',       # mandatory
        Config      => $ConfigHashRef,   # mandatory, start event configuration to be stored in YAML
                                         #   format
        UserID      => 123,              # mandatory
    );

Returns:

    $ID = 567;

StartEventDelete()

delete an StartEvent

returns 1 if success or undef otherwise

    my $Success = $StartEventObject->StartEventDelete(
        ID      => 123,
        UserID  => 123,
    );

StartEventGet()

get StartEvent attributes

    my $StartEvent = $StartEventObject->StartEventGet(
        ID            => 123,      # ID or EntityID is needed
        EntityID      => 'A1',
        UserID        => 123,      # mandatory
    );

Returns:

    $StartEvent = {
        ID             => 123,
        EntityID       => 'A1',
        Name           => 'some name',
        Type           => 'some type'
        Config         => $ConfigHashRef,
        CreateTime     => '2012-07-04 15:08:00',
        ChangeTime     => '2012-07-04 15:08:00',
    };

StartEventUpdate()

update StartEvent attributes

returns 1 if success or undef otherwise

    my $Success = $StartEventObject->StartEventUpdate(
        ID          => 123,             # mandatory
        EntityID    => 'A1'             # mandatory, exportable unique identifier
        Name        => 'NameOfProcess', # mandatory
        Type        => 'TimerStartEvent',      # mandatory
        Config      => $ConfigHashRef,  # mandatory, process configuration to be stored in YAML
                                        #   format
        UserID      => 123,             # mandatory
    );

StartEventList()

get an StartEvent list

    my $List = $StartEventObject->StartEventList(
        UseEntities => 0,                       # default 0, 1 || 0. if 0 the return hash keys are
                                                #    the StartEvent IDs otherwise keys are the
                                                #    StartEvent entity IDs
        UserID      => 1,
    );

    Returns:

    $List = {
        1 => 'StartEvent1',
    }

    or

    $List = {
        'A1' => 'StartEvent1',
    }

StartEventListGet()

get an StartEvent list with all start event details

    my $List = $StartEventObject->StartEventListGet(
        UserID      => 1,
    );

Returns:

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

StartEventSearch()

search start events by process name

    my $StartEventEntityIDs = $StartEventObject->StartEventSearch(
        StartEventName => 'SomeText',       # e. g. "SomeText*", "Some*ext" or ['*SomeTest1*', '*SomeTest2*']
    );

    Returns:

    $StartEventEntityIDs = [ 'StartEvent-e11e2e9aa83344a235279d4f6babc6ec', 'StartEvent-f8194a25ab0ccddefeb4240c281c1f56' ];
Scroll to Top