Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8955949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:40:22+00:00 2026-06-15T14:40:22+00:00

I’m setting up a flow to pull data from a table into another, mark

  • 0

I’m setting up a flow to pull data from a table into another, mark the rows processed, and email the results. I used an Aggregator (see:
How do I get a Mule to return multiple rows from a JDBC query as a single transaction?) to combine all the rows into one email, but after adding the Aggregator the SMTP endpoint fails to run on a second iteration…

  1. Start Mule Flow.
  2. Insert Rows which causes the flow to run.
  3. SQL scripts and SMTP endpoint runs.
  4. Insert More rows and the flow runs again.
  5. Only SQL scripts run… SMTP endpoint doesn’t run at all.

    <flow name="Invoice_Workflow2Flow1" doc:name="Ross_invoice_Workflow2Flow1" processingStrategy="asynchronous">
        <jdbc:inbound-endpoint queryKey="GetUnprocessedInvoices" queryTimeout="10000" pollingFrequency="10000" connector-ref="Database" doc:name="Get invoice run">
            <jdbc:query key="GetUnprocessedInvoices" value="SELECT        INVOICE_NUMBER, ROWID FROM            FIN.LHF_INVOICE_WORKFLOW WHERE        (STATUS_FLAG = 'N')"/>
        </jdbc:inbound-endpoint>
        <jdbc:outbound-endpoint exchange-pattern="one-way" queryKey="insert_invoice_run" queryTimeout="10000" connector-ref="SPTSQL01_APPS_custom_app_data" doc:name="Load to custom_app_data">
            <jdbc:query key="insert_invoice_run" value="INSERT INTO lhf_ros_invoice_workflow ([INVOICE_NUMBER]  VALUES #[map-payload:INVOICE_NUMBER])"/>
        </jdbc:outbound-endpoint>
        <jdbc:outbound-endpoint exchange-pattern="one-way" queryKey="MarkAsProcessed" queryTimeout="10000" connector-ref="DatabaseMuleLogin" doc:name="Mark Processed in Ross">
            <jdbc:query key="MarkAsProcessed" value="UPDATE       FIN.LHF_INVOICE_WORKFLOW SET                STATUS_FLAG = 'P' WHERE        (ROWID = #[map-payload:ROWID])"/>
        </jdbc:outbound-endpoint>
        <message-properties-transformer doc:name="Message Properties">
            <add-message-property key="MULE_CORRELATION_GROUP_SIZE" value="1000"/>
            <add-message-property key="MULE_CORRELATION_ID" value="1"/>
        </message-properties-transformer>
        <collection-aggregator timeout="1000" failOnTimeout="false" doc:name="Collection Aggregator"/>
        <smtp:outbound-endpoint host="mail.example.com" to="test@example.com" from="muleservice@example.com" subject="[Invoice Workflow] Exceptions" responseTimeout="10000" doc:name="SMTP"/>
    </flow>
    

Here’s the log of what happens if it’s useful…

(first run works fine, SMTP endpoint runs)

INFO 2012-12-06 09:08:52,143 [[ross_invoice_workflow].DatabaseMuleLogin.dispatcher.02] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated
INFO 2012-12-06 09:08:52,159 [[ross_invoice_workflow].DatabaseMuleLogin.dispatcher.03] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated
INFO 2012-12-06 09:08:52,180 [[ross_invoice_workflow].DatabaseMuleLogin.dispatcher.01] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated
INFO 2012-12-06 09:08:52,223 [[ross_invoice_workflow].SPTSQL01_APPS_custom_app_data.dispatcher.01] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated
INFO 2012-12-06 09:08:52,223 [[ross_invoice_workflow].SPTSQL01_APPS_custom_app_data.dispatcher.03] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated
INFO 2012-12-06 09:08:52,223 [[ross_invoice_workflow].SPTSQL01_APPS_custom_app_data.dispatcher.02] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated
INFO 2012-12-06 09:08:53,131 [[ross_invoice_workflow].connector.smtp.mule.default.dispatcher.01] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default outbound transformer: org.mule.transport.email.transformers.ObjectToMimeMessage
INFO 2012-12-06 09:08:53,138 [[ross_invoice_workflow].connector.smtp.mule.default.dispatcher.01] org.mule.lifecycle.AbstractLifecycleManager: Initialising: ‘connector.smtp.mule.default.dispatcher.1935379626’. Object is: SmtpMessageDispatcher
INFO 2012-12-06 09:08:53,174 [[ross_invoice_workflow].connector.smtp.mule.default.dispatcher.01] org.mule.lifecycle.AbstractLifecycleManager: Starting: ‘connector.smtp.mule.default.dispatcher.1935379626’. Object is: SmtpMessageDispatcher

(insert more rows, SQL endpoints run but SMTP does not…)

INFO 2012-12-06 09:09:22,111 [[ross_invoice_workflow].DatabaseMuleLogin.dispatcher.03] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated
INFO 2012-12-06 09:09:22,129 [[ross_invoice_workflow].DatabaseMuleLogin.dispatcher.02] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated
INFO 2012-12-06 09:09:22,146 [[ross_invoice_workflow].DatabaseMuleLogin.dispatcher.01] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated
INFO 2012-12-06 09:09:22,168 [[ross_invoice_workflow].SPTSQL01_APPS_custom_app_data.dispatcher.03] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated
INFO 2012-12-06 09:09:22,168 [[ross_invoice_workflow].SPTSQL01_APPS_custom_app_data.dispatcher.01] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated
INFO 2012-12-06 09:09:22,168 [[ross_invoice_workflow].SPTSQL01_APPS_custom_app_data.dispatcher.02] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated

(insert more rows, same thing)

INFO 2012-12-06 09:09:22,111 [[ross_invoice_workflow].DatabaseMuleLogin.dispatcher.03] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated
INFO 2012-12-06 09:09:22,129 [[ross_invoice_workflow].DatabaseMuleLogin.dispatcher.02] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated
INFO 2012-12-06 09:09:22,146 [[ross_invoice_workflow].DatabaseMuleLogin.dispatcher.01] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated
INFO 2012-12-06 09:09:22,168 [[ross_invoice_workflow].SPTSQL01_APPS_custom_app_data.dispatcher.03] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated
INFO 2012-12-06 09:09:22,168 [[ross_invoice_workflow].SPTSQL01_APPS_custom_app_data.dispatcher.01] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated
INFO 2012-12-06 09:09:22,168 [[ross_invoice_workflow].SPTSQL01_APPS_custom_app_data.dispatcher.02] org.mule.transport.jdbc.sqlstrategy.SimpleUpdateSqlStatementStrategy: Executing SQL statement: 1 row(s) updated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:40:23+00:00Added an answer on June 15, 2026 at 2:40 pm

    The problem comes from the fact that the MULE_CORRELATION_ID is set to 1. Since the group with this correlation ID has been processed, it’s impossible to keep using this ID after the group has been delivered. In my striped down test, I actually receive errors when I try to feed more events with the same correlation ID after the first group has been released.

    I suggest you add a column in the select query that returns the same value for all the selected rows but that changes every time Mule runs the query. For example, the query could receive a UUID generated by Mule with an expression like #[java.util.UUID.randomUUID().toString()] and return the value in a column. Then you could use this value as the correlation ID as it will be the same for the group of selected record.

    Assuming the added column is called “CID”, then the config would be:

    <set-property propertyName="MULE_CORRELATION_GROUP_SIZE" value="3" />
    <set-property propertyName="MULE_CORRELATION_ID" value="#[message.payload.CID]" />
    

    (Note that set-property is a more expressive config element than message-properties-transformer)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am currently running into a problem where an element is coming back from
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.