[jBPM] - Getting information from another Database
by Sadiroveski S
Sadiroveski S [https://community.jboss.org/people/sadiroveski] created the discussion
"Getting information from another Database"
To view the discussion, visit: https://community.jboss.org/message/795900#795900
--------------------------------------------------------------
Hello,
I am trying to get information from a Production Database to display them in the form. For example, the employee wants to create a new customer, he will run the process and add a new customer and select the country from a Combo Box (The combo box here is filled in information from the database) then the selected country will be assigned to the process variables.
Conceptually, I am thinking of 2 approaches:
* Getting information from a Production Database (Approach 1):* Specific task will connect to a database to capture all information
* The task will assign the values to the process
* The next Form task will get the information from the Process to present them in the form controls (Example: Combo Box)
This approach will cause to save information to the process in every created process instance. There could be a lot of info, i.e. available counties, available products to sell, registered customers……
* Getting information from a Production database (Approach 2):* Customize the form controls to access the database to read the information and put them in Form controls.
* There is no need to create a task to connect to the database and save all information on the process variables or even task variables.
This approach could not be implemented since the form is built using Freemarker(FTL Files) which is not like JSP where we can’t mix code with HTML. Is there a way to create an object and read from it using FTL?
Regards,
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/795900#795900]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 2 months
[Performance Tuning] - Servers swapping memory
by Suchit Khobarekar
Suchit Khobarekar [https://community.jboss.org/people/SuchitKhobarekar] created the discussion
"Servers swapping memory"
To view the discussion, visit: https://community.jboss.org/message/795421#795421
--------------------------------------------------------------
Hi,
We have configured Liferay servers on JBoss AS 7.1.1. We have two environments Stage and Prod which are pretty much identical in terms of the hardware and software. However we are seeing some heavy swapping happening on the Prod servers. About a few hours after the servers are started they start swapping memory and this is how it read (as below):
Memory Used Total Percentage
============================
Physical 4079M 7872M 51%
Actual 3630M 7872M 46%
Swap 878M 2047M 42%
This is not a good sign for us. The JAVA_OPTS setting in standalone.conf is as below
JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Duser.timezone=GMT -server -XX:NewSize=700m -XX:MaxNewSize=700m -Xms2048m -Xmx4096m -XX:MaxPermSize=1536m -XX:SurvivorRatio=6 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=15 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:ParallelGCThreads=16 -XX:+CMSCompactWhenClearAllSoftRefs -XX:CMSInitiatingOccupancyFraction=85 -XX:+CMSScavengeBeforeRemark -XX:+CMSConcurrentMTEnabled -XX:ParallelCMSThreads=2"
There are 2 nodes with 8 GB of RAM each
I found a thread which mentioned that the -Xms and -Xmx should ideally have the same values. This is the thread https://community.jboss.org/message/221207#221207 https://community.jboss.org/message/221207
Any help on this is really appreciated. I
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/795421#795421]
Start a new discussion in Performance Tuning at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 2 months
[jBPM] - Perform DB operations from Workflow
by pns
pns [https://community.jboss.org/people/pns] created the discussion
"Perform DB operations from Workflow"
To view the discussion, visit: https://community.jboss.org/message/795770#795770
--------------------------------------------------------------
We have implemented JBPM Workflow in our application and is integrated with Spring MVC. Now we are planning to handle all the Workflow related DB operations from within the Workflow. We thought of two options.
1) Define Script Task for invoking the DAO class to do the DB operations from the Workflow
2) Define custom Service Task and invoke the DAO from the WorkItemHandler corresponding to the Service Task.
We would like to get the opinion on this design approach to keep the Workflow related DB operations inside the Workflow, and also on the above two options. Which would be the right approach?
If we go with the second one of having a Service Task, then we need to generalize the WorkItemHandler to be used in many situations, which would be slightly tricky.
We would like to get the suggestion from JBPM experts.
Thanks in advance...
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/795770#795770]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 2 months
[jBPM] - Update Process Definitions timeout - with solution.
by John Lewis
John Lewis [https://community.jboss.org/people/john0945] created the discussion
"Update Process Definitions timeout - with solution."
To view the discussion, visit: https://community.jboss.org/message/795847#795847
--------------------------------------------------------------
Summary: I resolved class java.io.IOException / timeout error when updating processes in the jBPM console by fixing errors in my process.
Hi. Just wanted to post something I've been struggling with. I installed jBPM5 with the installer, and started developing my own process. Everything was going smoothly, until after I added a XOR gateway. I started getting an errror when trying to update the processes in the jBPM console. I got a popup error message, and no process definitions, though there should have been three. Here's the error:
2013-02-04 08:55:19,851 [DEBUG] GET: http://localhost:8080/gwt-console-server/rs/process/definitions http://localhost:8080/gwt-console-server/rs/process/definitions
2013-02-04 08:56:18,982 [ERROR] <ul><li>URL: ' http://localhost:8080/gwt-console-server/rs/process/definitions http://localhost:8080/gwt-console-server/rs/process/definitions'
<li>Action: 'org.jboss.bpm.console.client.process.UpdateDefinitionsAction'
<li>Exception: 'class java.io.IOException'</ul>
Request timeout
java.io.IOException:
Request timeout
at Unknown.$fillInStackTrace_1(JsArrayString.java:42)
at Unknown.$IOException(StackTraceCreator.java:366)
at Unknown.run_17(AbstractRESTAction.java:120)
at Unknown.fire(Timer.java:141)
at Unknown.anonymous(Timer.java:60)
at Unknown.entry0(Impl.java:146)
at Unknown.anonymous(Impl.java:56)
I tried restarting the server, downloading new WAR files, redeploying the WAR files... everything I could think of. Sometimes it would work for a bit.
Eventually, I decided to first fix the compilation error I was getting when trying to build the package. In the conditions of the gateways (which are set on the branches leaving the gateway), I was trying to use a boolean process variable, but I was getting errors because the getVariable() method returns an object, which I was trying to cast to a boolean. After discovering this, I changed the code, and the build was successful. Here's the old and new code.
OLD: boolean decision = (boolean)kcontext.getVariable("instock");
return decision;
NEW: boolean decision = kcontext.getVariable("instock").equals(true);
return decision;
For information on the getVariable() method, I used:
http://docs.jboss.org/jbpm/v5.4/javadocs/org/jbpm/process/instance/contex... http://docs.jboss.org/jbpm/v5.4/javadocs/org/jbpm/process/instance/contex...
For information on the equals() method, I used:
http://docs.jboss.org/jbpm/v5.4/javadocs/org/jbpm/task/BooleanExpression.... http://docs.jboss.org/jbpm/v5.4/javadocs/org/jbpm/task/BooleanExpression....
After changing to the new code, I updated the processes and didn't get the timeout issue.
To check I had actually solved it by changing the code, I reverted back to the old code. The process was now not valid, so the Console didn't update to the new version. I rebooted the server to force it to work with the invalid version. Now, the Console didn't pick up the invalid process at all (but successfully loads the other valid processes I have, without giving the timeout error).
To attempt to recreate the timeout error, I reverted to an even older version of code (the version that was in use when the server booted up, and gave the timeout error). Here I tried to save an Object into a Boolean variable without casting.
OLDER: boolean decision = (boolean)kcontext.getVariable("instock");
return decision;
After changing back to this code, I restarted the server. It took a couple tries before the console and Guvnor showed in the browser, but when it did, the process still didn't show up. The timeout error didn't come back.
Then, I changed back to the new code, built the package and refreshed the processes in the Console. The process then showed up (without having to reboot).
In conclusion, if you encounter a timeout error while updating the process definitions in the jBPM console, or the process doesn't show up, check that you can successfully build the package that the process is in. (This is done under the edit tab of the package, in Drools Guvnor. See section 3.6 of the jBPM installer guide for a video of how to do it. http://docs.jboss.org/jbpm/v5.4/userguide/ch.installer.html#d0e571 http://docs.jboss.org/jbpm/v5.4/userguide/ch.installer.html#d0e571).
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/795847#795847]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 2 months