Process#
NAME#
Kernel::System::ProcessManagement::Process - process lib
DESCRIPTION#
All ProcessManagement Process functions.
PUBLIC INTERFACE#
new()#
Don’t use the constructor directly, use the ObjectManager instead:
my $ProcessObject = $Kernel::OM->Get('Kernel::System::ProcessManagement::Process');
ProcessGet()#
Get process info
my $Process = $ProcessObject->ProcessGet(
ProcessEntityID => 'P1',
);
Returns:
$Process = {
'Name' => 'Process1',
'CreateBy' => '1',
'CreateTime' => '16-02-2012 13:37:00',
'ChangeBy' => '1',
'ChangeTime' => '17-02-2012 13:37:00',
'State' => 'Active',
'StartActivityDialog' => 'AD1',
'StartActivity' => 'A1',
'Path' => {
'A2' => {
'T3' => {
ActivityEntityID => 'A4',
},
},
'A1' => {
'T1' => {
ActivityEntityID => 'A2',
},
'T2' => {
ActivityEntityID => 'A3',
},
},
},
};
ProcessList()#
Get a list of all Processes
my $ProcessList = $ProcessObject->ProcessList(
ProcessState => ['Active'], # Active, FadeAway, Inactive
Interface => ['AgentInterface'], # optional, ['AgentInterface'] or ['CustomerInterface'] or ['AgentInterface', 'CustomerInterface'] or 'all'
Silent => 1 # optional, 1 || 0, default 0, if set to 1 does not log errors if there are no processes configured
);
Returns:
$ProcessList = {
'P1' => 'Process 1',
'P2' => 'Process 2',
'P3' => '',
};
ProcessStartpointGet()#
Get process startpoint
my $Start = $ProcessObject->ProcessStartpointGet(
ProcessEntityID => 'P1',
);
Returns:
$Start = {
Activity => 'A1',
ActivityDialog => 'AD1',
};
ProcessTransition()#
Check valid Transitions and Change Ticket's Activity
if a Transition was positively checked
my $ProcessTransition = $ProcessObject->ProcessTransition(
ProcessEntityID => 'P1',
ActivityEntityID => 'A1',
TicketID => 123,
UserID => 123,
CheckOnly => 1, # optional
Data => { # optional
Queue => 'Raw',
DynamicField1 => 'Value',
Subject => 'Testsubject',
#...
},
);
Returns:
$Success = 1; # undef # if "CheckOnly" is NOT set
1 if Transition was executed and Ticket->ActivityEntityID updated
undef if no Transition matched or check failed otherwise
$ProcessTransition = { # if option "CheckOnly" is set
'T1' => {
ActivityEntityID => 'A1',
TransitionAction => [
'TA1',
'TA2',
'TA3',
],
},
};
ProcessTicketActivitySet()#
Set Ticket's ActivityEntityID
my $Success = $ProcessObject->ProcessTicketActivitySet(
ProcessEntityID => 'P1',
ActivityEntityID => 'A1',
TicketID => 123,
UserID => 123,
);
Returns:
$Success = 1; # undef
1 if setting the Activity was executed
undef if setting failed
ProcessTicketProcessSet()#
Set Ticket's ProcessEntityID
my $Success = $ProcessObject->ProcessTicketProcessSet(
ProcessEntityID => 'P1',
TicketID => 123,
UserID => 123,
);
Returns:
$Success = 1; # undef
1 if setting the Activity was executed
undef if setting failed