-
1. Re: how to call tuscany sca service from script task
jsvitak Nov 15, 2012 7:26 PM (in response to keymaker19)Hi,
I recommend you to use service task for calling services. Script task blocks engine execution and it's designed only for small pieces of code. Better solution is to write own work item definition for tuscany and corresponding work item handler class which implements service invocation.
-
2. Re: how to call tuscany sca service from script task
keymaker19 Nov 16, 2012 8:29 AM (in response to jsvitak)i know that is better. I´m trying to experiment the two ways. please tellme how i can do that with script task.
Greetings
-
3. Re: how to call tuscany sca service from script task
jsvitak Nov 18, 2012 11:17 AM (in response to keymaker19)I think that you've already described it. To compile a package in Guvnor you have to add a .jar file as a model and also import necessary classes in process properties. The same applies for your application, you have to make sure that necessary classes are on the classpath. But the problem is with the script task itself. It uses Eclipse compiler for Java by default, but this compiler cannot match standard javac compiler. You can use other small compiler like Janino, but this simple compiler does not support generic data types for example. So the script tasks are only for small pieces of code, not for complex code full of all Java features. Not to mention that script tasks block engine execution. Earlier I tried to upload a large .jar file as a model and invoke complex script task, but in the end without success.
Were you able to compile the package which contains your business process? If your script task doesn't execute, please provide a test case, it can be a bug.