[jBPM Development] - Sharing jbpmContext with two different threads on jBPM3
by François-Xavier Seheut de Ronchi
François-Xavier Seheut de Ronchi [https://community.jboss.org/people/effixs] created the discussion
"Sharing jbpmContext with two different threads on jBPM3"
To view the discussion, visit: https://community.jboss.org/message/803273#803273
--------------------------------------------------------------
Hello everynone. My first post. I think I read every post about the jBpmContext and nothing gave me the solution...
I'm using jBPM 3 with SEAM. I launch an asynchronous event which launches a ProcessInstance.
I am using another asynchronous event to cancel the previously launched ProcessInstance.
@Observer("builderObserver")
public void startProcessForBuilder(final PackageConfiguration packageConfiguration, final Package pack) {
try {
final JbpmConfiguration jbpmConfig = JbpmConfiguration.getInstance();
final JbpmContext jbpmContext = jbpmConfig.createJbpmContext();
final GraphSession graphJbpm = jbpmContext.getGraphSession();
final ProcessDefinition processDef = graphJbpm.findLatestProcessDefinition("builder");
final ProcessInstance processInstance = processDef.createProcessInstance();
processInstance.getContextInstance().setVariable("packageConfigurationId", packageConfiguration.getId());
jbpmContext.save(processInstance);
pack.setJbpmProcessId(processInstance.getId());
processInstance.getContextInstance().setVariable("packLauncher", pack);
....
@Observer("cancelBuilderObserver")
public void cancelProcessForBuilder(final Package pack) {
try {
final JbpmConfiguration jbpmConfig = JbpmConfiguration.getInstance();
final JbpmContext jbpmContext = jbpmConfig.getCurrentJbpmContext();
final GraphSession graphJbpm = jbpmContext.getGraphSession();
final ProcessDefinition processDef = graphJbpm.findLatestProcessDefinition("builder");
final ProcessInstance processInstance = graphJbpm.getProcessInstance(processDef.getId());
...
But when I do jbpmConfig.getCurrentJbpmContext(); the value is null. It is probably due to different transactions.
I just want to be able to end a processInstance using its id.
Could you please help me?
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/803273#803273]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 9 months
[JBoss Transactions Development] - Narayana Release Process
by Paul Robinson
Paul Robinson [https://community.jboss.org/people/paul.robinson] modified the document:
"Narayana Release Process"
To view the document, visit: https://community.jboss.org/docs/DOC-17433
--------------------------------------------------------------
This page provides a list of instructions that must be done *in order* when doing a release of Narayana.
h2. Check JIRA
1. Check all issues resolved.
2. Create next point release version if not exists - this is so you can push issues in step 3 below.
3. Unresolved issues should be resolved or pushed.
h2. Check Hudson
Ensure no test failures in the group of hudson tests, for the branch you intend to release.
h2. Raise AS7 component upgrade request in Jira
Prepare for a PR to update AS7.
1. https://issues.jboss.org/browse/AS7 https://issues.jboss.org/browse/AS7
2. create a new 'component update' issue.1. Ensure the module is set to 'transactions'
2. select an appropriate 'fix for'.
3. Assign it to yourself.
h2. Do Release
h3. Git Branches (4.17 and 5 only)
Must be done first as the build-release-packages.xml relies on the tag being available
cd $NARAYAN_SRC/scripts
pre-release.sh <next version, e.g: 5.0.0.M3>
h3. Create the AS7 pull request branch and roll the jbosstm/jboss-as branch to next SNAPSHOT (UN-TESTED COMMANDS!!)
BRANCH=4_BRANCH
AS_BRANCH=master
JIRA=AS7-5815
CURRENT=4.17.2.Final
NEXT=4.17.3.Final
git clone git@github.com:jbosstm/jboss-as.git
cd jboss-as
git checkout $BRANCH
git remote add upstream git://github.com/jbossas/jboss-as.git
git pull --rebase --ff-only upstream $AS_BRANCH
sed -i "s/$CURRENT-SNAPSHOT/$CURRENT/g" pom.xml
git commit -am "Upgrade Narayana to $CURRENT"
# should use git merge-base $BRANCH upstream/master
# You will need to resolve som merge conflicts. Most likely around version numbers.
git rebase -i HEAD~10
git checkout -b "${JIRA}_Upgrading_Narayana_to_${CURRENT}"
git checkout $BRANCH
sed -i "s/$CURRENT/$NEXT-SNAPSHOT/g" pom.xml
git commit -am "Upgrade Narayana to $NEXT-SNAPSHOT"
git push origin "${JIRA}_Upgrading_Narayana_to_${CURRENT}"
git push origin $BRANCH
h2. Build and release
CURRENT=<Version to release. e.g 5.0.0.M2>
mkdir -p ~/narayana/filemgmt.jboss.org/
On Linux:
sshfs jbosstm(a)filemgmt.jboss.org (mailto:jbosstm@filemgmt.jboss.org): ~/narayana/filemgmt.jboss.org/
On MacOS:
sshfs -o defer_permissions jbosstm(a)filemgmt.jboss.org (mailto:jbosstm@filemgmt.jboss.org): ~/narayana/filemgmt.jboss.org/
git clone git(a)github.com (mailto:git@github.com):jbosstm/narayana.git
cd narayana
git checkout $CURRENT
On Linux:
ant -f build-release-pkgs.xml dist downloads docs magnolia -Drsync=false
On MacOS:
ant -f build-release-pkgs.xml dist downloads docs magnolia
h3. svn branches
#Make sure your checkout has no local changes
svn update
svn status
POINT_VERSION=5
NEXT_POINT_VERSION=6
#Update the version in text files
find . -name \*.java -o -name \*.xml -o -name \*.properties -o -name \*.ent -o -name \INSTALL -o -name \README | grep -v ".svn" | grep -v target | xargs grep -l "4[._]16" | xargs sed -i "s/4\([._]\)16\([._]\)${POINT_VERSION}\([._]\)Final-SNAPSHOT/4\116\2$POINT_VERSION\3Final/"
svn commit -m "Updated to version 4.16.$POINT_VERSION.Final"
#Tag the release:
svn cp https://svn.jboss.org/repos/labs/labs/jbosstm/branches/JBOSSTS_4_16 https://svn.jboss.org/repos/labs/labs/jbosstm/branches/JBOSSTS_4_16 https://svn.jboss.org/repos/labs/labs/jbosstm/tags/JBOSSTS_4_16_4_Final/ https://svn.jboss.org/repos/labs/labs/jbosstm/tags/JBOSSTS_4_16_${POINT_V... -m "4.16.$POINT_VERSION"
#Bump to next version using similar find to above
find . -name \*.java -o -name \*.xml -o -name \*.properties -o -name \*.ent -o -name \INSTALL -o -name \README | grep -v ".svn" | grep -v target | xargs grep -l "4[._]16" | xargs sed -i "s/4\([._]\)16\([._]\)${POINT_VERSION}\([._]\)Final/4\116\2${NEXT_POINT_VERSION}\3Final-SNAPSHOT/"
svn commit -m "Updated to version 4.16.${NEXT_POINT_VERSION}.Final-SNAPSHOT"
#Update the maven version of jbossts in our fork of JBossAS: https://github.com/jbosstm/jboss-as https://github.com/jbosstm/jboss-as
git checkout 4_16_BRANCH
git pull --rebase --ff-only
#Check no local changes
git status
sed -i "s/4.16.${POINT_VERSION}.Final-SNAPSHOT/4.16.${NEXT_POINT_VERSION}.Final-SNAPSHOT/g" pom.xml
git commit -am "Updated to 4.16.${NEXT_POINT_VERSION}.Final-SNAPSHOT"
git push
#Build and deploy the release to nexus staging:
mkdir ~/filemgmt.jboss.org/
sshfs -o defer_permissions mailto:jbosstm@filemgmt.jboss.org jbosstm(a)filemgmt.jboss.org: ~/filemgmt.jboss.org/
svn switch https://svn.jboss.org/repos/labs/labs/jbosstm/tags/JBOSSTS_4_16_$ https://svn.jboss.org/repos/labs/labs/jbosstm/tags/JBOSSTS_4_16_${NEXT_PO...
ant -f build-release-pkgs.xml dist mvn-repository downloads magnolia
h3.
h2. Release the artifact through Nexus
1. https://repository.jboss.org/nexus/index.html#welcome https://repository.jboss.org/nexus/index.html#welcome
2. login
3. "Staging Repositories"
4. Click tickbox for your repo
5. Click "Close"
6. Don't worry about a description, just click "Close"
7. Click tickbox after it is closed
8. Click "Release"
9. Again a description doesn't matter
h2. Push Upstream
Check that the pull request will work. *If it doesn't and it requires Narayana changes you *have* to rev the version number - DON'T attempt to re-release with the same version number:*
JIRA=AS7-5815
CURRENT=4.17.2.Final
git clone mailto:git@github.com git@github.com:jbosstm/jboss-as.git
cd jboss-as
git checkout "${JIRA}_Upgrading_Narayana_to_${CURRENT}"
rm -rf ~/.m2/repository/org/jboss/jbossts
rm -rf ~/.m2/repository/org/jboss/narayana
./build.sh clean install
1. Raise the pull request using our branch
2. Once merged, resolve the AS7 Jira issue.
h2. JIRA Release
1. Close all issues for the release
2. Mark as released (Need admin permissions)
h2. Update Website
Update the Narayana community site:
* Fix the Magnolia files* Open the website.jbosstm.documentation.4.16.5.Final.xml and website.jbosstm.downloads.4.16.5.Final.xml files
* Edit the first line to change '<sv:node sv:name="5.0.0.M2"' to replace the '.' with '_'. Make it look like htis: '<sv:node sv:name="5_0_0_M2"'
* Save the files, ready for upload.
* Login to Magnolia* https://www.jboss.org/author/.magnolia/pages/adminCentral.html https://www.jboss.org/author/.magnolia/pages/adminCentral.html
* Login with credentials: Tom and Paul know these, ask them.
* Documentation* Browse to 'jbosstm/documentation'
* right click on 'downloads' and select 'import'
* browse to the location of the 'website.jbosstm.documentation.4.16.5.Final.xml' file
* Right click on the new file and click 'move'
* Drag the file to the top of the documentation list.
* Right click on the new page and select 'open page...'
* Check that the page looks right and that the download links work
* Right click on the new page and select 'activate'
* You now need to wait for the page to be moderated before it will appear.
* Downloads* Browse to 'jbosstm/downloads'
* right click on 'downloads' and select 'import'
* browse to the location of the 'website.jbosstm.downloads.4.16.5.Final.xml' file
* Right click on the new file and click 'move'
* Drag the file to the top of the downloads list.
* Right click on the new page and select 'open page...'
* Check that the page looks right and that the download links work
* Right click on the new page and select 'activate'
* You now need to wait for the page to be moderated before it will appear.
* Announcement* Right click on 'jbosstm' and select 'open page...'
* Click edit on the 'announcement' pane
* Update the announcement for this release.
* Right click on 'jbosstm' and select 'activate changes'
* You now need to wait for the page to be moderated before it will appear.
* Release notes* Right click on 'jbosstm' and select 'open page...'
* Click edit on the 'getting started' pane on the right-hand-side
* Edit the release notes url to point to the release notes for this version
* Click save
* Right click on 'jbosstm' and select 'activate changes'
* You now need to wait for the page to be moderated before it will appear.
h2. Promote
NOTE: It is worth waiting for the merge of the pull request before advertising, or at least wait for the merge build notification first ;)
Promote the release through the following channels:
1. Email jbossts-announce(a)lists.jboss.org (mailto:jbossts-announce@lists.jboss.org)
2. Forum
3. Blog: project in (jbtm, blacktie) AND fixversion = "5.0.0.M2" AND priority >= major AND issuetype not in (Bug, task) AND resolution not in ("Duplicate Issue", Rejected, "Won't Fix", "Out of Date", "Cannot Reproduce Bug")
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-17433]
Create a new document in JBoss Transactions Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
11 years, 9 months
[jBPM Development] - Intellipaat provides Drools & JBPM online training
by shilpi jain
shilpi jain [https://community.jboss.org/people/shilpiintellipaat] created the discussion
"Intellipaat provides Drools & JBPM online training"
To view the discussion, visit: https://community.jboss.org/message/802913#802913
--------------------------------------------------------------
*Intellipaat provides Drools & JBPM online training*
Hi,
We will start Drools & JBPM online training from 23rd march’13. Training will be 70-80 % hands on.
Our institute is the market leader in providing online training at the lowest price with high quality from the last 4 yrs. Training is carried out on Webex or goto meeting where the trainer trains the candidates and answers their queries.
The trainer has 16+ yrs of experience and has conducted multiple online trainings.
JBPM and Drools training to get ahead middleware architects and application developers who are responsible for designing business processes, implementing business process management systems, and integrating BPM into their enterprise architecture with Business Rule Management System. The course teaches process modeling, task management, client APIs, integration and customization, etc.
Interested candidates please drop an email for registration at mailto:sales@intellipaat.com sales(a)intellipaat.com or give us a call.
Grab your seats now!
Regards,
Sales Intellipaat Team
Mob: 91-9019368913
Visit us at www.intellipaat.com.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/802913#802913]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 9 months
[jBPM Development] - JBPM5.4 Web Application Human Task server Integration
by Arunkumar Palanivel
Arunkumar Palanivel [https://community.jboss.org/people/arun_kumar] created the discussion
"JBPM5.4 Web Application Human Task server Integration"
To view the discussion, visit: https://community.jboss.org/message/802895#802895
--------------------------------------------------------------
I am new to JBPM. When I try to integrate simple jbpm5.4 web application with human task (seperate instance). I am getting below exception. I haven't get any exception on server startup.
Help me on this.
14:49:13,112 ERROR [org.drools.persistence.SingleSessionCommandService] (http--127.0.0.1-8080-1) Could not commit session: org.jbpm.workflow.instance.WorkflowRuntimeException: [com.sample.bpmn.sampleHTformvariables:444 - Sample Order Task:3] -- null
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:132) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.node.JoinInstance.triggerCompleted(JoinInstance.java:152) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.node.JoinInstance.internalTrigger(JoinInstance.java:52) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.node.ActionNodeInstance.triggerCompleted(ActionNodeInstance.java:55) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.node.ActionNodeInstance.internalTrigger(ActionNodeInstance.java:51) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:194) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:309) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:170) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:140) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1098) [drools-core-5.5.0.Final.jar:5.5.0.Final]
at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:320) [drools-core-5.5.0.Final.jar:5.5.0.Final]
at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:120) [drools-core-5.5.0.Final.jar:5.5.0.Final]
at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:39) [drools-core-5.5.0.Final.jar:5.5.0.Final]
at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36) [drools-core-5.5.0.Final.jar:5.5.0.Final]
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:373) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223) [drools-core-5.5.0.Final.jar:5.5.0.Final]
at com.sample.processserver.TaskProcessServlet.processRequest(TaskProcessServlet.java:102) [classes:]
at com.sample.processserver.TaskProcessServlet.doGet(TaskProcessServlet.java:198) [classes:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_16]
*Caused by: java.lang.NullPointerException*
at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.registerTaskEvents(GenericHTWorkItemHandler.java:137) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.process.workitem.wsht.LocalHTWorkItemHandler.connect(LocalHTWorkItemHandler.java:64) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.executeWorkItem(GenericHTWorkItemHandler.java:180) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:55) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:107) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
... 45 more
14:49:13,268 ERROR [org.jboss.as.txn] (http--127.0.0.1-8080-1) JBAS010152: APPLICATION ERROR: transaction still active in request with status 1
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/802895#802895]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 9 months