-
1. Re: Only the default "Evaluation" process is shown in the process list after restarting jBPM 5.2
yanhuixie Mar 26, 2012 4:56 AM (in response to stmarci)1 of 1 people found this helpfulShould the text(excerpt from UserGuide 5.2, Chapter 15) below helps?
-----------------------------
The current integration of jBPM-console with Guvnor uses the following conventions to find the artefacts it needs:
- jBPM-console looks up artefacts from all available Guvnor packages (it does not look for assets in the Global Area). You can alternatively modify the guvnor.packages property in jBPM.console.properties to limit the lookup to only the packages you need, for example: guvnor.packages=defaultPackage, myPackageA, myPackageB
- A process should define the correct package name attribute, which needs to match the Guvnor package name it belongs to (otherwise you won't be able to build your package in Guvnor)
- Don't forget to build all of your packages in Guvnor before trying to view available processes in the console. Otherwise jBPM-console will not be able to retrieve the pkg from Guvnor.
- Currently, the console will load the process definitions the first time the list of processes is requested in the console. At this point, automatic updating from Guvnor when the package is rebuilt is turned off by default, so you will have to either configure this or restart the application server to get the latest versions.
- Task forms that should be associated with a specific process definition should have the name "{processDefinitionId}.ftl" or "{processDefinitionId}-taskform.ftl"
- Task forms for a specific human task should have the name "{taskName}.ftl" or "{taskName}-taskform.ftl"
- The process diagram for a specific process should have the name "{processDefinitionId}-image.png"
- By default jBPM-console looks up your Guvnor instance under http://localhost:8080/drools-guvnor. To change this, locate jbpm.console.properties and modify the guvnor.protocol, guvnor.host, and guvnor.subdomain property values as needed
- jBPM-console communicates with Guvnor via its REST api. The default connect and read timeouts for this communication are set to 10 seconds via the guvnor.connect.timeout, and guvnor.read.timeout properties in jbpm.console.properties. You can edit values of these properties to set your specific timeout values (in milliseconds)
- If you are using Guvnor with JAAS authentication enabled, jBPM-console uses by default admin/admin credentials. To change this information again locate jbpm.console.properties and change the guvnor.usr, and guvnor.pwd property values.
If you follow these rules, your processes, forms and images should show up without any issues in the jBPM-console.
-
2. Re: Only the default "Evaluation" process is shown in the process list after restarting jBPM 5.2
stmarci Mar 27, 2012 4:44 AM (in response to yanhuixie)Thank you for your answer! I would like to know more about this statement:
Currently, the console will load the process definitions the first time the list of processes is requested in the console. At this point, automatic updating from Guvnor when the package is rebuilt is turned off by default, so you will have to either configure this or restart the application server to get the latest versions.
How do I configure jbpm-console to automatically update when I build a package?
Thank you very much!
Best regards,
Márton
-
3. Re: Only the default "Evaluation" process is shown in the process list after restarting jBPM 5.2
stmarci Mar 28, 2012 3:18 AM (in response to stmarci)I managed to figure out the problem. My package contained a POJO jar model which seems to poison the entire package and as a result none of my process defintions are available in the jbpm console.
The jar contained multiple features such as generics and one of the classes (called 'Field') was abstract. I reduced the jar to only contain the Field class and removed the "abstract" modifier. Still no result. The class looks like this:
package com.companyname.secretproject.common
import java.io.Serializable;
import org.json.simple.JSONAware;
import org.json.simple.JSONObject;
public class Field implements JSONAware, Serializable
{
private static final long serialVersionUID = 8501917889951368463L;
public static class Params
{
public static final String DISPLAYABLE_NAME = "displayableName";
public static final String NAME = "name";
public static final String READONLY = "readonly";
public static final String REQUIRED = "required";
public static final String TYPE = "type";
}
protected String name;
protected String displayableName;
protected boolean readonly;
protected boolean required;
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getDisplayableName()
{
return displayableName;
}
public void setDisplayableName(String displayableName)
{
this.displayableName = displayableName;
}
public boolean getReadonly()
{
return readonly;
}
public void setReadonly(boolean readonly)
{
this.readonly = readonly;
}
public boolean getRequired()
{
return required;
}
public void setRequired(boolean required)
{
this.required = required;
}
@SuppressWarnings("unchecked")
public JSONObject toJSONObject()
{
JSONObject o = new JSONObject();
o.put(Params.DISPLAYABLE_NAME, displayableName);
o.put(Params.NAME, name);
o.put(Params.READONLY, readonly);
o.put(Params.REQUIRED, required);
o.put(Params.TYPE, this.getClass().getSimpleName());
return o;
}
@Override
public String toJSONString()
{
return this.toJSONObject().toJSONString();
}
}
My only idea is that the class name "Field" is somewhat reserved or the "problem" is that it implements an interface other than Serializable.
I would appreciate if someone could collect all the requirements for writing a domain specific POJO model.
Best regards,
Márton
-
4. Re: Only the default "Evaluation" process is shown in the process list after restarting jBPM 5.2
stmarci Mar 29, 2012 10:36 AM (in response to stmarci)Further information:
If you want to upload a pojo model defintion you need to add it to the WEB-INF/lib directory of gwt-console-server.war as well. If you don't, the console server application won't be able to deserialize the package (KnowledgePackageImpl) and will throw a RuntimeException which you won't see in the logs.
The only result is going to be a console with empty process definition list.