[JBoss jBPM] - jpdl-3.2.Beta2: how to access variable from task form in jPD
by avbentem
For a demo I'm trying to extend the websale example with a simple condition, but am getting to feel stupid as I cannot find a way to access the value of 'quantity'...
The variable has been defined in the forms, such as form.create.xhtml, just as provided in the sample code:
<h:inputText
| value="#{var['quantity']}"
| converter="javax.faces.Integer"
| converterMessage="The quantity must be numeric."
| validatorMessage="The quantity must be at least 1.">
| <f:validateLongRange minimum="1"/>
| </h:inputText>
In procesdefinition.xml I'm trying:
<decision name="Large quantity?">
| <transition name="No" to="ship item">
| </transition>
| <transition name="Yes" to="Make appointment">
| <condition expression="#{contextInstance.variables['quantity'] gt 10}">
| </condition>
| </transition>
| </decision>
Of course I tried many other ways, including "#{var['quantity'] gt 10}", CDATA, and even comparing string values. No matter what, I keep getting:
org.jbpm.graph.node.Decision
| decision didn't select transition, taking default Transition(No)
When also adding this specific variable to a controller then the value as entered in the task form (jbpm-console) is not preserved (not shown in the next forms), so that does not seem to be the correct way to do things either:
<start-state name="Create new web sale order">
| <task swimlane="buyer" >
| <controller>
| <variable name="quantity" mapped-name="quantity"></variable>
| </controller>
| </task>
| <transition to="Evaluate web order" />
| </start-state>
I know I can delegate the decision to a Java class, but if I understand correctly than the above should really not be too hard to achieve at all, right...?
Thanks for any hints!
Arjan.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017656#4017656
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017656
19Â years, 2Â months
[EJB 3.0] - Re: Retrieve retrieve Entity Class mapping from jboss
by florian79
I created a statless Sessionbean as followed:
| @Stateless
| public class BaseSession implements BaseSessionRemote, BaseSessionLocal
| {
|
| @Resource SessionContext context;
| @PersistenceContext(unitName="myName") private EntityManager entityManager;
|
| public Map<String,EntityPersister> getAllClassMetadata()
| {
| Map<String,EntityPersister> metadata = null;
| try
| {
| HibernateEntityManager hibernateEntityManager = (HibernateEntityManager)entityManager.getDelegate();
| metadata = hibernateEntityManager.getSession().getSessionFactory().getAllClassMetadata();
| }
| catch(ClassCastException e)
| {
| LoggerImpl.getInstance().log(Logger.iLOGG_ERROR, this, e);
| metadata = new HashMap<String,EntityPersister>();
| }
| return metadata;
| }
| }
|
|
and then iterate over all maped entities:
| Map m = myPortalSession.getEntityManager().getAllClassMetadata();
| Set<Map.Entry> s = m.entrySet();
| for (Map.Entry e : s)
| {
| System.out.println(e.getKey() + "--->" + e.getValue());
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017649#4017649
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017649
19Â years, 2Â months
[JBoss Seam] - Re: Seam Email - IllegalStateException: No Factories configu
by petemuir
I agree its classloading related. As I said, I can take a look, but i'm not convinced I would have any more luck than you!
So, this is how I lay it out:
1) Use the default JBoss (4.0.5.GA) install (so myfaces in jsf-libs)
2) Put everything I can, especially the jars that provide UI (so jsf-facelets, trinidad, seam-ui, seam-mail, seam-pdf - specifically anything with a faces-config.xml in it I suppose) in the war/WEB-INF/lib
3) Put all the rest in the ear and reference from application.xml (so now I have drools, jbpm, el, jboss-seam.jar and then internal shared stuff there)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017642#4017642
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017642
19Â years, 2Â months