<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Exception when calling sub process on java</title><link>https://answers.axonivy.com/questions/4231/exception-when-calling-sub-process-on-java</link><description>&lt;p&gt;Hi guy,&lt;/p&gt;
&lt;p&gt;I am using java to call a sub process (1). On sub process, it calls another process on async mode and wait for this async process finished. But it gets an exception &lt;/p&gt;
&lt;p&gt;&lt;code&gt;ClassCastException: java.lang.Object cannot be cast to ch.ivyteam.ivy.scripting.objects.util.IIvyDataObject
    BpmError: ivy:error:system
    IvyRuntimeException: BpmError ivy:error:system
     Unique ID: 16ED0879C1F1D89D
     Process Element: Wait for the other business processes to end &amp;lt;16ECF9C19BDDE0E4-f6&amp;gt;
     Process Call Stack:
      callServiceCheck() &amp;lt;16ECF9C19BDDE0E4-f0&amp;gt;
    ch.ivyteam.util.IvyRuntimeException: BpmError ivy:error:system
 Unique ID: 16ED0879C1F1D89D
 Process Element: Wait for the other business processes to end &amp;lt;16ECF9C19BDDE0E4-f6&amp;gt;
 Process Call Stack:
  callServiceCheck() &amp;lt;16ECF9C19BDDE0E4-f0&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;But it can work well if I trigger the start link (2) directly&lt;/p&gt;
&lt;p&gt;&lt;img alt="alt text" src="https://lh3.googleusercontent.com/QNaXkDI24FP4P6lVFeshsr_aBnuw2iPEhnm9L5CK8n6hfPSah08x0nXFmxdHiSttVeDs6c0RKFKqTeEmR2sXCyLX6ykKxscULJMm3rsmsKValTgGncX6KdT_PUEE-EuV5egV18A_-JjXYlOrMRsE7lwWam0MEnuir3rRrD94NEGlkTzPSOzN8sSRzxYjQts3l3Jutl2C-qP-gJUhNiTBEvxXGMM-sGiLOsfOteiB2AmIx9tNiAzSLqP3Lh_jddFmtOFf98m6lbM8UkMDOt_SbNYrg9ByhSqouM8L5PkrQWcRKPMF4uSmLDLcFGUjWYGG1RQAsq2UT8CQ8Qhnh2fsVhU7Qnm6w_VhIHZIlvS77CZQ9Sy5azWLHRN0f13mRZ9lasNxo2TKDcJd8hBpJMYeZjJrgd7sBjhJi4OO3o-LzAe5RdpnOTmjNDoLbk4mjYVvzl9R-BBD4moB3IxWO64_iVA2WAE1tbLyBlQUEwT5uWXyu9GfgayJsxTjMsyKj5weNY4ZppVRe5RlizQ4aGJX0qKK1y5KA_BYTx3GBuQmNMLRLfym6mNSUXVwkPDtwxfUt-c3JfBwQqgyQT6PTXK2pBTTcROVqVEnLcRXoJ5grz034y_rA05xMZvw0fccOzejkDHCLM8APCc-VhbAgPEJ7YDkxzjLhNjWcjZd9KMkpMkyQMQYl13YPV4mtUX2fw=w1310-h936"&gt;&lt;/p&gt;
&lt;p&gt;How can I overcome this problem? &lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/4231/exception-when-calling-sub-process-on-java" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 09 Dec 2019 02:19:01 -0500</lastBuildDate><item><title>Comment by nvcuong01 on nvcuong01's question</title><link>https://answers.axonivy.com/questions/4231/exception-when-calling-sub-process-on-java#4258</link><description>&lt;p&gt;Thank for your response. I just would like to make sure that ivy doesn't support this point. I already used plain java to do that. Unfortunately, I deleted that sub process and don't have time to build demo project again. Thank a lot for your support!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nvcuong01</dc:creator><pubDate>Mon, 09 Dec 2019 02:19:01 -0500</pubDate><guid>https://answers.axonivy.com/questions/4231/exception-when-calling-sub-process-on-java#4258</guid></item><item><title>Comment by Lukas Lieb on nvcuong01's question</title><link>https://answers.axonivy.com/questions/4231/exception-when-calling-sub-process-on-java#4251</link><description>&lt;p&gt;Hm... this was never our intension to call a subprocess with java and to wait in this process. But I'm sure that this process can be build in an other way. e.g. wait in the java code. 
Can you send me this demo project?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lukas Lieb</dc:creator><pubDate>Fri, 06 Dec 2019 05:05:47 -0500</pubDate><guid>https://answers.axonivy.com/questions/4231/exception-when-calling-sub-process-on-java#4251</guid></item><item><title>Comment by nvcuong01 on nvcuong01's question</title><link>https://answers.axonivy.com/questions/4231/exception-when-calling-sub-process-on-java#4240</link><description>&lt;p&gt;I am using Ivy 7.0.11 and call sub process on plain java&lt;/p&gt;
&lt;p&gt;&lt;code&gt;SubProcessCall
        .withPath("Functional Processes/callServiceCheck")
        .withParam("signalDataCheck", signalDataCheck)
        .withParam("dossierId", dossierCobId)
        .call();&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I would like to create a process like the example project "RichDialogDemos -&amp;gt; WaitForAsyncProcessDemo -&amp;gt; MainBusinessProcessStart". The reason because I want to run check service in the background and update UI after having the result.
Thanks&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nvcuong01</dc:creator><pubDate>Thu, 05 Dec 2019 21:17:34 -0500</pubDate><guid>https://answers.axonivy.com/questions/4231/exception-when-calling-sub-process-on-java#4240</guid></item><item><title>Comment by Lukas Lieb on nvcuong01's question</title><link>https://answers.axonivy.com/questions/4231/exception-when-calling-sub-process-on-java#4238</link><description>&lt;p&gt;Which ivy version?
How do you call the sub process with java? and why do you need to do that?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lukas Lieb</dc:creator><pubDate>Thu, 05 Dec 2019 09:58:53 -0500</pubDate><guid>https://answers.axonivy.com/questions/4231/exception-when-calling-sub-process-on-java#4238</guid></item></channel></rss>