3 Replies Latest reply on Nov 18, 2012 11:17 AM by Jiri Svitak

    how to call tuscany sca service from script task

    Luis Victor Newbie

      hi everybody. I'm trying to call a tuscany sca service from a script task. I added the tuscany-sca-all library as a model in guvnor and put the import but the script doesn't execute. Anybody did this sometime? Thanks

        • 1. Re: how to call tuscany sca service from script task
          Jiri Svitak Novice

          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
            Luis Victor Newbie

            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
              Jiri Svitak Novice

              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.