=encoding utf-8

=head1 NAME

Sympa::Internals::Workflow - Overview on workflow of Sympa

=head1 DESCRIPTION

Following picture roughly describes interaction among several classes in
workflow of Sympa.  For more details see documentation on each class.

=head2 Message processing

 <<archived.pl>>
 
 Archive => [ProcessArchive] => (list archive)
 
 <<bounced.pl>>
 
 Bounce => [ProcessBounce] => Tracking
 
 <<bulk.pl>>
 
 Outgoing => [ProcessOutgoing] => (Mailer)
 
 <<sympa_automatic.pl>>
 
 Automatic => [ProcessAutomatic] => Incoming
 
 <<sympa_msg.pl>>
 
 Digest::Collection => [ProcessDigest]
                                    :
                                    *1
 
                     +-> (reject or ignore)
                    /
                   +---> [DoCommand]
                  /               :
 Incoming => [ProcessIncoming]    *2
                  \                              +-> (reject)
                   +-> [DoForward] => (Mailer)  /
                    \                          +-> [ToEditor] => Outgoing
                     +-> [DoMessage]          /
                               \             /---> [ToHeld] => Held
          *3 (CONFIRM)          +-> [AuthorizeMessage]
          :                    /             \---> [ToModeration] => Mod.
 Held => [ProcessHeld] -------+               \
                                               +-> [DistributeMessage]
            *3 (DISTRIBUTE)                   /             \
               (REJECT)       +--> (reject)  /               \
                :            /              /                 \
 Moderation => [ProcessModeration]         /                   \
                             \            /                     \
                              +----------+                       \
                                                                  \
                       +-------------------------------------------+
                        \
                        [TransformIncoming]
 <<wwsympa.fcgi>>         \
                        [ToArchive] => Archive
 (list archive)             \
  => [ResendArchive] -- [TransformOutgoing] -+
                              \               \
                        [ToDigest] => Digest   \
                                \               \
                                 +---------------+-> [ToList] => Outgoing
 
                            +-> [TransformDigestFinal]  
                           /                     \
 <<Template sending>>     /         +----------> [ToOutgoing] => Outgoing 
                         /         / 
 (mail template) => [ProcessTemplate] ---------> [ToAlarm] => Alarm
                        :          \
                        *1          +----------> [ToMailer] => (Mailer)

=head2 Command processing

 <<sympa_msg.pl>>
 
                 *2
                 :                             +-> (reject)
   (message) => [ProcessMessage]              /
                              \              /---> [ToAuth] => Auth
          *3 (AUTH)            +-> [AuthorizeRequest]
          :                   /              \---> [ToAuthOwner] => Auth
 Auth => [ProcessAuth] ------+                \
                            /                  +-> [DispatchRequest]
                           /                                \
                          /                          (request handler)
 Request::Collection =>  /                                      :
           [ProcessRequest]                                     *3

=begin comment

These have not been implemented yet.

 <<task_manager.pl>>
 
 Task => [ProcessTask] => Task
 
=end comment

=head2 Legend

=over

=item C<I<ClassName>>

Spool class.  Prefix C<Sympa::Spool::> is omitted.

=over

=item C<Alarm>

=item C<Outgoing>

=item C<Tracking>

L<Sympa::Alarm>, L<Sympa::Bulk> and L<Sympa::Tracking> classes
(they are named such by historical reason).

=back

=item C<[I<ClassName>]>

Workflow class.  Prefix C<Sympa::Spindle::> is omitted.

=item C<(Mailer)>

L<Sympa::Mailer> class.

=item C<(list archive)>

L<Sympa::Archive> class.

=item C<(mail template)>

L<Sympa::Message::Template> class.

=item C<(message)>

L<Sympa::Request::Message> class.

=item C<(request handler)>

A subclass of C<Sympa::Request::Handler> class.

=back

=head1 SEE ALSO

L<sympa_toc(1)>, L<Sympa::Internals>, L<Sympa::Spindle>, L<Sympa::Spool>.

=cut
