[JBoss jBPM] - Can I dynamically configure workflow in a thin-client enviro
by tomnicholls
I'm about to evaluate jBPM for our project, and would be grateful for a brief answer to a couple of questions:
Can business rules/workflow be configured at runtime? And can this be done from a web browser? This would allow our customers to assign their own workflow definitions.
If the answer is no, I am thinking that we could configure a number of possible workflows and allow customers to purchase the ability to use them - perhaps by somehow assigning each piece of workflow to a particular "role" and allowing roles to be assigned at runtime (if this is allowed). Would this make sense?
We are looking to create a "building block" application, where customers purchase from a choice of workflows and these are instantaneously assigned.
Thanks in advance to anyone who can help - it would be particularly good if someone could point out where to find relevant documentation on this.
Tom
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4101717#4101717
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4101717
18 years, 5 months
[JBoss Seam] - conversation???
by constantin.cash
Instance of User will be saved twice,
service:
@Stateful
| @Name("inseract")
| public class InserAct implements InserActI{
| @Logger private Log log;
|
| @In private FacesMessages facesMessages;
|
| @In private EntityManager entityManager;
|
| // @In private Context sessionContext;
|
| @In(required=false) Artikel artikel;
|
| @In private Identity identity;
|
|
| private Kategorie kat;
|
| private Kategorie ukat;
|
| private List<Kategorie> ukats;
|
| private byte[] data;
| private String contentType;
| private String fileName;
| private String title;
| private int size;
|
|
| public String weiter(){
| return "/fupload";
| }
|
| @Remove @Destroy
| public void remove(){
|
| }
|
| //@End
| public String upload() {
| Img img = new Img();
| img.setEdata(data);
| img.setEtype(contentType);
| img.setEsize(size);
|
| User usr = null;
| try{
| usr = (User) entityManager.createQuery("select u from User as u where u.email = :email")
| .setParameter("email",identity.getUsername())
| .getSingleResult();
|
| artikel.getImgs().add(img);
| img.setArt(artikel);
| artikel.setUsr(usr);
| artikel.setKat(kat);
|
| //entityManager.merge(artikel);
|
|
| usr.getArts().add(artikel);
| artikel = null;
| entityManager.merge(usr);
| usr =null;
| return "/upokay";
| }catch(Exception ex){
| log.error(ex);
| return null;
| }
|
|
| }
view:
| <h:form>
| <s:validateAll>
| <table width="800px" cellspacing="3" cellpadding="3">
| <tr style="margin:0px;padding:0px 0px">
| <td style="margin:0px;padding:0px 0px">Titel:</td>
| <td valign="top" class="star">
| <h:inputText id="tit" styleClass="txt" size="30" maxlength="100" value="#{artikel.titel}" required="true"/> *
| <h:message for="tit" styleClass="errors"/>
| </td>
| </tr>
| <tr>
|
| <td> Kategorie:</td>
| <td valign="top" class="star">
| <a4j:region id="rgs" renderRegionOnly="false">
| <h:selectOneMenu value="#{inseract.kat}" >
| <s:selectItems value="#{sservice.katLIST}" required="true" var="kat" label="#{messages[kat.rkey]}" noSelectionLabel="Bitte wählen..."/>
| <a4j:support event="onchange" reRender="ukats" >
| <s:conversationPropagation type="join" />
| </a4j:support>
| </h:selectOneMenu>
| <h:message for="her" styleClass="errors"/>
| </a4j:region> *
| </td>
| </tr>
| <!--
| <tr>
|
| <td> Unterkategorie:</td>
| <td valign="top" class="star">
| <s:span id="ukats">
| <h:selectOneMenu id="rgs1" required="true" value="#{inseract.ukat}" >
| <s:selectItems value="#{inseract.ukats}" var="kat" label="#{messages[kat.rkey]}" noSelectionLabel="Bitte wählen..."/>
| </h:selectOneMenu>
| <h:message for="rgs1" styleClass="errors"/>
| </s:span> *
| </td>
| </tr>
|
| -->
|
|
|
| <tr>
|
| <td> Hersteller:</td>
| <td valign="top" class="star">
| <h:inputText id="her" styleClass="txt" size="30" maxlength="100" value="#{artikel.hersteller}" required="true"/> *
| <h:message for="her" styleClass="errors"/>
| </td>
| </tr>
|
|
| <tr>
| <td valign="top" >Model: </td>
|
| <td valign="top" class="star">
|
| <h:inputText id="art" styleClass="txt" size="30" maxlength="100" value="#{artikel.model}" required="true"/> *
| <h:message for="art" styleClass="errors"/>
| </td>
| </tr>
| <tr>
|
| ...
|
| <tr>
| <td colspan="2" align="left">
| <p> <h:commandButton styleClass="button" value="weiter" action="#{inseract.weiter()}" reRender="frm,msg" /></p></td>
| </tr>
|
model:
| @Entity
| @Name("usr")
| @Table(name="users")
| public class User implements java.io.Serializable {
|
| @Id @GeneratedValue(strategy = GenerationType.AUTO)
| private Long id;
|
| @NotNull private int anrede;
|
| @NotNull private String firma;
| private String str;
| private String plz;
| private String ort;
|
| @Email @NotNull private String email;
|
| @NotNull @Length(min=6, max=30) private String passwort;
|
| @OneToMany(mappedBy="usr",cascade = CascadeType.ALL)
| private List<Artikel> arts;
|
|
| @Entity
| @Name("artikel")
| @Table(name="artikel")
| public class Artikel {
| @Id @GeneratedValue(strategy = GenerationType.AUTO)
| private Long id;
|
| private String hersteller;
|
| private String typ;
|
| private String model;
|
| private double preis;
|
| private String titel;
|
| private double gewicht;
|
| @NotNull @ManyToOne
| private User usr;
|
| @NotNull @ManyToOne
| private Kategorie kat;
|
| @Length(max=1000)
| private String beschreibung;
|
| private int bs;
|
| private String standort;
|
| private boolean activ;
|
| @OneToMany(mappedBy="art",cascade = CascadeType.ALL)
| private List<Img> imgs;
|
| @Entity
| @Name("image")
| @Table(name="images")
| public class Img {
|
| @Id @GeneratedValue(strategy = GenerationType.AUTO)
| private Long id;
|
| @Lob @Basic(fetch=FetchType.LAZY)
| private byte[] edata;
|
| @NotNull @ManyToOne
| private Artikel art;
|
| private String etype;
|
| private int esize;
|
| @Override
if change the lines in the service to
| public String upload() {
| Img img = new Img();
| img.setEdata(data);
| img.setEtype(contentType);
| img.setEsize(size);
|
| User usr = null;
| try{
| usr = (User) entityManager.createQuery("select u from User as u where u.email = :email")
| .setParameter("email",identity.getUsername())
| .getSingleResult();
|
| artikel.getImgs().add(img);
| img.setArt(artikel);
| artikel.setUsr(usr);
| artikel.setKat(kat);
|
| entityManager.merge(artikel);
|
|
| //usr.getArts().add(artikel);
| artikel = null;
| //entityManager.merge(usr);
| //usr =null;
| return "/upokay";
| }catch(Exception ex){
| log.error(ex);
| return null;
| }
|
|
| }
it does work correctly, if i make away artikel=null, the instance of artiekel and img will saved twice,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4101710#4101710
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4101710
18 years, 5 months
Problem with ForceRender listener
by Alexander Kovachev
I used when I include a JSP with <a4j:include
viewId="some.jsp" /> and then inside the jsp I use ForceRender
listener in datatable to dynamically render a single row of the table I
get the following exception:
Code:
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
java.lang.IllegalArgumentException: Illegal view Id for build AJAX Action URL: parentOfSome.jsp
at org.ajax4jsf.framework.ajax.AjaxContext.getAjaxActionURL(AjaxContext.java:795)
at org.ajax4jsf.framework.renderer.AjaxRendererUtils.buildEventOptions(AjaxRendererUtils.java:240)
at org.ajax4jsf.framework.renderer.AjaxRendererUtils.buildOnEvent(AjaxRendererUtils.java:171)
at org.ajax4jsf.framework.renderer.AjaxRendererUtils.buildOnClick(AjaxRendererUtils.java:131)
at org.ajax4jsf.renderkit.AjaxCommandRendererBase.getOnClick(AjaxCommandRendererBase.java:66)
at org.ajax4jsf.renderkit.html.CommandLinkRenderer.doEncodeBegin(CommandLinkRenderer.java:97)
at org.ajax4jsf.renderkit.html.CommandLinkRenderer.doEncodeBegin(CommandLinkRenderer.java:88)
at org.ajax4jsf.framework.renderer.RendererBase.encodeBegin(RendererBase.java:101)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:515)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:453)
....
I guess the problem has to do something with the aj4:include
component cause it works fine if I use facelet's .
-----------------------------------------------------------------
Избери от 30 000 заглавия с най-големите отстъпки в WWW.MOBILIS.BG
18 years, 5 months