To act as an AS2 client (sending partner) requires two parts. One a job to send the AS2 file to your partner. And two, a user in the User Manager with a valid __[VFS|VFS]__ directory to receive the MDN response. The same user account eventually can be used to receive payload from the sending partner, in that case it has to be set up with the __[AS2 certs|Receiving AS2 Payload]__ .\\
\\
First lets create a job.  Notice there is no copy or move operation here. The AS2 item is the special protocol that does this type of activity. When the remote server sends a MDN, it is sent to an account you have setup for this in the User Manager...and this AS2 job waits for the MDN notification to come back internally from CrushFTP when that file is received.\\
----

The general process will look like the one below:\\
[{Image src='as2_send_job.jpg' width='1360' height='..' align='left' style='..' class='..' }]
\\
\\
\\
First you should have a Find task in the job. It is searching the specified folder to find items to use in future task items.\\
[{Image src='as2_send_job_find.jpg' width='768' height='..' align='left' style='..' class='..' }]
\\
\\
For the second step, make sure you have the certificate of the AS2 receiving machine added as a trusted certificate in the keystore that you use.  This certificate will be used for encrypting the data using the partners key.  Your key will be used for signing the data.\\
\\
The AS2 task should be set similar to this:\\
%%tabbedSection 
%%tab-AsyncMDN
[{Image src='as2task_options_async.jpg' width='768' height='..' align='left' style='..' class='..' }]
/%
%%tab-SyncMDN
[{Image src='as2task_options_sync.jpg' width='768' height='..' align='left' style='..' class='..' }]
/%
/%
\\
[{Image src='as2task_options_signing.jpg' width='768' height='..' align='left' style='..' class='..' }]\\
\\
[{Image src='as2task_options_decrypting.jpg' width='768' height='..' align='left' style='..' class='..' }]\\
\\
After that is done, you should delete the encrypted files that you already have.\\
[{Image src='as2_send_job_find.jpg' width='768' height='..' align='left' style='..' class='..' }]\\
\\


-----
\\
You can create your own keystore using [Portecle].  Generate a new key pair, and give it a name appropriate to your company.  Its this item you will right click on and share with your trading partner.
\\
You also use the tools menu to import your partner's public key too and give it an appropriate name.  You can have these in separate keystores, or in one single one.


[attachment|Portecle/new_keystore.png]\\
\\
[attachment|AS2/Screen Shot 2013-11-23 at 1.35.05 AM.png]\\
\\
[attachment|AS2/Screen Shot 2013-11-23 at 1.37.57 AM.png]\\
----\\
!!As of CrushFTP v10.0.0_26+, you can improve AS2 processing flow.\\

Example Job flow:\\
{{{
Find task
AS2 task, 120 seocnd wait for MDNs
The red dot, and green dot, both go to next step which is a Jump task.
Jump task, turn off if/else.  Criteria is "{mdn_result}" equals blank.
TRUE dot goes to a delete task or otherwise successful action task
FALSE dot goes to a notification task or moving to a failed directory.
Green dot goes to End...or next step.
}}}
This green dot has the complete list of success/failed items, as long as they weren't deleted in the sub tasks from Jump.