Hi all,

My configuration:
jbpm-starters-kit-3.1
Windows XP

How to retrieve information from jBPM (Different VM)
Would you like to tell me if there is any available API?

Also, I would like to know if I used MySQL as jBPM's database, will the jBPM 
fail of some features?

Last question, what is the reason of the below code always return same output?

  | public static final String CONFIG_FILE = "jbpm.cfg.xml";
  | public static final String ACTOR_ID = "ernie";
  | public static final String PAR_RESOURCE = "simple.par";
  | 
  | public static void main(String[] args) {
  |   // Configure jBPM by passing configure file's resource path
  |   JbpmConfiguration lJbpmConfiguration = 
JbpmConfiguration.getInstance(CONFIG_FILE);
  |   // Create database schema into database
  |   // Comment the create schema will throw exception >.<
  |   lJbpmConfiguration.createSchema();
  |   // Start jBPM server
  |   JbpmContext lJbpmContext = lJbpmConfiguration.createJbpmContext();
  |   try {
  |     // Deploy process
  |     
lJbpmContext.deployProcessDefinition(ProcessDefinition.parseParResource(PAR_RESOURCE));
  |     // Login user
  |     lJbpmContext.setActorId(ACTOR_ID);
  |     // Retrieve task list
  |     List lTaskList = lJbpmContext.getTaskList();
  |     System.out.println("Task: " + lTaskList.size());
  |     for (int i = 0; i < lTaskList.size(); i++) {
  |       Task lTask = (Task) lTaskList.get(i);
  |       System.out.println("- " + lTask.getName());
  |     }
  |     // Retrieve process list
  |     List lProcessList = 
lJbpmContext.getGraphSession().findAllProcessDefinitions();
  |     System.out.println("Process: " + lProcessList.size());
  |     for (int i = 0; i < lProcessList.size(); i++) {
  |       ProcessDefinition lProcessDefinition = (ProcessDefinition) 
lProcessList.get(i);
  |       System.out.println("- " + lProcessDefinition.getName());
  |       // Retrieve process version list
  |       List lVersionList = 
lJbpmContext.getGraphSession().findAllProcessDefinitionVersions(
  |           lProcessDefinition.getName());
  |       System.out.println("> Version: " + lVersionList.size());
  |       for (int j = 0; j < lVersionList.size(); j++) {
  |         System.out.println("-- " + lVersionList.get(j));
  |       }
  |     }
  |   } finally {
  |     lJbpmContext.close();
  |   }
  | }
  | 

The output

  | Task: 0
  | Process: 1
  | - simple
  | > Version: 1
  | -- ProcessDefinition(simple)
  | 

Any reply are welcome and thank you very much.
Roy

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

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to