Hi Kukeltje,

                  My par file contains below contents::

  | gpd.xml
  | processdefinition.xml
  | processimage.xml
  | 
  | 
  |                 I have created a new process project using eclipse plugin, 
which created by default sample.par folder with above contents. Later I 
modified the processdefinition.xml file, adjusted the image [ as boxes are 
overlapped], checked whether processimage.jsp reflects my processdefinition or 
not. If everyting is fine then compressed sample.par folder and renamed it to 
testPdef1.par. 
  | 
  |                 Iam loading this par file through a jsp page
  | 
  |   | <%@ page language="java" %>
  |   | <%@ page 
import="org.jbpm.graph.def.*,org.jbpm.graph.exe.*,org.jbpm.taskmgmt.exe.*,com.sample.workflow.bean.*,java.util.*,org.jbpm.db.*,com.sample.workflow.context.*,java.io.*"
 %>
  |   | 
  |   | <%
  |   |  UserBean objUserBean = (UserBean)  session.getAttribute("userBean");
  |   |  if(objUserBean == null)
  |   |  {
  |   | %>
  |   |    <jsp:forward page="demo1Login.jsp"/>
  |   |  <%
  |   |  }
  |   | 
  |   |  String processDefPARPath = request.getParameter("xmlPathProcessDef");
  |   |  if(processDefPARPath == null || processDefPARPath.trim().equals(""))
  |   |  {
  |   |  %>
  |   |  
  |   |    <center>Please select process definition path to continue .....
  |   |    <p><a href="demo1Home.jsp">Home</a></center>
  |   | <%
  |   |    return;
  |   |  }
  |   | %>
  |   | 
  |   | <%
  |   |   // Get process definition
  |   |    ProcessDefinition processDefinition = null;
  |   |    try
  |   |         {
  |   |           processDefinition = 
ProcessDefinition.parseParResource(processDefPARPath);
  |   |         }
  |   |         catch(Exception fne)
  |   |         {
  |   | %>
  |   |    <p><font color='red'>Error:: <%= fne.getMessage() %></font>
  |   |    <p><center>Failed to start process.
  |   |    <p><a href="demo1Home.jsp">Home</a></center>
  |   | <%
  |   |           fne.printStackTrace();
  |   |        return;
  |   |         }
  |   | 
  |   |     // Save process definition in db.
  |   |         JbpmSession jbpmSession = 
Context.getPersistenceContext().getJbpmSession();
  |   | 
  |   |     GraphSession graphSession = jbpmSession.getGraphSession();
  |   | 
  |   |     graphSession.saveProcessDefinition(processDefinition);
  |   | %>
  |   | 
  |   |    <center>Started process with Id, <b><%= processDefinition.getId() 
%></b> successfully
  |   |    <p><a href="demo1Home.jsp">Home</a></center>
  |   | 
  | 
  |        This way Iam able to store par file in database. Later I can get the 
processdefinitions with graphSession.getLatestProcessDefinitions() method.
  | 
  |        If I try to deploy another/modified processdefinition with the same 
name as that of already existing process definition[old one], its getting 
loaded successfuly. But while fetching process definition 
list[graphSession.getLatestProcessDefinitions()], instead of modified process 
definition, old process definition is fetched. 
  |      

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

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


-------------------------------------------------------
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to