[jboss-user] [JBoss jBPM] - Re: Tutorial or guide to create instances of processes in ja

Fornachari do-not-reply at jboss.com
Tue May 20 17:34:11 EDT 2008


Hello!

I am having the same difficulty that mikool.
I want to do a client application to make an instance of a process.
I did this, using this hands on http://wiki.jboss.org/wiki/_Files/Main/jbpm3.2.2-handsontutorial.pdf, but when I do a new instance of my process, I can't see the open tasks of my process through the jBPM Admnistrator WebConsole. Is it possible to start a process through a Java Application and complete the tasks using the jBPM WebConsole?
I am using the jBPM version 3.2.2 and my application code are below:


  | 
  | import org.jbpm.graph.def.ProcessDefinition;
  | import org.jbpm.graph.exe.ProcessInstance;
  | import org.jbpm.graph.exe.Token;
  | 
  | public class ClientApp 
  | {
  | 	public static void main(String[] args) 
  | 	{
  | 		try
  | 		{
  | 			ProcessDefinition definition = ProcessDefinition.parseXmlResource("request/processdefinition.xml");
  | 		
  | 			ProcessInstance instance = new ProcessInstance(definition);
  | 			instance.getRootToken().getNode().getName();
  | 		  
  | 			instance.getContextInstance().setVariable("infoDoc", "C:\\Document.pdf");
  | 				
  | 			Token token = instance.getRootToken();  
  | 			token.signal();
  | 			
  | 			String infoDoc = (String)instance.getContextInstance().getVariable("infoDoc");
  | 			System.out.println("*************************** Document Information: " + dadosDoc);
  | 			
  | 			instance.hasEnded();
  | 		}
  | 		catch (Exception ex)
  | 		{
  | 			System.out.println("------>ERROR: "+ex.getMessage());
  | 		}
  | 		  	  
  | 	}
  | }

Any help would be appreciated.
Thank you in advance!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4152148#4152148

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4152148



More information about the jboss-user mailing list