ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | shark List | August 2007 Index

<--  Date Index  --> <--  Thread Index  -->

mailtoolagent: how to send an attachment?


Dear all,

At this moment I am evaluating shark - it looks very promising!
I tried the mailtoolagent, and it works fine.

I have only 1 problem: does anybody have an example how to send an attachment?

I tried several things, but so far no luck.
The documentation says:
var_attachments
    value of this attribute should be a comma separated string representing
byte[] variable(s) Id(s) from the process context that will be send as the mail attachment(s). The byte[] represents the file serialized into shark's database.
var_attachments_mime_types
value of this attribute should be comma separated string representing mime type(s) for the byte[] variable(s) specified by the previously described attribute.

So, I defined 2 workflow process variables with the following Ids:
content : with data type External reference, location byte<>. The XPDL shows:
 <DataField Id="content" IsArray="FALSE">
   <DataType>
     <ExternalReference location="byte&lt;&gt;"/>
   </DataType>
 </DataField>
contentType : with Basic type->String

And set the actual parameters for var_attachments to the String "content",
and for var_attachments_mime_types set  to the String "contentType":
 <ActualParameter>"restresult_content"</ActualParameter>
 <ActualParameter>"restresult_contentType"</ActualParameter>

The log file says:
2007-08-20 08:55:19,679: [http-8080-Processor25] ERROR: MailToolAgent - application org.enhydra.shark.toolagent.DefaultMailMessageHandler terminated incorrectly: javax.mail.internet.ParseException 2007-08-20 08:55:19,679: [http-8080-Processor25] ERROR: DefaultToolAgent - can't execute tool agent class org.enhydra.shark.toolagent.MailToolAgent - application terminated incorrectly: org.enhydra.shark.api.internal.toolagent.ToolAgentGeneralException

In shark.conf it is specified:
DefaultToolAgent=org.enhydra.shark.toolagent.DefaultToolAgent
(note that without the attachments, the mailtoolagent worked without any problem)

Any help or example would be appreciated!
Kind regards,
Bert Schultheiss

_________________________________________________________________
Learn.Laugh.Share. Reallivemoms is right place! http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us




<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.