[JBoss jBPM] - How to integrate jBpm into EJB3 based application
by alduro
Hi,
I´ve been reading a lot of docs, wikis and tutorials and I didn´t find a way to integrate jBpm into a EJB3 based app.
I´ve got a service layer with EJB3 session beans that expose all functionalities. Behind them are the EJB3 entities. All of them are interacting through IoC (injecting resources and persistance manager).
I would like to interact with jBpm service the same way from services layer and calling other EJB3 services from jbpm actions through IoC. Is this possible ? How can I manage 2 different persistence managers (one for the domain model application and the other one for the jbpm work tables model) ? Is it possible to inject a Jbpm Context into a EJB3 session bean ?
I´ve tried using jbpm 3.2 with jboss 4.0.5 but the WAR console file has a lot of problems with JSF libraries. Now I´m trying with 3.1 starter-kit version.
Thanks in advance.
Aldo.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098895#4098895
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098895
18Â years, 6Â months
[JBoss Seam] - Re: Additional update without press update button
by rbcdexia
"rbcdexia" wrote : I have a relation 1...n between Boleta pojo and Contrapartida pojo. When I want to update the Boleta fields and I have to select a Contrapartida pojo, Seam makes a default update without I have press update button.
|
| I use bypassUpdates="true" with the simple Boleta fields and it works fine(not additional updates). The problem comes when I want to update the Boleta pojo setting a new Contrapartida When I return from Auditoria Select page to Boleta Edit page it makes an additional update without I have pressed any button.
|
| How can I change this? How can I controll the transaction? Why does seam realice this additional update?
|
|
|
| This is my BoletaEdit.page.xml.
|
|
| | <page no-conversation-view-id="/BoletaList.xhtml"
| | login-required="true">
| |
| | <begin-conversation join="true"/>
| |
| | <action execute="#{boletaHome.wire}"/>
| |
| | <param name="boletaFrom"/>
| | <param name="boletaBoletaid" value="#{boletaHome.boletaBoletaid}"/>
| | <param name="contrapartidaFrom"/>
| | <param name="contrapartidaContrapartidaid" value="#{contrapartidaHome.contrapartidaContrapartidaid}"/>
| |
| | <navigation from-action="#{boletaHome.persist}">
| | <end-conversation/>
| | <redirect view-id="/Boleta.xhtml"/>
| | </navigation>
| |
| | <navigation from-action="#{boletaHome.update}">
| | <end-conversation/>
| | <redirect view-id="/Boleta.xhtml"/>
| | </navigation>
| |
| |
| | <navigation from-action="#{boletaHome.remove}">
| | <end-conversation/>
| | <redirect view-id="/BoletaList.xhtml"/>
| | </navigation>
| |
| | </page>
| |
|
| This is my BoletaEdit.xhtml
|
|
| | <ui:define name="body">
| |
| | <h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
| |
| | <h:form id="boleta" styleClass="edit">
| |
| | <rich:panel>
| | <f:facet name="header">#{messages['Edit']} #{messages['Boleta']}</f:facet>
| | <s:decorate id="loginDecoration" template="layout/edit.xhtml">
| | <ui:define name="label">#{messages['Usuario']}</ui:define>
| | <h:inputText id="login"
| | required="true"
| | size="12"
| | maxlength="12"
| | value="#{boletaHome.instance.login}">
| | <a:support event="onblur" reRender="loginDecoration" bypassUpdates="true"/>
| | </h:inputText>
| | </s:decorate>
| |
| |
| | <s:decorate id="tipoopeDecoration" template="layout/edit.xhtml">
| | <ui:define name="label">#{messages['Tipo operación']}</ui:define>
| | <h:inputText id="tipoope"
| | required="true"
| | size="2"
| | maxlength="2"
| | value="#{boletaHome.instance.tipoope}">
| | <a:support event="onblur" reRender="tipoopeDecoration" bypassUpdates="true"/>
| | </h:inputText>
| | </s:decorate>
| |
| | <div style="clear:both">
| | <span class="required">*</span>
| | #{messages['required.fields']}
| | </div>
| |
| | </rich:panel>
| |
| | <div class="actionButtons">
| |
| | <h:commandButton id="save"
| | value="#{messages['Save']}"
| | action="#{boletaHome.persist}"
| | disabled="#{!boletaHome.wired}"
| | rendered="#{!boletaHome.managed}"/>
| |
| | <h:commandButton id="update"
| | value="#{messages['Update']}"
| | action="#{boletaHome.update}"
| | rendered="#{boletaHome.managed}"/>
| |
| | <s:button id="done"
| | value="#{messages['Done']}"
| | propagation="end"
| | view="/Boleta.xhtml"
| | rendered="#{boletaHome.managed}"/>
| |
| | <s:button id="cancel"
| | value="#{messages['Cancel']}"
| | propagation="end"
| | view="/#{empty boletaFrom ? 'BoletaList' : boletaFrom}.xhtml"
| | rendered="#{!boletaHome.managed}"/>
| |
| | </div>
| | </h:form>
| |
| | <rich:tabPanel switchType="ajax">
| | <rich:tab label="#{messages['Contrapartida']} *" labelClass="required">
| | <div class="association" id="contrapartidaParent">
| |
| | <h:outputText value="#{messages['No hay asociada una contrapartida']}"
| | rendered="#{boletaHome.instance.contrapartida == null}"/>
| |
| | <rich:dataTable var="contrapartida"
| | value="#{boletaHome.instance.contrapartida}"
| | rendered="#{boletaHome.instance.contrapartida != null}"
| | rowClasses="rvgRowOne,rvgRowTwo"
| | id="contrapartidaTable">
| | <h:column>
| | <f:facet name="header">#{messages['Nombre']}</f:facet>
| | #{contrapartida.nombre}
| | </h:column>
| | <h:column>
| | <f:facet name="header">#{messages['Cuenta']}</f:facet>
| | #{contrapartida.cuenta}
| | </h:column>
| | <h:column>
| | <f:facet name="header">#{messages['BIC']}</f:facet>
| | #{contrapartida.bic}
| | </h:column>
| | <h:column>
| | <f:facet name="header">#{messages['action']}</f:facet>
| | <s:link view="/Contrapartida.xhtml"
| | id="viewcontrapartida"
| | value="#{messages['View']}"
| | propagation="none">
| | <f:param name="contrapartidaContrapartidaid"
| | value="#{contrapartida.contrapartidaid}"/>
| | </s:link>
| | </h:column>
| | </rich:dataTable>
| |
| | <div class="actionButtons">
| | <s:button value="#{messages['Select']} #{messages['Contrapartida']}"
| | view="/ContrapartidaList.xhtml">
| | <f:param name="from" value="BoletaEdit"/>
| | </s:button>
| | </div>
| |
| | </div>
| | </rich:tab>
| | </rich:tabPanel>
| | </ui:define>
| |
| | </ui:composition>
| |
| |
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098891#4098891
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098891
18Â years, 6Â months
[JBoss Seam] - Re: Destroying Context Variable
by terryb
Same as default: persisted, updated, removed.
| @Override
| public String persist() {
|
| if (Strings.isNull(getInstance().getId()) && !this.isManaged()) {
|
| KeyGenerator keyGen = (KeyGenerator) Component.getInstance(KeyGenerator.class, true);
| getInstance().setId(keyGen.getKey(Constant.Database.KeySuffix.ADMIN));
|
| getInstance().setLastUpdateDate((new CurrentDatetime()).getCurrentDatetime());
| getInstance().setInsertDate((new CurrentDatetime()).getCurrentDatetime());
| }
|
| //setCreatedMessage(null);
| String returnStatus = super.persist();
|
| if ("persisted".equals(returnStatus)) {
| //FacesMessages.instance().addFromResourceBundle(FacesMessage.SEVERITY_INFO, "au.edu.tisc.RecordInserted", " organisation user " + getInstance().getUsername());
|
| try {
| ((ActivityLogger) Component.getInstance(ActivityLogger.class, true)).logOrgUserAuthenticated(
| ActivityLogger.Code.RECORD_CREATED,
| String.format(ActivityLogger.Code.Desc.RECORD_CREATED, getInstance().getClass().getName() + "#" + getInstance().getId()));
| } catch (ActivityLoggerException e) {
| //skip
| }
| }
| return returnStatus;
| }
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098888#4098888
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098888
18Â years, 6Â months