viernes, 25 de enero de 2013
Drools 5.0 - Read rules
Another form to read the Droools rules is through a FileInputStream
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
.newKnowledgeBuilder();
FileInputStream fis = new FileInputStream(url);
kbuilder.add(ResourceFactory.newInputStreamResource(fis), ResourceType.DTABLE);
KnowledgeBuilderErrors errors = kbuilder.getErrors();
if (errors.size() > 0) {
for (KnowledgeBuilderError error : errors) {
System.err.println(error);
}
throw new IllegalArgumentException("Could not parse knowledge.");
}
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
return kbase;
Instead of
kbuilder.add(ResourceFactory.newClassPathResource(url), ResourceType.DRL);
lunes, 7 de enero de 2013
PrimeFaces - Mobile
To implement PrimeFaces for mobile you have to do some changes to the implementation.
- POM
- Add this repository & dependencies
- FACES-CONFIG.xml
- <repository>
- <id>prime-repo</id>
- <name>Prime Repo</name>
- <url>http://repository.primefaces.org</url>
- <layout>default</layout>
- </repository>
-
<dependency>
- <groupId>org.primefaces</groupId>
- <artifactId>primefaces</artifactId>
- <version>3.3</version>
- </dependency>
<dependency>
- <groupId>org.primefaces</groupId>
- <artifactId>primefaces-mobile</artifactId>
- <version>0.9.3</version>
- </dependency>
- Add in the tag<application> <application>
- <default-render-kit-id>PRIMEFACES_MOBILE</default-render-kit-id>
- </application>
- XHTML
- Add in the libraries xmlns:pm="http://primefaces.org/mobile"
- Insert the tag <f:view> instead of <h:body> <f:view xmlns:pm="http://primefaces.org/mobile" contentType="text/html" renderKitId="PRIMEFACES_MOBILE">
- Insert the tag <pm:page> <pm:page title="Title page">
- Insert the tag <pm:view> <pm:view id="main">
- If you want to display a header in the page, insert <pm:header> <pm:header title="Mobile" swatch="b"/>
- There are 5 themes (swatch values): "a", "b", "c", "d", "e"
- In the <p:inputText> there is an attribute label, so you don´t have to user the <h:outputLabel> element
- The nature of the tag <f:facet> in different
- The tag <p:dataList> works better than <p:dataTable>
Oracle BPM - Oracle WebLogic Server
- Install DB (wls1035_win32.exe)
- Welcome Screen -> Next
- Choose Middleware Home Directory Screen
- Select Create a new Middleware Home. -> Next
- Register for Security Updates Screen -> Next
- Choose Install Type Screen
- Select Typical. -> Next
- Choose Product Installation Directories Screen -> Next
- Choose Shortcut Location (Windows only) -> Next
- Installation Summary Screen -> Next
- Installation Complete Screen
- De-select Run Quickstart. -> Done
viernes, 4 de enero de 2013
Oracle BPM - RCU
- Install DB (OracleXE112_Win32)
- Install the RCU (ofm_rcu_win_11.1.1.5.0_disk1_1of1.zip)
- Unzip in path C:\ to avoid the message error Windows cannot find 'C:\Documents'.
- Create the environment variable RCU_JDBC_TRIM_BLOCKS with value TRUE
- Setup steps
- Welcome Screen -> Next
- Create Repository Screen -> Next
- Database Connection Details Screen -> Next (Accept the warning)
- Host Name: localhost Ex. ora-node1-vip.example.com
- Port: 1521 by default
- Database Name: xe
- User: SYS
- Pwd: Has to be the password from the DB
- Role: for user SYS the role has to be SYSDBA role
- Select Components Screen
- Schema Passwords Screen
- Select Use same password for all schemas.
- Type password
- Map Tablespaces Screen -> Next
- Summary Screen -> Create -> Next
- Completion Summary Screen -> Close
You has finished your RCU installation =)
Oracle BPM - Errors
Error:
Current Value: 100, it should be greater than or equal to 200.
Solution:
- Login on your database with system user.
SQL> connect system
Enter password:
Connected.
- Type:
- show parameters processes (which will show the current value of processes).
- ALTER SYSTEM SET PROCESSES=200 SCOPE=SPFILE;
- show parameters open_cursors (which will show the current value of open_cursors).
- ALTER SYSTEM SET OPEN_CURSORS=200 SCOPE=SPFILE;
- Restart DB.
Suscribirse a:
Entradas (Atom)