[JBoss jBPM] - How can I add forms?
by mailinator
Hello,
what is the best way to add customized forms to a jbpm process?
So far, I'm trying to build my forms as a java UI, but I've run into problems. I went along the TaskAssignment example from the jbpm.3_BRANCH_3_1 project that is included in the starters kit. The idea is that the AssignmentHandler calls my form, user enters data and the data is given back to the process.
Since I wanted to use a diagram I built with the designer, I used the created gpd.xml file when creating the ProcessDefinition. It seems the parseXMLReader method skips the 'to' attributes of the xml file because I get a warning for each transition, although the 'to's appear correctly in the xml-file.
At the end it also tells me that "token 'Token(/)' can't be signalled cause it is currently not positioned in a node". I used the same code as in the example, except the part mentioned above.
Unlike the example, I'm not doing it as a JUnit TestCase, but after a quick look at the definition of TestCase that shouldn't lead to the mentioned problems.
Any help would be appreciated.
CU
FLo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967177#3967177
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967177
19 years, 8 months
[EJB 3.0] - EntityManager not mounted under JNDI despite config
by aidan_b5
Despite having the following persistence.xml:
<persistence-unit name="objentity">
| <jta-data-source>java:/ShipdbDS</jta-data-source>
| <properties>
| <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
| <property name="hibernate.hbm2ddl.auto" value="update"/>
| <property name="jboss.entity.manager.jndi.name" value="java:/Objentity"/>
| </properties>
| </persistence-unit>
when i do a jndi lookup for the manager thus:
InitialContext ic = new InitialContext();
| EntityManager em = (EntityManager) ic.lookup("Objentity");
I get an 'Objentity not bound' Exception. I've checked the JMX console and the persistence units are bound....but there's no sign of the entity manager.
I'm using jboss 4.03 with EJBRC6......this is fairly urgent so help definately appreciated!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967173#3967173
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967173
19 years, 8 months
[JBoss Seam] - Re: Seam component as converter with EntityManager/Persisten
by bfo81
Well, those converter beans are really weird...
In the getAsObject method you might load entities over and over via the em. So I decided to cache them (I even have a method to check if something is dirty).
Well this cache is a inner class with a HashMap. It works well, entities get filled into the cache and retrieved from there. BUT: Only during one page invocation.
As soon as I enter a page later, the cache is empty... or let's say, it's even a different cache (I logged the hashcode). This is the same problem like with the EntityManager. It gets lost after first invocation. And the funny thing: I even don't know how it's being reconstructed. I added a debug message to the cache's constructor, but it gets only called once. The next times the cache gets instantiated it overrides my constructor. This is extremely weird ^^.
However, to draw the conclusion. If you have a converter with some kind of property
...
| @Name("theConverter")
| ...
| public class TheConverter ... {
|
| private SomeThing something = new SomeThing();
|
| public Object getAsObject(...) {
| use(something);
| ...
"something" will be a different instance for every page invocation. If you want it to be always the same, use the Singleton pattern, so that the property class manages its instance itself.
| ...
| //use(something); //Not like this!
| use(SomeThing.instance()); //But that way!
| public class SomeThing implements Serializable {
| private static SomeThing instance;
| public static SomeThing instance() {
| if (instance == null)
| instance = new SomeThing();
| return instance;
| }
| ....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967168#3967168
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967168
19 years, 8 months