I would like to ask how can I start another flow using quartz.
Starting each flow seperately (one is trigered with IMAP and second with Quartz) works ok, but I would like to have both of them in same file if possible, or at least in same project. I don't know what is good practice for this so I let you decide.
So, Flow1 starts with IMAP and do its job with mail (original) and then goes on to other subflows.
Flow2 starts with quartz and do its job (the one I would like to add)
Both flows have same variables and have similar job but don't have to be sinchronized of course.
Now, how can I achieve this?
I tried this:
<flow name="Flow1" doc:name="Flow1">
<imaps:inbound-endpoint doc:name="IMAP"
host="imap.gmail.com" port="993" responseTimeout="10000"
........
</flow>
<flow name="Flow2" doc:name="Flow2">
<quartz:outbound-endpoint jobName="FlowStarter" repeatInterval="10000" responseTimeout="10000" doc:name="Quartz">
<quartz:event-generator-job groupName="QuartzGenGroup" jobGroupName="QuartzGenGroup">
<quartz:payload>wwqda</quartz:payload>
</quartz:event-generator-job>
</quartz:outbound-endpoint>
<logger message="Quartz started at #[server.dateTime.toCalendar().toString()] #[payload]" level="INFO" doc:name="Logger"/>
</flow>
When I started this, Flow2 never gave any output.
I am using Mule Studio 3.5.0
Thank you!
In the Flow 2 use quartz:inbound-endpoint instead of quartz:outbound-endpoint. Outbound endpoint does not trigger workflow itself. It requires an additional incoming event.
Look at http://2rdscreenretargeting.blogspot.ru/2012/12/how-to-schedule-jobs-using-mule-studio.html for details on Quartz usage in Mule.