0 Replies Latest reply on Sep 14, 2015 11:03 AM by Adem Şeker

    Remote Java API using in Custom Work Item Handler

    Adem Şeker Newbie

      i am creating a custom work item handler which send a complete event to releated user task. it is working in eclipse project but on server it is not working. error is

       

      2015-09-13 03:44:03,436 WARN  (EJB default - 6) Error during command jbpm.custom.workitems.completeTaskWorkItemhandler execution org/kie/services/client/api/RemoteRuntimeEngineFactory
      2015-09-13 03:44:03,446 WARN  (EJB default - 6) trimming stacktrace as it's too long : 8074
      
      

       

      my java code like follow.

       

      RuntimeEngine engine = RemoteRuntimeEngineFactory.newRestBuilder()
        .addUrl(new URL(ListenEmail.JBPM_HOST))
        .addProcessInstanceId(processId)
        .addUserName(ListenEmail.JBPM_ADMIN_USER)
        .addPassword(ListenEmail.JBPM_ADMIN_USER_PASSS)
        .build();
      
      TaskService taskService = engine.getTaskService();
      
      

       

      Libraries are

       

      import org.kie.api.runtime.manager.RuntimeEngine;
      import org.kie.services.client.api.RemoteRuntimeEngineFactory;
      
      

       

      pom.xml

       

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>jbpm.custom</groupId>
        <artifactId>workitems</artifactId>
        <version>6.0.0-SNAPSHOT</version>
      <dependencies>
        <dependency>
        <groupId>org.jbpm</groupId>
        <artifactId>jbpm-flow</artifactId>
        <version>${jbpm.version}</version>
        </dependency>
        <dependency>
        <groupId>com.sun.mail</groupId>
        <artifactId>javax.mail</artifactId>
        <version>1.5.4</version>
        </dependency>
        <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        </dependency>
        <dependency>
        <groupId>org.kie.remote</groupId>
        <artifactId>kie-remote-client</artifactId>
        <version>${jbpm.version}</version>
        </dependency>
      </dependencies>
      </project>
      
      

       

      jBPM version 6.2.0.Final

      Wldfly 8.1.0.Final

       

      Please could you advise ?

      Thank you