JBoss Community

Re: Only the default "Evaluation" process is shown in the process list after restarting jBPM 5.2

created by Márton Steierlein in jBPM - View the full discussion

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

Reply to this message by going to Community

Start a new discussion in jBPM at Community