Create instante Problem

Frans Thamura <[email protected]>
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <[email protected]>
Greeta,

take a look of my error. I cannot create instante, because problem to 
finding packageid, and processid.

I change your code become static.

and this is my object that call your method..

         
WorkflowManager.createProcessAndUpdateVariables("ComplexWRDs","testWRD",variable);


can give me more inspiration :)

Frans





I use your code, this is my script


package org.blueoxygen.shark.test;
   
import org.blueoxygen.cimande.wfms.WorkflowManager;
import org.enhydra.shark.api.client.wfservice.SharkConnection;
import java.util.*;

/**
 * Does nothing more than start the Shark engine.
 */
public class Instantiate
{
   public static void main(String[] args)
   {
      try
      {
                 
         String vValue;
        
         
WorkflowManager.initSingle("D:\\cimande\\jakarta-tomcat-5.5.4\\webapps\\shark");
        
         SharkConnection sConn = WorkflowManager.connect("dina","dina");
         vValue="testWRD#1#ComplexWRDs";
         WorkflowManager.processStart(vValue);
         Map variable = new HashMap();
         variable.put("participantid","13");
         
WorkflowManager.createProcessAndUpdateVariables("ComplexWRDs","testWRD",variable);
         //wfmgr.assignmentAccept(sConn,"101_testWRD_ComplexWRDs");
         
//WorkflowManager.activityComplete(sConn,"302_401_testWRD_ComplexWRDs_add_participant");
        
         WorkflowManager.disconnect(sConn);
       
      }
      catch (Exception e)
      {
         // It's not like I am going to revive the thing if it crashes...
         e.printStackTrace();
      }
   }
}

and my error are:

I got error:


2005-07-25 22:48:47,171: SharkConnectionImpl -> User dina is logged on
== Frans Debugger ==
== processStart(String mgrName) ==
== mgrName:testWRD#1#ComplexWRDs
== ==================
Manager Name:testWRD#1#ComplexWRDs
#_isProcessRunning_# (testWRD, ComplexWRDs)
2005-07-25 22:48:47,250: ExecutionAdmin -> User admin with connection 
key 2 is logged on
2005-07-25 22:48:47,390: ExecutionAdmin -> User admin with connection 
key 2 is logged off
2005-07-25 22:48:47,390: SharkConnectionImpl -> User admin is logged on
2005-07-25 22:48:47,406: Rollback of Shark transaction happened.
java.lang.NullPointerException
    at 
org.enhydra.shark.repositorypersistence.DODSRepositoryPersistenceManager.getCurrentVersion(DODSRepositoryPersistenceManager.java:190)
    at 
org.enhydra.shark.SharkUtilities.getCurrentPkgVersion(SharkUtilities.java:2151)
    at 
org.enhydra.shark.SharkConnectionImpl.createProcess(SharkConnectionImpl.java:201)
    at 
org.enhydra.shark.SharkConnectionImpl.createProcess(SharkConnectionImpl.java:178)
    at 
org.blueoxygen.cimande.wfms.WorkflowManager.processCreate(WorkflowManager.java:655)
    at 
org.blueoxygen.cimande.wfms.WorkflowManager.createProcessAndUpdateVariables(WorkflowManager.java:631)
    at org.blueoxygen.shark.test.Instantiate.main(Instantiate.java:26)
org.enhydra.shark.api.internal.repositorypersistence.RepositoryException: 
No xpdl with Id=ComplexWRDs
message-footer.txt (text/plain, 271 B)
--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.