[JBoss jBPM] - Jrules problem
by souravbiswas
hi all
i was thinking about evaluating the Jboss rules engine
i am new to rule's engines and following the installation guide ere's wat i have done
1.unzipped the eclipse pluggin into my eclipse plugins folder
2.started a new rules project project where i have included the Sample.drl and DroolTest.java files .
now when i am running the DroolTest.java file as java application i am having the following error
org.drools.RuntimeDroolsException: Unable to load dialect 'org.drools.rule.builder.dialect.java.JavaDialect:java'
at org.drools.compiler.PackageBuilderConfiguration.buildDialectRegistry(PackageBuilderConfiguration.java:156)
at org.drools.compiler.PackageBuilder.(PackageBuilder.java:131)
at org.drools.compiler.PackageBuilder.(PackageBuilder.java:84)
at com.sample.DroolsTest.readRule(DroolsTest.java:50)
at com.sample.DroolsTest.main(DroolsTest.java:21)
can sumbody pls help me out
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060639#4060639
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060639
18Â years, 9Â months
[JBoss Seam] - Getting an updated data model selection
by amitdk
Hello,
I have a JSF page that allows one of the dataTable columns to be updated. However the selected row update to certain elements of a row doesn't seem to come through in the DataModelSelection. Is the DataModel not updatable? I would imagine it would be - however I always get the old value back in my session bean.
Here's how the JSF page looks:
| <h:form id="taskedit">
| <a:log/>
| <rich:panel>
| <h1>Your Weekly Tasks:</h1>
| <h:outputText value="No tasks added for this week" rendered="#{weeklyTasks.rowCount==0}"/>
| <rich:dataTable value="#{weeklyTasks}"
| var="wtask" rendered="#{weeklyTasks.rowCount>0}"
| onRowMouseOver="this.style.backgroundColor='#E0E0E0'"
| onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
| <a:support event="onRowDblClick" action="#{report.updateTask}" reRender="taskedit"/>
| <rich:column rendered="#{not report.taskEditable}">
| <f:facet name="header">Assigned Task</f:facet>
| <h:outputText value="#{wtask.comments}"/>
| </rich:column>
| <rich:column rendered="#{report.taskEditable}">
| <f:facet name="header">Assigned Task</f:facet>
| <h:inputTextarea rows="5" cols="80" value="#{wtask.comments}"/>
| </rich:column>
| <rich:column>
| <f:facet name="header">action</f:facet>
| <s:button action="#{report.saveTask}" value="Save Task" />
| </rich:column>
| <rich:column>
| <f:facet name="header">action</f:facet>
| <s:button action="#{report.removeTask}" value="Remove Task" />
| </rich:column>
| </rich:dataTable>
| </rich:panel>
| </h:form>
|
Here's how the session bean looks:
| @Stateful
| @Name("report")
| @Scope(ScopeType.SESSION)
| public class ReportBean implements Report, Serializable
| {
| private static final long serialVersionUID = 8545529442081579216L;
|
| @PersistenceContext(type = PersistenceContextType.EXTENDED)
| EntityManager entityMgr;
|
| @In
| User user;
|
| @DataModel
| List<TaskAssignment> weeklyTasks;
|
| @DataModelSelection
| private TaskAssignment selectedTask;
|
| .............
|
| @Factory("weeklyTasks")
| public void showTasks()
| {
| weeklyTasks = entityMgr
| .createQuery(......).setParameter(..).getResultList();
| }
|
| // Here's the method I expect to get the updated comments
| public void saveTask()
| {
| System.out.println( selectedTask.getComments() );
| .............
| }
|
On a double click on a row on the dataTable, the comments field becomes editable, however the submit and corresponding invocation of saveTask does not give me the latest edited value.
Is there something I am missing here in terms of how you capture an edited row value?
Any help is appreciated.
Thanks
Amit Karandikar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060635#4060635
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060635
18Â years, 9Â months
[JBoss Seam] - Re: best way of using application scope constants?
by jazir1979
I'm doing a similar thing to this using a SLSB with application scoped @Factory methods. It works well.
| @Stateless
| @Name("factory")
| public class FactoryActionBean extends BaseActionBean implements FactoryAction {
| @In(create = true, value = "entityManager")
| protected EntityManager em;
|
| /** {@inheritDoc} */
| @Factory(value = "statusList", scope = ScopeType.APPLICATION)
| public List<Status> getStatuses() {
| return service.findReservationStatuses(em);
| }
|
Watch out though, using the above list with <s:convertEntity/> broke in Seam 2 Beta 1 due to JBSEAM-1487, but this is now fixed in CVS, thanks to Pete.
"bkroeger" wrote : Hi, I would like to know if Ellen got this working, I have tried to do the same thing but when I attempt to get a reference to the EntityManager in my application scope bean:
|
| | @PersistenceContext
| | private EntityManager em;
| |
| I get an error message telling me my bean needs to be in session scope, which defeats the purpose as I will end up re-creating my list every time a new session starts.
|
| What's the best way to have an application scope (static) list available to the application, that requires use of the EntityManager?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060628#4060628
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060628
18Â years, 9Â months