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

  • Home
  • SEARCH
  • 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 8216317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:05:13+00:00 2026-06-07T12:05:13+00:00

I’m trying to use the expression #[process:processName:valueToProcess] in my flow. This is my flow

  • 0

I’m trying to use the expression #[process:processName:valueToProcess] in my flow.

This is my flow config:

<flow name="exampleFlow">
  <quartz:inbound-endpoint jobName="job1" cronExpression="0/5 * * * * ?" connector-ref="quartzConnector">
    <quartz:event-generator-job>
      <quartz:payload>foo</quartz:payload>
    </quartz:event-generator-job>
  </quartz:inbound-endpoint>

  <logger message="#[process:test:#[payload]]" level="INFO"/>
</flow>

<sub-flow name="test" doc:name="test">
  <component class="com.myComp.ComponentTest" doc:name="Java"/>
</sub-flow>

And this is my Java Component:

package com.myComp;

public class ComponentTest
{
  public String test(String s)
  {
    return s + "bar";
  }
}

The problem comes when the expression #[process:test:#[payload]] is evaluated. It throws this exception:

java.lang.NullPointerException
    at org.mule.component.AbstractComponent.invokeInternal(AbstractComponent.java:112)
    at org.mule.component.AbstractComponent.process(AbstractComponent.java:156)
    at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:99)
    at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:66)
    at org.mule.processor.chain.InterceptingChainLifecycleWrapper.doProcess(InterceptingChainLifecycleWrapper.java:56)
    at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:66)
    at org.mule.processor.chain.InterceptingChainLifecycleWrapper.process(InterceptingChainLifecycleWrapper.java:87)
    at org.mule.api.processor.MessageProcessors$LifecyleAwareMessageProcessorWrapper.process(MessageProcessors.java:114)
    at org.mule.expression.MessageProcessorExpressionEvaluator.evaluate(MessageProcessorExpressionEvaluator.java:87)
    at org.mule.expression.DefaultExpressionManager.evaluate(DefaultExpressionManager.java:273)
    at org.mule.expression.DefaultExpressionManager.evaluate(DefaultExpressionManager.java:209)
    at org.mule.expression.DefaultExpressionManager$1.match(DefaultExpressionManager.java:399)
    at org.mule.util.TemplateParser.parse(TemplateParser.java:156)
    at org.mule.util.TemplateParser.parse(TemplateParser.java:133)
    at org.mule.expression.DefaultExpressionManager.parse(DefaultExpressionManager.java:395)
    at org.mule.expression.DefaultExpressionManager.parse(DefaultExpressionManager.java:379)
    at org.mule.api.processor.LoggerMessageProcessor.log(LoggerMessageProcessor.java:89)
    at org.mule.api.processor.LoggerMessageProcessor.process(LoggerMessageProcessor.java:71)
    at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:99)
    at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:66)
    at org.mule.processor.AbstractInterceptingMessageProcessorBase.processNext(AbstractInterceptingMessageProcessorBase.java:105)
    at org.mule.interceptor.AbstractEnvelopeInterceptor.process(AbstractEnvelopeInterceptor.java:55)
    at org.mule.processor.AsyncInterceptingMessageProcessor.processNextTimed(AsyncInterceptingMessageProcessor.java:111)
    at org.mule.processor.AsyncInterceptingMessageProcessor$AsyncMessageProcessorWorker.doRun(AsyncInterceptingMessageProcessor.java:158)
    at org.mule.work.AbstractMuleEventWork.run(AbstractMuleEventWork.java:43)
    at org.mule.work.WorkerContext.run(WorkerContext.java:310)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

The same happens with any other scripting component.
I’m guessing it has something to do with my component lifecycle, but I couldn’t find a way to make it work.
If I replace my component with any other Mule processor (e.g. logger, stringAppend) it works fine.

Any help will be appreciated!

  • 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-07T12:05:14+00:00Added an answer on June 7, 2026 at 12:05 pm

    You’re right when you say it’s an initialization issue: for any reason, components in a sub-flow are not initialized the same way they are in a flow, ie. this works:

    <flow name="test" doc:name="test">
      <component class="com.myComp.ComponentTest" doc:name="Java"/>
    </flow>
    

    I believe this is a bug hence I reported it. Please upvote the issue.

    To make this work with an asynchronous event, like the ones the Quartz inbound endpoint generates, you will need to add processingStrategy="synchronous" to the called flow in order to invoke in synchronously, otherwise by default it will be invoke asynchronously (even if process:test:#[payload] expects a synchronous response). That’s a known quirk in Mule 3.

    So the end solution is:

    <flow name="test" processingStrategy="synchronous" doc:name="test">
      <component class="com.myComp.ComponentTest" doc:name="Java"/>
    </flow>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.