Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Process Manager (Stardust) » [File missing] Camel Route to Send and Receive Email(could you please include the example file)
[File missing] Camel Route to Send and Receive Email [message #1702310] Tue, 21 July 2015 13:39 Go to next message
Kunal Suri is currently offline Kunal SuriFriend
Messages: 82
Registered: April 2013
Location: Paris Saclay, France
Member

Hi,

I was trying to understand the how to provide approvals to a process though a link in an email and saw the below category

Camel Route to Send and Receive Email
Url - https://wiki.eclipse.org/Stardust/Knowledge_Base/Integration/Camel/Camel_Route_to_Send_and_Receive_Email

There is a file 'EmailSendReciveApproval1.zip', which I am assuming is an example file. But I am not able to download it. It seems like missing.

Could you please upload it?

Secondly, is there any other ways we can have approvals in a process from email?

Many Thanks!
Kunal.

[Updated on: Tue, 21 July 2015 13:40]

Report message to a moderator

Re: [File missing] Camel Route to Send and Receive Email [message #1702703 is a reply to message #1702310] Fri, 24 July 2015 08:28 Go to previous messageGo to next message
Rajkumar Dangi is currently offline Rajkumar DangiFriend
Messages: 51
Registered: November 2014
Location: Pune, India
Member
Hi Kunal,,

We have corrected the link. Same could be downloaded from url

https://wiki.eclipse.org/images/1/13/EmailSendReciveApproval1.zip


-Thanks
RajKumar
Re: [File missing] Camel Route to Send and Receive Email [message #1702732 is a reply to message #1702703] Fri, 24 July 2015 11:30 Go to previous messageGo to next message
Kunal Suri is currently offline Kunal SuriFriend
Messages: 82
Registered: April 2013
Location: Paris Saclay, France
Member

Hi Rajkumar,

Thanks for the files!

When I am deploying this process I am facing some errors!

Errors and Warning:

1. There is no IPPActivityInstanceOID (Warning)

2. If I ignore all the warning and deploy the process, there is execution error


index.php/fa/22651/0/


Error Message Start

java.lang.IllegalArgumentException: No script engine could be created for: rhino-nonjdk
at org.apache.camel.builder.script.ScriptBuilder.createScriptEngine(ScriptBuilder.java:347)
at org.apache.camel.builder.script.ScriptBuilder.lookupScriptEngineFactory(ScriptBuilder.java:319)
at org.apache.camel.builder.script.ScriptBuilder.<init>(ScriptBuilder.java:110)
at org.apache.camel.builder.script.ScriptBuilder.<init>(ScriptBuilder.java:89)
at org.apache.camel.builder.script.ScriptLanguage.createExpression(ScriptLanguage.java:40)
at org.apache.camel.component.language.LanguageProducer.process(LanguageProducer.java:49)
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:120)

Error Message End

Already a bug request has been opened ...

Bug link - https://bugs.eclipse.org/bugs/show_bug.cgi?id=428334

I tired to see the error and get the Jars files but then also I am getting the same error.

Could you please help me in regarding this?

I am using Stardust 3.0.0 on Eclipse Mars, ( in case you want to replicate the error)
I have installed an internal POP server to handle the mail being sent.

Thanks,
Kunal.
Re: [File missing] Camel Route to Send and Receive Email [message #1702737 is a reply to message #1702732] Fri, 24 July 2015 11:48 Go to previous messageGo to next message
Rajkumar Dangi is currently offline Rajkumar DangiFriend
Messages: 51
Registered: November 2014
Location: Pune, India
Member
Hi Kunal,

Error "java.lang.IllegalArgumentException: No script engine could be created for: rhino-nonjdk" is related to javascript scripting engine because it is not by default shipped with stardust. But as you said you manually copied all the jars then it should work.

Anyway in this process there is only one application activity named "Prepare Email Message" which uses javascript engine. You can get rid of that activity and use another activity may be manual activity to populate "Message Body" and "Hash value" data. Then in that case you should not get this error.

index.php/fa/22652/0/


-Thanks
RajKumar
Re: [File missing] Camel Route to Send and Receive Email [message #1703225 is a reply to message #1702737] Wed, 29 July 2015 13:23 Go to previous messageGo to next message
Kunal Suri is currently offline Kunal SuriFriend
Messages: 82
Registered: April 2013
Location: Paris Saclay, France
Member

Hi RajKumar,

I would like to use the approval email like in the example but I feel I may be doing something wrong while using Rhino jar thus getting 'No script engine could be created for: rhino-nonjdk' error!

Could you please be so kind to let me know step by step which jar files to download (may be there is some version issues) and where to put these jars (I currently put them in the tomcat/lib)

many thanks!
Kunal.

P.S. - Eclipse Stardust 3.0.0 Running on Tomcat 7.0.59
Re: [File missing] Camel Route to Send and Receive Email [message #1703255 is a reply to message #1703225] Wed, 29 July 2015 20:51 Go to previous messageGo to next message
Kunal Suri is currently offline Kunal SuriFriend
Messages: 82
Registered: April 2013
Location: Paris Saclay, France
Member

Hi,

***Problem Solved***

I rechecked to see that the problem was coming due to the fact that in the producer property of 'PrepareEmailBody' camel producer application the following was given wrongly

<to uri="language:rhino-nonjdk" />

Once we change it to <to uri="language:rhino" /> the code starts to executing fine.

Smile

Extra Info
Also since JDK 1.7, Mozilla Rhino JS Engine has been included as default, thus I assume we do not even need to add any jars.
From website, Quote:
Oracle's implementation of JDK 7 is co-bundled with the Mozilla Rhino based JavaScript engine which can be used in conjunction with javax.script (JSR-223) API.


But still the Rhino jar can be found from link -https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Download_Rhino

Many Thanks!
Kunal.
Re: [File missing] Camel Route to Send and Receive Email [message #1703293 is a reply to message #1703255] Thu, 30 July 2015 11:10 Go to previous messageGo to next message
Rajkumar Dangi is currently offline Rajkumar DangiFriend
Messages: 51
Registered: November 2014
Location: Pune, India
Member
Great... Smile

This is correct that JDK7 is co-bundled with the Mozilla Rhino based JavaScript engine. On the other hand endpoint <to uri="language:rhino-nonjdk" /> is not wrong. Because prior to JAVA7 javascript engine was not co-bundled.And stardust provided inbuilt java script engine implementation which is resolved against the <to uri="language:rhino-nonjdk" /> . But some how the jar having implementation for this was missing(https://bugs.eclipse.org/bugs/show_bug.cgi?id=428334).

Anyway it's good if you are able to get it working with JDK supplied scripting engine..

-RajKumar
Re: [File missing] Camel Route to Send and Receive Email [message #1708658 is a reply to message #1702310] Fri, 18 September 2015 13:08 Go to previous messageGo to next message
Ajay KS is currently offline Ajay KSFriend
Messages: 21
Registered: September 2015
Junior Member
Hi Kunal,

I am trying to use a script application in one of my processes. However, I am getting the same error - java.lang.IllegalArgumentException: No script engine could be created for: rhino-nonjdk.

I have downloaded the required rhino jars and included them in the classpaths as well. But still, the error is still there.

Please suggest.

-Ajay
Re: [File missing] Camel Route to Send and Receive Email [message #1708660 is a reply to message #1708658] Fri, 18 September 2015 13:19 Go to previous messageGo to next message
Kunal Suri is currently offline Kunal SuriFriend
Messages: 82
Registered: April 2013
Location: Paris Saclay, France
Member

Hi Ajay,

Normally what procedure I follow to remove this error is : (Using the XPDL file in Eclipse and not on Web Portal)

1. Go to your Camel Application
2. General Tab -> Producer Route
3. Search for <to uri="language:rhino-nonjdk" />
4. Remove the "-nonjdk" thus making it look like <to uri="language:rhino" /> and then it most probably should work fine.

Regards,
Kunal.
Re: [File missing] Camel Route to Send and Receive Email [message #1708661 is a reply to message #1708660] Fri, 18 September 2015 13:23 Go to previous messageGo to next message
Ajay KS is currently offline Ajay KSFriend
Messages: 21
Registered: September 2015
Junior Member
Hi Kunal,

Thanks for the reply!

I am using browser portal and not using any camel application. Could you please let me know how to do it here.

-Ajay
Re: [File missing] Camel Route to Send and Receive Email [message #1708664 is a reply to message #1708661] Fri, 18 September 2015 13:35 Go to previous messageGo to next message
Kunal Suri is currently offline Kunal SuriFriend
Messages: 82
Registered: April 2013
Location: Paris Saclay, France
Member

Hey Ajay,

I am sorry but I have no idea how to do this in the Web Portal.

What I can suggest as a temporary solution is as follows:

1. From the Web Portal, download the Process Model (It will be in XPDL format)
2. Open the model in Eclipse.
3. On the Right hand side you would be able to see Applications
and there you would be able to see the name of your Script.
4. Then follow what I said before.

Let me know if it works, otherwise you would have to wait till someone from Stardust Team replies.

Regards,
Kunal.
Re: [File missing] Camel Route to Send and Receive Email [message #1708668 is a reply to message #1708664] Fri, 18 September 2015 14:28 Go to previous messageGo to next message
Ajay KS is currently offline Ajay KSFriend
Messages: 21
Registered: September 2015
Junior Member
Hey Kunal

Thanks for the input.
After doing the changes as per your suggestions (importing the xpdl in eclipse , the nonjdk issue was resolved. However, the activities after the script application are failing.

Hi Stardust Team,

If anyone from your team have any pointers on this, please suggest.
That would be greatful.

Regards
Ajay
Re: [File missing] Camel Route to Send and Receive Email [message #1708801 is a reply to message #1708668] Mon, 21 September 2015 10:57 Go to previous messageGo to next message
Ajay KS is currently offline Ajay KSFriend
Messages: 21
Registered: September 2015
Junior Member
Hi Kunal,

It somehow works for me now. However, when I change something in the correspondinf script activity, the nonjdk again gets appended into it.

Is there a way so that we can make it as a permanent change.

Regards
Ajay
Re: [File missing] Camel Route to Send and Receive Email [message #1708807 is a reply to message #1708801] Mon, 21 September 2015 11:48 Go to previous messageGo to next message
Kunal Suri is currently offline Kunal SuriFriend
Messages: 82
Registered: April 2013
Location: Paris Saclay, France
Member

Hey Ajay,

I am happy it works for you. Smile

I don't think there would be any permanent change possible as I suppose that once you open the script in browser, the browser would use its internal default lib and that has the 'nonjdk' part.

What I suggest is that you create your entire process etc and just before deploying the process, change those scripts in eclipse.

Regards,
Kunal.
Re: [File missing] Camel Route to Send and Receive Email [message #1709014 is a reply to message #1702310] Wed, 23 September 2015 10:12 Go to previous messageGo to next message
Robert Emsbach is currently offline Robert EmsbachFriend
Messages: 186
Registered: October 2011
Location: Singapore
Senior Member

Hi,

see https://bugs.eclipse.org/bugs/show_bug.cgi?id=428334.
We had a legal approval issue with including the library org.apache.bsf.bsf-engine version 3.1. This should be resolved in the next Stardust release. The dependency was removed.

A permanent fix would be not to change the language attribute and to include the missing library bsf-engine-3.1-startdust01.jar
(and org.python.jython version 2.7 if required) instead.

Please see
http://help.eclipse.org/mars/topic/org.eclipse.stardust.docs.installation/html/releasenotes/releasenotes_3.0.1.html?resultof=%22bsf%22%20#jdk8
on how to create this jar.

Regards

Rob





[Updated on: Wed, 23 September 2015 11:00]

Report message to a moderator

Re: [File missing] Camel Route to Send and Receive Email [message #1709221 is a reply to message #1709014] Fri, 25 September 2015 05:43 Go to previous messageGo to next message
Ajay KS is currently offline Ajay KSFriend
Messages: 21
Registered: September 2015
Junior Member
Hi Rob,

I could not find bsf-engines inside javascript folder. Could you please check.

Regards
Ajay
Re: [File missing] Camel Route to Send and Receive Email [message #1709223 is a reply to message #1709221] Fri, 25 September 2015 06:02 Go to previous messageGo to next message
Robert Emsbach is currently offline Robert EmsbachFriend
Messages: 186
Registered: October 2011
Location: Singapore
Senior Member

Please see
http://help.eclipse.org/mars/topic/org.eclipse.stardust.docs.installation/html/releasenotes/releasenotes_3.0.1.html?resultof=%22bsf%22%20#jdk8
on how to create this jar.

Rob
Re: [File missing] Camel Route to Send and Receive Email [message #1709264 is a reply to message #1709223] Fri, 25 September 2015 12:34 Go to previous message
Ajay KS is currently offline Ajay KSFriend
Messages: 21
Registered: September 2015
Junior Member
Hi Rob,

I created the bsf-engine jar using the steps mentioned in the link.
However, I am still getting this error : java.lang.IllegalArgumentException: No script engine could be created for: rhino-nonjdk

Could you please suggest.

Regards
Ajay
Previous Topic:JSON string to structured data type conversion.
Next Topic:Unmarshalling nested or complex data elements in JAVA Web services
Goto Forum:
  


Current Time: Mon Nov 19 06:55:10 GMT 2018

Powered by FUDForum. Page generated in 0.03691 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top