could you be more specific about what you are trying to sort?
would this be better served as a entity view?
Rohit Sureka sent the following on 4/20/2007 9:32 AM:
> Thanks for the email and i am sorry if i did not put my question properly.
>
> My real problem is configuring the service to sort emails. I have put the MCA
> rules in place but i am not able to configure the "sortincomingemail' service.
>
> I understand that "sortincomingemail" has to be run at regular interval to
> process the email sorting.
>
> Rohit
>
> BJ Freeman <[EMAIL PROTECTED]> wrote: My previous response was aimed at
> sorting the communication events after
> they have been already loaded.
>
> to answer your question, Yes ofbiz will try to match any email to and
> from with those in the parties.
> if it can not find one of the parties, usually the from, it puts the
> address in comments, an marks it unknown email address.
>
>
> The MCA is used to filter the emails. Like:
>
> link tracking number to order-->
>
>
> value="[EMAIL PROTECTED]"/>
>
>
>
> in the above I am rerouting the Quantum emails to a process I wrote to
> input the shipping tracking number into an order.
>
> If this is what you were meaning by sort then this is the mechanism to
> to this.
>
> you can find /framework/common/servicedef/smca_test.xml
>
>
> rohit2006 sent the following on 4/19/2007 10:03 PM:
>> i am trying to configure email sorting in ofbiz. I have followed the
>> documentation by Si Chen, to test it. I am assuming that if email sorting is
>> correctly configured, emails will be recorded as communication event for the
>> related parties. For eg. after a email is received ofbiz, will try to match
>> the "to" address, with the email associated to a party, and if a match is
>> found, a communication event will be logged for the party.
>>
>> I hope that i got this right?
>>
>> I have followed the instruction as mentioned in documentation, and
>> everything loads fine, but when i schedule the service storeincomingemail, i
>> am prompted to enter the service parameter(messageWrapper
>> (org.ofbiz.service.mail.MimeMessageWrapper), which i have no clue about. i
>> guess this is to do something 'MimeMessageWrapper'.
>>
>> The documentation by Si Chen mentions this:
>>
>> 5. MCA services need to implement the mail processing interface, as in:
>>
>> It uses a MimeMessageWrapper:
>> MimeMessageWrapper wrapper = (MimeMessageWrapper)
>> context.get("messageWrapper");
>> MimeMessage message = wrapper.getMessage();
>> with methods like message.getAllRecipients(), message.getFrom(),
>> message.getSubject(), getAllRecipients(), getSentDate(), getReceivedDate(),
>> etc.
>>
>> Currently (20060607) there is a service called “storeIncomingEmail†which
>> could be used to do inbound mail sorting. This has not been fully tested
>> yet.
>>
>>
>> I am not sure what to insert in the service parameters.
>>
>> Do we need to create a view for email sorting, cause i think the mails will
>> be visible, under the communication tab, in party manager?
>>
>> Rohit
>>
>>
>>
>> BJ Freeman wrote:
>>> If I understand you, you can create a view with the sorting you want.
>>>
>>> rohit2006 sent the following on 4/19/2007 4:33 AM:
>>>> Hi,
>>>>
>>>> I am trying configure email sorting in ofbiz and store emails as
>>>> communication events. I believe i have to schedule the service
>>>> storeIncomingEmail as a service. I tried to do that and was prompted fill
>>>> the fields:
>>>>
>>>> Step 2: Service Parameters
>>>> messageWrapper (org.ofbiz.service.mail.MimeMessageWrapper).
>>>>
>>>> I am not sure what to enter into this field, can someone please help me
>>>> configure this. I am getting the following error in log when the service
>>>> is
>>>> run
>>>>
>>>> 2007-04-19 05:22:31,302 (default-invoker-Thread-2) [
>>>> JobInvoker.java:211:INFO ] Invoker: default-invoker-Thread-2 received job
>>>> --
>>>> 1176985293330 from poller - [EMAIL PROTECTED]
>>>> 2007-04-19 05:22:31,320 (default-invoker-Thread-2)
>>>> [PersistedServiceJob.java:136:INFO ]
>>>> [EMAIL PROTECTED] -- Next runtime:
>>>> -1
>>>> [Error] :2:12: cvc-elt.1: Cannot find the declaration of element
>>>> 'ofbiz-ser'.
>>>> 2007-04-19 05:22:31,331 (default-invoker-Thread-2) [
>>>> UtilXml.java:243:DEBUG] XML Read 0.0040s: Internal Content
>>>> 2007-04-19 05:22:31,332 (default-invoker-Thread-2) [
>>>> ServiceDispatcher.java:322:ERROR]
>>>> ---- exception report
>>>> ----------------------------------------------------------
>>>> Incoming context (in runSync : storeIncomingEmail) does not match
>>>> expected
>>>> requirements
>>>> Exception: org.ofbiz.service.ServiceValidationException
>>>> Message: The following required parameter is missing:
>>>> [storeIncomingEmail.messageWrapper]
>>>> ---- stack trace
>>>> ---------------------------------------------------------------
>>>> org.ofbiz.service.ServiceValidationException: The following required
>>>> parameter is missing: [storeIncomingEmail.messageWrapper]
>>>> org.ofbiz.service.ModelService.validate(ModelService.java:452)
>>>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:320)
>>>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:211)
>>>> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:136)
>>>> org.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:70)
>>>> org.ofbiz.service.job.JobInvoker.run(JobInvoker.java:221)
>>>> java.lang.Thread.run(Thread.java:534)
>>>> --------------------------------------------------------------------------------
>>>>
>>>> 2007-04-19 05:22:31,333 (default-invoker-Thread-2) [
>>>> ServiceDispatcher.java:385:DEBUG] [[Sync service failed...-
>>>> total:0.0,since
>>>> last(Begin):0.0]] - 'JobDispatcher / storeIncomingEmail'
>>>> 2007-04-19 05:22:31,333 (default-invoker-Thread-2) [
>>>> ServiceDispatcher.java:388:ERROR]
>>>> ---- exception report
>>>> ----------------------------------------------------------
>>>> Service [storeIncomingEmail] threw an unexpected exception/error
>>>> Exception: org.ofbiz.service.ServiceValidationException
>>>> Message: The following required parameter is missing:
>>>> [storeIncomingEmail.messageWrapper]
>>>> ---- stack trace
>>>> ---------------------------------------------------------------
>>>> org.ofbiz.service.ServiceValidationException: The following required
>>>> parameter is missing: [storeIncomingEmail.messageWrapper]
>>>> org.ofbiz.service.ModelService.validate(ModelService.java:452)
>>>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:320)
>>>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:211)
>>>> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:136)
>>>> org.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:70)
>>>> org.ofbiz.service.job.JobInvoker.run(JobInvoker.java:221)
>>>> java.lang.Thread.run(Thread.java:534)
>>>> --------------------------------------------------------------------------------
>>>>
>>>> 2007-04-19 05:22:31,334 (default-invoker-Thread-2) [
>>>> TransactionUtil.java:252:ERROR]
>>>> ---- exception report
>>>> ----------------------------------------------------------
>>>> [TransactionUtil.rollback]
>>>> Exception: java.lang.Exception
>>>> Message: Stack Trace
>>>> ---- stack trace
>>>> ---------------------------------------------------------------
>>>> java.lang.Exception: Stack Trace
>>>> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:251)
>>>> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:233)
>>>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:391)
>>>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:211)
>>>> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:136)
>>>> org.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:70)
>>>> org.ofbiz.service.job.JobInvoker.run(JobInvoker.java:221)
>>>> java.lang.Thread.run(Thread.java:534)
>>>> --------------------------------------------------------------------------------
>>>>
>>>> 2007-04-19 05:22:31,335 (default-invoker-Thread-2) [
>>>> TransactionUtil.java:262:INFO ] [TransactionUtil.rollback] transaction
>>>> rolled back
>>>> 2007-04-19 05:22:31,335 (default-invoker-Thread-2) [
>>>> TransactionUtil.java:189:INFO ] [TransactionUtil.commit] Not committing
>>>> transaction, status is STATUS_NO_TRANSACTION
>>>> 2007-04-19 05:22:31,336 (default-invoker-Thread-2) [
>>>> GenericServiceJob.java:117:ERROR]
>>>> ---- exception report
>>>> ----------------------------------------------------------
>>>> Async-Service failed.
>>>> Exception: org.ofbiz.service.ServiceValidationException
>>>> Message: The following required parameter is missing:
>>>> [storeIncomingEmail.messageWrapper]
>>>> ---- stack trace
>>>> ---------------------------------------------------------------
>>>> org.ofbiz.service.ServiceValidationException: The following required
>>>> parameter is missing: [storeIncomingEmail.messageWrapper]
>>>> org.ofbiz.service.ModelService.validate(ModelService.java:452)
>>>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:320)
>>>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:211)
>>>> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:136)
>>>> org.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:70)
>>>> org.ofbiz.service.job.JobInvoker.run(JobInvoker.java:221)
>>>> java.lang.Thread.run(Thread.java:534)
>>>> --------------------------------------------------------------------------------
>>>>
>>>> 2007-04-19 05:22:31,342 (default-invoker-Thread-2) [
>>>> SequenceUtil.java:254:INFO ] Got bank of sequenced IDs for [JobSandbox];
>>>> curSeqId=58370, maxSeqId=58380, bankSize=10
>>>> 2007-04-19 05:22:31,348 (default-invoker-Thread-2)
>>>> [PersistedServiceJob.java:202:INFO ] Persisted Job [58369] Failed
>>>> Re-Scheduling : 1176985531339
>>>> 2007-04-19 05:22:37,711 (http-0.0.0.0-7443-Processor1) [
>>>> ContextFilter.java:182:INFO ] [Request]: /webtools/control/jobList
>>>> 2007-04-19 05:22:37,712 (http-0.0.0.0-7443-Processor1) [
>>>> ControlServlet.java:90 :INFO ] The character encoding of the request is:
>>>> [null]. The character encoding we will use for the request and response
>>>> is:
>>>> [UTF-8]
>>>> 2007-04-19 05:22:37,713 (http-0.0.0.0-7443-Processor1) [
>>>> ControlServlet.java:126:DEBUG] [[[jobList] Servlet Starting, doing setup-
>>>> total:0.0,since last(Begin):0.0]]
>>>> 2007-04-19 05:22:37,714 (http-0.0.0.0-7443-Processor1) [
>>>> ControlServlet.java:181:DEBUG] [[[jobList] Setup done, doing Event(s) and
>>>> View(s)- total:0.0,since last([jobList] Servlet...):0.0]]
>>>> 2007-04-19 05:22:37,714 (http-0.0.0.0-7443-Processor1) [
>>>> RequestHandler.java:266:INFO ] [Processing Request]: jobList
>>>> sessionId=1508B221763B3DC07A253921591B5DA1.jvm1
>>>> 2007-04-19 05:22:37,715 (http-0.0.0.0-7443-Processor1) [
>>>> RequestManager.java:117:INFO ] [RequestManager.getRequestAttribute] Value
>>>> for attribute "null" of uri "jobList" not found
>>>> 2007-04-19 05:22:37,716 (http-0.0.0.0-7443-Processor1) [
>>>> RequestHandler.java:450:INFO ] [RequestHandler.doRequest]: Response is a
>>>> view. sessionId=1508B221763B3DC07A253921591B5DA1.jvm1
>>>> 2007-04-19 05:22:37,716 (http-0.0.0.0-7443-Processor1) [
>>>> RequestHandler.java:603:INFO ] servletName=control, view=jobList
>>>> sessionId=1508B221763B3DC07A253921591B5DA1.jvm1
>>>> 2007-04-19 05:22:37,717 (http-0.0.0.0-7443-Processor1) [
>>>> ScreenRenderer.java:220:INFO ] Found servlet context (application)
>>>> attribute
>>>> that conflicts with parameter name, leaving request parameter in place
>>>> for
>>>> name: _REQUEST_HANDLER_
>>>> 2007-04-19 05:22:37,826 (http-0.0.0.0-7443-Processor1) [
>>>> ModelScreenWidget.java:361:INFO ] In the include-screen tag the screen
>>>> name
>>>> was empty, ignoring include; in screen [GlobalDecorator]
>>>> 2007-04-19 05:22:37,857 (http-0.0.0.0-7443-Processor1) [
>>>> ControlServlet.java:256:DEBUG] [[[jobList] Done rendering page, Servlet
>>>> Finished- total:0.143,since last([jobList] Setup d...):0.143]]
>>>>
>>>>
>
>
>
>
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check outnew cars at Yahoo! Autos.