Hi All, Got it figured out. The External Class to be invoked should be built and the .jar should be added to the repository/components/libs folder before running or creating a instance of the Java Service Task or before creating a process instance of the deployment. Since it was a tough cookie in my perspective to crack, i blogged on it for future reference. You can find it at [1].
[1] - https://shivabalachandran.wordpress.com/2015/02/09/java-service-task-acitviti-java-implementation/ Thank you. Regards Shiva Balachandran On Mon, Feb 9, 2015 at 5:47 PM, Shiva Balachandran <[email protected]> wrote: > Hi Firzhan, > > Thank you for those reference articles. It was able to create the BPMN, > Java class file and the test file. When i run the BPMN File, as in once i > deploy it and try to start the process instance, i get an error. > {"errorMessage":"couldn't instantiate class > artifacts.bpmn.SampleServiceTask","statusCode":500}. > > I believe i have packaged the files incorrectly. Is there any article to > elaborate on how to create the bar file/ package the java class file along > with the bar file? I've researched on google and some of the articles don't > address this. Some have mentioned on placing the Java Class.jar file in the > WEB-INF/lib folder but this is when you are using tomcat and > acitiviti-explorer. > > Any insights on how to deploy this package with the Java class would be > helpful. > > Thank you. > > Regards > Shiva Balachandran > > On Mon, Feb 9, 2015 at 12:21 PM, Firzhan Naqash <[email protected]> wrote: > >> Hi Shiva, >> >> I referred the following articles to learn about JavaServiceTasks [1] [2]. >> >> For further reference you can go through the chapter 4 of the book >> "Activiti in Action". >> >> [1] >> http://www.jorambarrez.be/blog/2012/10/25/call-a-service-in-a-service-tas/ >> [2] http://www.javabeat.net/developing-the-business-logic-in-activiti/ >> >> Regards, >> Firzhan >> >> On Mon, Feb 9, 2015 at 12:05 PM, Shiva Balachandran <[email protected]> >> wrote: >> >>> Hi, >>> >>> I have been assigned to write some specific tests in order to test the >>> functionality of the BPMN module in BPS. im at a roadblock, trying to >>> implement a JavaServiceTask. >>> >>> I have looked for online tutorials and samples, but unable to find any >>> help. Does anyone have any resources or blogs which may be able to help me >>> to implement a sample, to test the java service task in Acitiviti through >>> java code. >>> >>> Thank you. >>> >>> Regards, >>> -- >>> Shiva Balachandran >>> Software Engineer >>> WSO2 Inc. >>> >>> Mobile - +94 774445788 >>> Blog - https://shivabalachandran.wordpress.com/ >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> > > > -- > Shiva Balachandran > Software Engineer > WSO2 Inc. > > Mobile - +94 774445788 > Blog - https://shivabalachandran.wordpress.com/ > -- Shiva Balachandran Software Engineer WSO2 Inc. Mobile - +94 774445788 Blog - https://shivabalachandran.wordpress.com/
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
