<<

NAME

var::processes::examples::Base - base class for ready to process examples

DESCRIPTION

This is a base class for example processes and should not be instantiated directly.

All _pre.pm and _post.pm files can use helper methods defined in this class.

    package var::processes::examples::MyProcessExample;
    use strict;
    use warnings;

    use parent qw(var::processes::examples::Base);

    # methods go here

PUBLIC INTERFACE

DynamicFieldsAdd()

Creates dynamic fields according to provided configurations.

    my %Result = $ProcessExampleObject->DynamicFieldsAdd(
        DynamicFieldList => [                                # (required) List of dynamic field configuration
            {
                Name       => 'PreProcApplicationRecorded',
                Label      => 'Application Recorded',
                FieldType  => 'Dropdown',
                ObjectType => 'Ticket',
                FieldOrder => 10000,
                Config     => {
                    DefaultValue   => '',
                    PossibleNone   => 1,
                    PossibleValues => {
                        'no'  => 'no',
                        'yes' => 'yes',
                    },
                    TranslatableValues => 0,
                },
            },
            ...
        ],
    );

Result: %Result = ( Success => 1, Error => undef, );

SystemConfigurationUpdate()

Updates system configuration according with the provided data.

    my $Success = $ProcessExampleObject->SystemConfigurationUpdate(
        ProcessName => 'Some Process',
        Data => [
            {
                'Ticket::Frontend::AgentTicketZoom' => {
                    'ProcessWidgetDynamicFieldGroups' => {
                        'Some Group' => 'SomeField1, SomeField2,',
                        # ...
                    },
                    'ProcessWidgetDynamicField' => {
                    'SomeField1' => '1',
                    'SomeFeld2'  => '1',
                    # ...
                },
            },
        ],
    );

TERMS AND CONDITIONS

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.

<<