JBoss JBPM SVN: r2264 - jbpm4/docbook-style/src/main/css/css.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-09-16 10:57:34 -0400 (Tue, 16 Sep 2008)
New Revision: 2264
Added:
jbpm4/docbook-style/src/main/css/css/docnav.css
jbpm4/docbook-style/src/main/css/css/documentation.css
jbpm4/docbook-style/src/main/css/css/jbossorg.css
jbpm4/docbook-style/src/main/css/css/reports.css
Log:
docbook style updates
Added: jbpm4/docbook-style/src/main/css/css/docnav.css
===================================================================
--- jbpm4/docbook-style/src/main/css/css/docnav.css (rev 0)
+++ jbpm4/docbook-style/src/main/css/css/docnav.css 2008-09-16 14:57:34 UTC (rev 2264)
@@ -0,0 +1,204 @@
+/* Document Navigation */
+
+.docnav a, .docnav strong {
+ text-decoration:none;
+ font-weight:normal;
+}
+
+.docnav {
+ list-style:none;
+ margin:0em;
+ padding:0em;
+ position:relative;
+ width:100%;
+ padding-bottom:2em;
+ padding-top:1em;
+ border-top:1px dotted #ccc;
+}
+
+.docnav li {
+ list-style:none;
+ margin:0em;
+ padding:0em;
+ display:inline;
+ font-size:.8em;
+}
+
+.docnav li:before {content:" ";}
+
+.docnav li.previous, .docnav li.next {
+ position:absolute;
+ top:1em;
+}
+
+.docnav li.up, .docnav li.home {margin:0em 1.5em;}
+
+.docnav li.previous {
+ left:0px;
+ text-align:left;
+}
+
+.docnav li.next {
+ right:0px;
+ text-align:right;
+}
+
+.docnav li.previous strong, .docnav li.next strong {
+ display:block;
+ height:22px;
+}
+
+.docnav {
+ margin:0 auto;
+ text-align:center;
+}
+
+.docnav li.next a strong {
+ background:url(../images/community/docbook/next.png) top right no-repeat;
+ padding-top:10px;
+ padding-bottom:15px;
+ height:40px;
+ padding-right:60px;
+ font-size:1.2em;
+}
+
+.docnav li.previous a strong {
+ background:url(../images/community/docbook/prev.png) top left no-repeat;
+ padding-top:10px;
+ padding-bottom:15px;
+ height:40px;
+ padding-left:60px;
+ font-size:1.2em;
+}
+
+.docnav li.home a strong {
+ background:url(../images/community/docbook/home.png) top left no-repeat;
+ padding-top:10px;
+ padding-bottom:15px;
+ height:40px;
+ padding-left:60px;
+ font-size:1.2em;
+}
+
+.docnav li.up a strong {
+ background:url(../images/community/docbook/up.png) top left no-repeat;
+ padding-top:10px;
+ padding-bottom:15px;
+ height:40px;
+ padding-left:60px;
+ font-size:1.2em;
+}
+
+.docnav a:link, .docnav a:visited {color:#666 !important;}
+
+.docnav a:hover, .docnav a:focus, .docnav a:active {color:black !important;}
+
+.docnav a {
+ max-width:10em;
+ overflow:hidden;
+}
+
+.docnav a:link strong {text-decoration:none;}
+
+.docnav {
+ margin:0 auto;
+ text-align:center;
+}
+
+.docnav {margin-bottom:16px;}
+
+/* Eclipse Help Navigation */
+
+.navheader {padding-top:35px}
+
+.navheader table {border-style:none}
+
+.navheader a {
+ text-decoration:none;
+ font-weight:normal;
+ font-size:.8em;
+}
+
+.navheader td.next a {
+ background:url(../images/community/docbook/next.png) top right no-repeat;
+ padding-top:10px;
+ padding-bottom:15px;
+ height:40px;
+ padding-right:60px;
+ font-size:0.9em;
+}
+
+.navheader td.previous a {
+ background:url(../images/community/docbook/prev.png) top left no-repeat;
+ padding-top:10px;
+ padding-bottom:15px;
+ height:40px;
+ padding-left:60px;
+ font-size:0.9em;
+}
+
+.navheader a:link, .navheader a:visited {color:#666 !important;}
+
+.navheader a:hover, .navheader a:focus, .navheader a:active {color:black !important;}
+
+.navheader a {
+ max-width:10em;
+ overflow:hidden;
+}
+
+.navheader a:link {text-decoration:none;}
+
+.navfooter table {border-style:none}
+
+.navfooter a {
+ text-decoration:none;
+ font-weight:normal;
+ font-size:.8em;
+}
+
+.navfooter td.next a {
+ background:url(../images/community/docbook/next.png) top right no-repeat;
+ padding-top:10px;
+ padding-bottom:15px;
+ height:40px;
+ padding-right:60px;
+ font-size:0.9em;
+}
+
+.navfooter td.previous a {
+ background:url(../images/community/docbook/prev.png) top left no-repeat;
+ padding-top:10px;
+ padding-bottom:15px;
+ height:40px;
+ padding-left:60px;
+ font-size:0.9em;
+}
+
+.navfooter td.home a {
+ background:url(../images/community/docbook/home.png) top left no-repeat;
+ padding-top:10px;
+ padding-bottom:15px;
+ height:40px;
+ padding-left:60px;
+ font-size:0.9em;
+}
+
+.navfooter td.up a {
+ background:url(../images/community/docbook/up.png) top left no-repeat;
+ padding-top:10px;
+ padding-bottom:15px;
+ height:40px;
+ padding-left:60px;
+ font-size:0.9em;
+}
+
+.navfooter a:link, .navfooter a:visited {color:#666 !important;}
+
+.navfooter a:hover, .navfooter a:focus, .navfooter a:active {color:black !important;}
+
+.navfooter a {
+ max-width:10em;
+ overflow:hidden;
+}
+
+.navfooter a:link {text-decoration:none;}
Added: jbpm4/docbook-style/src/main/css/css/documentation.css
===================================================================
--- jbpm4/docbook-style/src/main/css/css/documentation.css (rev 0)
+++ jbpm4/docbook-style/src/main/css/css/documentation.css 2008-09-16 14:57:34 UTC (rev 2264)
@@ -0,0 +1,551 @@
+/* Lists */
+
+ol li, ul li {
+ padding-left:.2em;
+ padding-bottom:.5em;
+ margin:0em;
+}
+
+ul {
+ padding-left:1.6em;
+ list-style-image:url(../images/community/dot.png);
+ list-style-type:circle;
+}
+
+ul ul {
+ list-style-image:url(../images/community/dot2.png);
+ list-style-type:circle;
+}
+
+dt {
+ font-weight:bold;
+ margin-bottom:0em;
+ padding-bottom:0em;
+}
+
+dd {
+ margin:0em;
+ margin-left:2em;
+ padding-top:0em;
+}
+
+li p:first-child, dd p:first-child {
+ padding:0em;
+ margin-top:.3em;
+}
+
+.variablelist, .itemizedlist {margin-top:.6em;}
+
+ul li p:first-child {margin:0em;}
+
+/* Images */
+
+img {
+ display:block;
+ margin:2em 0;
+}
+
+.inlinemediaobject, .inlinemediaobject img {
+ display:inline !important;
+ margin:0em;
+}
+
+.programlisting a img, pre a img, td a img, td img {
+ display:inline;
+ margin:0 0;
+}
+
+/* Needed for Safari */
+
+pre a span img, pre span img {
+ display:inline;
+ margin:0 0;
+}
+
+span.co {
+ position:absolute;
+ left:900px
+}
+
+/* Document modes */
+
+.confidential {
+ background-color:#900;
+ color:white;
+ padding:.5em .5em;
+ font-family:serif;
+ text-transform:uppercase;
+ text-align:center
+}
+
+dt a {font-weight:normal;}
+
+.longdesc-link {display:none;}
+
+.prompt {
+ background-color:#ede7c8;
+ padding:0em .3em;
+}
+
+/* User interface styles */
+
+.screen .replaceable {color:#444;}
+
+.screen {
+ background-color:#ede7c8;
+ color:#333;
+ padding:.5em 1em;
+ margin:0em;
+}
+
+pre, code, .guibutton, .keycap, .guilabel {
+ font-size:0.9em;
+ font-family:verdana, helvetica, sans-serif;
+}
+
+.guibutton, .keycap, .guilabel {
+ font-weight:bold;
+ white-space:nowrap;
+ color:#444;
+ font-family:'Lucida Grande', Geneva, Verdana, Arial, sans-serif;
+}
+
+.guibutton, .guilabel {}
+
+.keycap {padding:.1em.4em;}
+
+.example {
+ background-color:#c8c5ac;
+ padding:5px;
+ margin-bottom:10px;
+}
+
+/* Terminal/Console text */
+
+.command, .computeroutput, .filename, .citetitle, .replaceable, .option {font-weight:bold;}
+
+.command .replaceable {color:#555;}
+
+pre {
+ display:block;
+ background-color:#f9f3b0;
+ color:#333;
+ overflow:auto;
+ padding:10px 10px;
+ line-height:1.2;
+}
+
+code {white-space:nowrap;}
+
+/* Admonitions */
+
+/* Set basic colors and spacing */
+
+div.note {
+ background:#b5bcbd;
+ color:#4c5253;
+ border:1px solid #8a9195;
+ margin-bottom:1.5em;
+ background-repeat:no-repeat;
+ background-position:10px 10px;
+ padding:1em;
+ padding-bottom:20px;
+}
+
+div.tip {
+ background:#7e917f;
+ color:white;
+ border:1px solid #8a9195;
+ margin-bottom:1.5em;
+ background-repeat:no-repeat;
+ background-position:10px 10px;
+ padding:1em;
+ padding-bottom:20px;
+}
+
+div.important {
+ background:#4a5d75;
+ color:white;
+ border:1px solid #8a9195;
+ margin-bottom:1.5em;
+ background-repeat:no-repeat;
+ background-position:10px 10px;
+ padding:1em;
+ padding-bottom:20px;
+}
+
+div.caution {
+ background:#e3a835;
+ color:#533500;
+ border:1px solid #ab710a;
+ margin-bottom:1.5em;
+ background-repeat:no-repeat;
+ background-position:10px 10px;
+ padding:1em;
+ padding-bottom:20px;
+}
+
+div.warning {
+ background:#7b1e1e;
+ color:white;
+ border:1px solid #65504e;
+ margin-bottom:1.5em;
+ background-repeat:no-repeat;
+ background-position:10px 10px;
+ padding:1em;
+ padding-bottom:20px;
+}
+
+/* Pre tag color settings */
+
+div.note pre {
+ background-color:#d6dee0;
+ color:#334558;
+ border:1px solid #e1e9eb;
+}
+
+div.tip pre {
+ background-color:#d5e1d5;
+ color:#334558;
+ border:1px solid #e1e9eb;
+}
+
+div.important pre {
+ background-color:#e1eef4;
+ color:#334558;
+ border:1px solid #e1e9eb;
+}
+
+div.caution pre {
+ background-color:#faf8ed;
+ color:#334558;
+ border:1px solid #e1e9eb;
+}
+
+div.warning pre {
+ background-color:#faf8ed;
+ color:#334558;
+ border:1px solid #e1e9eb;
+}
+
+/* Background images and margin */
+
+div.note, div.tip, div.important, div.caution, div.warning {margin-top:.5em;}
+
+div.note {background-image:url(../images/community/docbook/note.png);}
+div.tip {background-image:url(../images/community/docbook/tip.png);}
+div.important {background-image:url(../images/community/docbook/important.png);}
+div.caution {background-image:url(../images/community/docbook/caution.png);}
+div.warning {background-image:url(../images/community/docbook/warning.png);}
+
+div.note .replaceable, div.tip .replaceable, div.important .replaceable, div.caution .replaceable, div.warning .replaceable {color:#e3dcc0;}
+
+pre .replaceable, tt .replaceable {color:#444 !important;}
+
+div.note h2, div.tip h2, div.important h2, div.caution h2, div.warning h2 {
+ height:32px;
+ font-size:1.3em;
+}
+
+div.note h2 {color:#4c5253;}
+div.tip h2 {color:white;}
+div.important h2 {color:white;}
+div.caution h2 {color:#533500;}
+div.warning h2 {color:white;}
+
+div.note .guilabel, div.tip .guilabel, div.important .guilabel, div.caution .guilabel, div.warning .guilabel {color:white !important;}
+
+div.note li, div.tip li, div.caution li, div.warning li, div.important li {
+ padding-left:10px;
+ margin:0em;
+}
+
+div.note ul, div.tip ul, div.caution ul, div.warning ul, div.important ul {
+ padding-left:40px;
+ margin:0em;
+}
+
+div.note pre pre a:visited, div.tip pre pre a:visited, div.important pre pre a:visited, div.caution pre pre a:visited, div.warning pre pre a:visited,
+div.note pre a:link, div.tip pre a:link, div.important pre a:link, div.caution pre a:link, div.warning pre a:link {color:#0066cc !important;}
+
+div.note a:visited, div.tip a:visited, div.important a:visited, div.warning a:visited,
+div.note a:link, div.tip a:link, div.important a:link, div.warning a:link {color:#f7f2d0;}
+
+div.note a:visited, div.note a:link, div.caution a:link, div.caution a:visited {color:#0066cc;}
+
+/* Admonition icons spacing */
+
+div.note h2, div.note p, div.tip h2, div.tip p, div.caution h2, div.caution p, div.warning h2, div.warning p, div.important h2, div.important p {
+ padding:0em;
+ margin:0em;
+ padding-left:56px;
+}
+
+/* Page Title */
+
+#title {
+ padding:0px;
+ margin:0px;
+}
+
+#title strong {display:none;}
+
+#title a.site_href {
+ display:block;
+ height:89px;
+ width:310px;
+ float:left;
+}
+
+#title a.doc_href {
+ display:block;
+ height:116px;
+ background:transparent url(../images/jbpm.png) top right no-repeat;
+}
+
+/* Table */
+
+table {
+ border:1px solid #aaa;
+ width:100%;
+ border-collapse:collapse;
+}
+
+table th {
+ text-align:left;
+ background-color:#4A5D75;
+ padding:.3em .5em;
+ color:white;
+}
+
+table td {padding:.15em .5em;}
+
+table tr.even td {background-color:#f5f5f5;}
+
+table th p:first-child, table td p:first-child, table li p:first-child {
+ margin-top:0em;
+ padding-top:0em;
+ display:inline;
+}
+
+th, td {border-style:none;}
+
+table table td {
+ border-bottom:1px dotted #aaa !important;
+ background-color:white;
+ padding:.6em 0em;
+}
+
+table table {
+ border:1px solid white !important;
+ font-size:.9em;
+}
+
+td.remarkval {
+ font-size:.9em;
+ color:#444;
+}
+
+.defaultval {font-size:.8em}
+
+td.typeval {font-size:.8em}
+
+td.fieldval {
+ font-weight:bold;
+ font-size:.9em;
+}
+
+th.dbkey {font-size:.9em;}
+
+.lbname, .lbtype, .lbdescr, .lbdriver, .lbhost {
+ color:white;
+ font-weight:bold;
+ background-color:#999;
+ font-size:0.9em;
+ width:120px;
+}
+
+td.remarkval {width:230px;}
+
+td.tname {
+ font-weight:bold;
+ font-size:1.1em;
+}
+
+h5 {font-size:9pt;}
+h6 {font-size:10pt;}
+
+th.dbfield {width:120px;}
+th.dbtype {width:70px;}
+th.dbdefault {width:70px;}
+th.dbnul {width:70px;}
+th.dbkey {width:70px;}
+
+span.book {
+ margin-top:4em;
+ display:block;
+}
+
+span.chapter {
+ display:block;
+ margin-top:0.5em;
+}
+
+/* Breadcrumbs */
+
+#breadcrumbs ul li.first:before {content:" ";}
+
+#breadcrumbs {
+ color:#900;
+ padding:3px;
+ margin-bottom:25px;
+}
+
+#breadcrumbs ul {
+ margin-left:0;
+ padding-left:0;
+ display:inline;
+ border:none;
+}
+
+#breadcrumbs ul li {
+ margin-left:0;
+ padding-left:2px;
+ border:none;
+ list-style:none;
+ display:inline;
+}
+
+#breadcrumbs ul li:before {
+ content:"\0020 \0020 \0020 \00BB \0020";
+ color:#333;
+}
+
+/* Status */
+
+.alpha1 {background:white url(../images/community/watermark-alpha1.png) top left repeat;}
+.alpha2 {background:white url(../images/community/watermark-alpha2.png) top left repeat;}
+.beta1 {background:white url(../images/community/watermark-beta1.png) top left repeat;}
+.beta2 {background:white url(../images/community/watermark-beta2.png) top left repeat;}
+.pre-release-candidate {background:white url(../images/community/watermark-pre-release-candidate.png) top left repeat;}
+.release-candidate {background:white url(../images/community/watermark-release-candidate.png) top left repeat;}
+
+/* Index */
+
+.glossary h3, .index h3 {
+ font-size:2em;
+ color:#aaa;
+ margin:0em;
+}
+
+.indexdiv {margin-bottom:1em;}
+
+.glossary dt, .index dt {
+ font-size:.9em;
+ color:#444;
+ padding-top:.5em;
+}
+
+.glossary dl dl dt, .index dl dl dt {
+ font-size:.85em;
+ color:#777;
+ line-height:1.2em;
+ font-weight:normal;
+ padding-top:0em;
+}
+
+.index dl dl dt:before {
+ content:"- ";
+ color:#ccc;
+}
+
+/* Changes */
+
+.footnotes {}
+
+.footnote {
+ padding:.2em 1em;
+ background-color:#c8c5ac;
+ font-size:.9em;
+ margin:0em;
+ margin-bottom:.5em;
+ color:#222;
+}
+
+table .footnote {margin:1em .5em;}
+
+sup {
+ padding:0em .3em;
+ padding-left:0em;
+}
+
+.footnote {position:relative;}
+
+.footnote sup {
+ color:#e3dcc0;
+ font-size:1.8em;
+ position:absolute;
+ left:.4em;
+}
+
+.footnote sup a:link, .footnote sup a:visited {
+ color:#92917d;
+ text-decoration:none;
+}
+
+.footnote:hover sup a {
+ color:#fff;
+ text-decoration:none;
+}
+
+.footnote p {padding-left:5em;}
+
+.footnote a:link, .footnote a:visited {color:#00537c;}
+
+.footnote a:hover {color:white;}
+
+li p:first-child {
+ margin:0em !important;
+ padding:0em !important;
+}
+
+div.chapter, div.section {padding-top:2em;}
+
+.revhistory {font-size:}
+
+pre .replaceable, pre .keycap {color:white;}
+
+pre {
+ font-family:courier new;
+ background-color:#F5F5F5;
+ border:1px solid #CCCCCC;
+ padding:5px 15px 5px 25px;
+}
+
+div.note .replaceable, div.tip .replaceable, div.important .replaceable, div.caution .replaceable, div.warning .replaceable,
+div.note .keycap, div.tip .keycap, div.important .keycap, div.caution .keycap, div.warning .keycap {color:white;}
+
+div.abstract {font-size:larger;}
+
+.authorgroup {}
+
+.authorgroup h4 {
+ padding:0em;
+ margin:0em;
+ margin-top:1em;
+}
+
+.author, .editor, .translator, .othercredit {display:block;}
+
+/* Simpler author style on contents page */
+
+.authorgroup div {
+ margin-left:10px;
+ margin-right:10px;
+ margin-bottom:15px;
+}
+
+ul li p:last-child {
+ margin-bottom:0em;
+ padding-bottom:0em;
+}
Added: jbpm4/docbook-style/src/main/css/css/jbossorg.css
===================================================================
--- jbpm4/docbook-style/src/main/css/css/jbossorg.css (rev 0)
+++ jbpm4/docbook-style/src/main/css/css/jbossorg.css 2008-09-16 14:57:34 UTC (rev 2264)
@@ -0,0 +1,80 @@
+@import url("documentation.css");
+@import url("docnav.css");
+@import url("reports.css");
+@import url("extensions.css");
+@import url("codehighlight.css");
+
+body {
+ background-image:url(../images/bg.png);
+ background-repeat:repeat-x;
+ margin:0 auto;
+ font-family:'Lucida Grande', Geneva, Verdana, Arial, sans-serif;
+ font-size:12px;
+ max-width:55em;
+ padding:0em 2em;
+ color:#333;
+ line-height:150%;
+ text-align:justify;
+}
+
+/* Links */
+
+a:link {color:#0066cc;}
+
+a:visited {color:#6699cc;}
+
+div.longdesc-link {
+ float:right;
+ color:#999;
+}
+
+/* Headings */
+
+h1, h2, h3, h4, h5, h6 {
+ color:#4a5d75;
+ line-height:130%;
+ margin-top:0em;
+ font-family:'Lucida Grande', Geneva, Verdana, Arial, sans-serif;
+ background-color:transparent;
+}
+
+h1 {
+ background-image:url(../images/community/title_hdr.png);
+ background-repeat:no-repeat;
+ border-top:1px dotted #CCCCCC;
+ line-height:1.2em;
+ color:#182737;
+ font-size:2em;
+ padding:1.5em;
+}
+
+h2 {font-size:1.6em;}
+
+h3 {
+ font-size:1.3em;
+ padding-top:0em;
+ padding-bottom:0em;
+}
+
+h4 {
+ font-size:1.1em;
+ padding-top:0em;
+ padding-bottom:0em;
+}
+
+h5.formalpara {
+ font-size:1em;
+ margin-top:2em;
+ margin-bottom:.8em;
+}
+
+/* Element rules */
+
+hr {
+ border-collapse:collapse;
+ border-style:none;
+ border-top:1px dotted #ccc;
+ width:100% !important;
+}
+
+sup {color:#999;}
Added: jbpm4/docbook-style/src/main/css/css/reports.css
===================================================================
--- jbpm4/docbook-style/src/main/css/css/reports.css (rev 0)
+++ jbpm4/docbook-style/src/main/css/css/reports.css 2008-09-16 14:57:34 UTC (rev 2264)
@@ -0,0 +1,231 @@
+/* Reports */
+
+.reports ul.locale {list-style:none;}
+
+.reports ul {
+ padding:0em;
+ margin:0em;
+}
+
+.reports ul.locale li {
+ font-size:small;
+ color:#000;
+ display:block;
+ border:1px solid #eee;
+ float:left;
+ padding-right:2em;
+ margin-right:1em;
+ margin-bottom:1em;
+}
+
+.reports ul.locale li a {
+ font-size:1.2em;
+ display:block;
+ padding-top:.1em;
+ padding-bottom:.5em;
+}
+
+.reports ul.locale strong {
+ display:block;
+ margin:0em;
+ padding:0em;
+ margin-bottom:-2.2em;
+}
+
+.reports ul.locale span.value {
+ display:block;
+ position:relative;
+ text-align:right;
+ margin-right:-1.5em;
+ font-size:1.0em;
+ color:#444;
+}
+
+.reports ul.locale li {
+ width:12em;
+ display:block;
+ float:left;
+ margin:0em;
+ clear:none;
+}
+
+.reports ul.locale li div.progress {
+ font-size:1em;
+ width:13.2em;
+ position:relative;
+ left:0em;
+ top:0em;
+ margin-bottom:0em;
+}
+
+.reports h2 {
+ font-size:1em;
+ margin:0em;
+}
+
+.reports li {}
+
+.reports li:hover {
+ background-color:#666;
+ border-color:#444 !important;
+ color:white !important;
+}
+
+.reports li:hover strong, .reports li:hover h2, .reports li:hover a, .reports li:hover span.value {color:white;}
+
+/* Uniform */
+
+body.results, body.reports {
+ max-width:57em !important;
+ padding:0em !important;
+}
+
+/* Progress Bar */
+
+div.progress {
+ display:block;
+ float:left;
+ width:16em;
+ background:#c00 url(../images/community/shine.png) top left repeat-x;
+ height:1em;
+}
+
+div.progress span {
+ height:1em;
+ float:left;
+}
+
+div.progress span.translated {background:#6c3 url(../images/community/shine.png) top left repeat-x;}
+div.progress span.fuzzy {background:#ff9f00 url(../images/community/shine.png) top left repeat-x;}
+
+/* Results */
+
+.results ul.locale {
+ list-style:none;
+ padding:0em;
+ margin:0em;
+}
+
+.results .pofile {
+ padding:0em !important;
+ margin:0em;
+}
+
+.results ul.locale li {
+ border-top:1px solid #eee;
+ padding:0em;
+ margin:0em;
+ padding-left:32px;
+}
+
+.results ul.locale .pofile {
+ font-size:1.2em;
+ display:block;
+ width:100%;
+ color:#444;
+ padding:0em;
+ margin:0em;
+}
+
+.results span.value {color:#888;}
+
+.results strong {font-weight:normal;}
+
+.results .home a {
+ display:block;
+ margin:0 auto;
+ width:5em;
+ background:url(../images/community/docbook/home.png) top left no-repeat;
+ padding:5px;
+ padding-left:28px;
+ font-size:1.2em;
+}
+
+.results ul.locale li:hover, .results ul.locale li:hover span.pofile, .results ul.locale li:hover strong, .results ul.locale li:hover span.value {
+ background-color:#666 !important;
+ color:white;
+}
+
+ul.locale {list-style:none;}
+
+ul.locale li.total {
+ font-size:small;
+ color:#777;
+ width:31em;
+ display:block;
+ float:left;
+ margin-right:2em;
+ clear:none !important;
+}
+
+ul.locale li {
+ clear:both;
+ font-size:small;
+ color:#777;
+ display:block;
+}
+
+ul.locale strong, span.value {
+ font-weight:normal;
+ color:#888;
+ font-size:.7em;
+}
+
+ul.locale li a {
+ font-size:1.2em;
+ display:block;
+ padding-top:.2em;
+}
+
+ul.locale li.total div.progress {
+ position:relative;
+ left:0em;
+ top:0em;
+ margin-bottom:0em;
+}
+
+ul.locale li {width:100%;}
+
+ul.locale li div.progress {
+ float:left;
+ position:relative;
+ left:30.5em;
+ top:-2em;
+ margin:0em;
+ margin-bottom:-3em;
+}
+
+li.total {padding:0em !important;}
+
+li.total {
+ float:right;
+ max-width:16em;
+ padding:.5em;
+ margin:0 auto;
+ padding-top:.5em;
+ background-color:#f7f2d0;
+ font-size:1.3em !important;
+ color:#ccc !important;
+ margin-bottom:1em;
+ min-height:9.5em;
+}
+
+li.total .value {
+ color:#444;
+ font-size:.8em;
+}
+
+li.total strong {
+ display:block;
+ color:black;
+ font-weight:bold;
+}
+
+li.total span.value {
+ position:relative;
+ display:block;
+ top:-1.25em;
+ text-align:right;
+}
+
+.pofile {position:relative;}
17 years, 7 months
JBoss JBPM SVN: r2263 - in jbpm4/pvm/trunk/modules: core/src/main/java/org/jbpm/pvm/internal/spring and 9 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-09-16 08:40:52 -0400 (Tue, 16 Sep 2008)
New Revision: 2263
Added:
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/EmbeddedTests.java
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/Loan.hbm.xml
jbpm4/pvm/trunk/modules/manual/src/main/docbook/en/images/loan.db.png
Removed:
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/Order.hbm.xml
Modified:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/ExecutionType.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/spring/SpringEnvironment.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/JbpmTestCase.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/EmbeddedPersistenceTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/Loan.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/spring/SpringTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java
jbpm4/pvm/trunk/modules/core/src/test/resources/hibernate.properties
jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/hibernate.cfg.xml
jbpm4/pvm/trunk/modules/manual/src/main/docbook/en/modules/ch02-ExecutionModes.xml
jbpm4/pvm/trunk/modules/manual/src/main/docbook/en/modules/ch03-Architecture.xml
Log:
docs
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/ExecutionType.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/ExecutionType.java 2008-09-16 11:56:56 UTC (rev 2262)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/ExecutionType.java 2008-09-16 12:40:52 UTC (rev 2263)
@@ -16,6 +16,7 @@
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.model.NodeImpl;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
+import org.jbpm.pvm.internal.util.ReflectUtil;
public class ExecutionType implements UserType, ParameterizedType {
@@ -57,10 +58,10 @@
}
Class<?> ownerClass = owner.getClass();
try {
- Method method = ownerClass.getMethod("getProcessDefinition");
- processDefinition = (ProcessDefinitionImpl) method.invoke(null, (Object[]) null);
+ Method method = ownerClass.getDeclaredMethod("getProcessDefinition");
+ processDefinition = (ProcessDefinitionImpl) ReflectUtil.invoke(method, null, null);
} catch (Exception e) {
- throw new RuntimeException("couldn't get process definition for "+owner);
+ throw new RuntimeException("couldn't get process definition for "+owner, e);
}
return processDefinition;
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/spring/SpringEnvironment.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/spring/SpringEnvironment.java 2008-09-16 11:56:56 UTC (rev 2262)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/spring/SpringEnvironment.java 2008-09-16 12:40:52 UTC (rev 2263)
@@ -42,9 +42,6 @@
addContext(new SpringEnvironmentContext(springEnvironmentFactory.getApplicationContext()));
}
- public void close() {
- }
-
public ClassLoader getClassLoader() {
return null;
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/JbpmTestCase.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/JbpmTestCase.java 2008-09-16 11:56:56 UTC (rev 2262)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/JbpmTestCase.java 2008-09-16 12:40:52 UTC (rev 2263)
@@ -38,12 +38,14 @@
}
public void setUp() throws Exception {
+ assertNull(Environment.getCurrent());
LogFormatter.resetIndentation();
log.info("=== starting "+getName()+" =============================");
}
public void tearDown() throws Exception {
log.info("=== ending "+getName()+" =============================\n");
+ assertNull(Environment.getCurrent());
}
public void assertTextPresent(String expected, String value) {
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java 2008-09-16 11:56:56 UTC (rev 2262)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/DbTests.java 2008-09-16 12:40:52 UTC (rev 2263)
@@ -25,6 +25,7 @@
import junit.framework.TestSuite;
import org.jbpm.pvm.api.db.continuation.ContinuationTests;
+import org.jbpm.pvm.api.db.embedded.EmbeddedTests;
import org.jbpm.pvm.api.db.svc.DbSvcTests;
import org.jbpm.pvm.api.spring.SpringTests;
import org.jbpm.pvm.api.tx.TxTests;
@@ -57,8 +58,9 @@
TestSuite variableTypeTests = new TestSuite(VariableCustomTypeTest.class);
suite.addTest(new EnvironmentFactoryTestSetup(variableTypeTests, "org/jbpm/pvm/internal/db/type/environmentCustomTypes.cfg.xml"));
- // Spring tests do not use EnvironmentFactoryTestCase
+ // These tests do not use EnvironmentFactoryTestCase
suite.addTest(SpringTests.suite());
+ suite.addTest(EmbeddedTests.suite());
//$JUnit-END$
return suite;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/EmbeddedPersistenceTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/EmbeddedPersistenceTest.java 2008-09-16 11:56:56 UTC (rev 2262)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/EmbeddedPersistenceTest.java 2008-09-16 12:40:52 UTC (rev 2263)
@@ -52,12 +52,14 @@
loan = (Loan) session.get(Loan.class, loan.getDbid());
assertEquals("evaluate", loan.getState());
loan.approve();
- assertEquals("end", loan.getState());
+ assertEquals("archive", loan.getState());
newTransaction();
loan = (Loan) session.get(Loan.class, loan.getDbid());
- assertEquals("validate", loan.getState());
+ assertEquals("archive", loan.getState());
+ loan.archiveComplete();
+ assertEquals("end", loan.getState());
commitTransaction();
}
@@ -77,13 +79,13 @@
loan = (Loan) session.get(Loan.class, loan.getDbid());
assertEquals("evaluate", loan.getState());
- loan.approve();
+ loan.reject();
assertEquals("end", loan.getState());
newTransaction();
loan = (Loan) session.get(Loan.class, loan.getDbid());
- assertEquals("validate", loan.getState());
+ assertEquals("end", loan.getState());
}
Added: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/EmbeddedTests.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/EmbeddedTests.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/EmbeddedTests.java 2008-09-16 12:40:52 UTC (rev 2263)
@@ -0,0 +1,17 @@
+package org.jbpm.pvm.api.db.embedded;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+public class EmbeddedTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("org.jbpm.pvm.api.db.embedded");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(EmbeddedPersistenceTest.class);
+ //$JUnit-END$
+ return suite;
+ }
+
+}
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/Loan.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/Loan.java 2008-09-16 11:56:56 UTC (rev 2262)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/embedded/Loan.java 2008-09-16 12:40:52 UTC (rev 2263)
@@ -31,7 +31,7 @@
*/
public class Loan {
- // the loan process definition as a static resource
+ /** the loan process definition as a static resource */
private static final ClientProcessDefinition processDefinition = createLoanProcess();
private static ClientProcessDefinition createLoanProcess() {
@@ -51,12 +51,17 @@
return processDefinition;
}
+ /** exposes the process definition to the execution hibernate type */
+ private static ClientProcessDefinition getProcessDefinition() {
+ return processDefinition;
+ }
+
long dbid;
String customer;
double amount;
ClientExecution execution;
- // constructor for persistence
+ /** constructor for persistence */
protected Loan() {
}
@@ -79,9 +84,9 @@
}
public String getState() {
- return execution.getNode().getName();
+ return execution.getNodeName();
}
-
+
// getters //////////////////////////////////////////////////////////////////
public long getDbid() {
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/spring/SpringTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/spring/SpringTest.java 2008-09-16 11:56:56 UTC (rev 2262)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/spring/SpringTest.java 2008-09-16 12:40:52 UTC (rev 2263)
@@ -40,6 +40,8 @@
EnvironmentFactory environmentFactory = (EnvironmentFactory) applicationContext.getBean("environmentFactory");
CommandService commandService = environmentFactory.get(CommandService.class);
+
+ assertNull(Environment.getCurrent());
Session session = (Session) commandService.execute(new Command<Object>() {
public Object execute(Environment environment) throws Exception {
@@ -54,6 +56,8 @@
assertFalse(session.isOpen());
+ assertNull(Environment.getCurrent());
+
/* TODO translate the DeployerManager to a data structure that is
* easy to wire up with spring
ProcessService processService = environmentFactory.get(ProcessService.class);
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java 2008-09-16 11:56:56 UTC (rev 2262)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java 2008-09-16 12:40:52 UTC (rev 2263)
@@ -110,7 +110,7 @@
public void testExclusiveMessageProcessing() {
insertExclusiveTestMessages();
-
+
JobExecutor jobExecutor = getEnvironmentFactory().get(JobExecutor.class);
jobExecutor.start();
try {
@@ -121,7 +121,6 @@
jobExecutor.stop(true);
}
-
commandService.execute(new Command<Object>() {
public Object execute(Environment environment) throws Exception {
// exclusiveMessageIds maps execution keys to a set of thread ids.
@@ -297,7 +296,6 @@
return null;
}
});
- Environment environment = getEnvironmentFactory().openEnvironment();
}
Modified: jbpm4/pvm/trunk/modules/core/src/test/resources/hibernate.properties
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/hibernate.properties 2008-09-16 11:56:56 UTC (rev 2262)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/hibernate.properties 2008-09-16 12:40:52 UTC (rev 2263)
@@ -9,5 +9,3 @@
# hibernate.show_sql true
hibernate.format_sql true
hibernate.use_sql_comments true
-
-hibernate.jdbc.batch_size 0
\ No newline at end of file
Copied: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/Loan.hbm.xml (from rev 2248, jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/Order.hbm.xml)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/Loan.hbm.xml (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/Loan.hbm.xml 2008-09-16 12:40:52 UTC (rev 2263)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.jbpm.pvm.api.db.embedded" default-access="field">
+
+ <typedef name="execution" class="org.jbpm.pvm.internal.hibernate.ExecutionType" />
+
+ <class name="Loan" table="LOAN">
+
+ <id name="dbid">
+ <generator class="sequence"/>
+ </id>
+
+ <property name="execution" type="execution" />
+ <property name="customer" />
+ <property name="amount" />
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Property changes on: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/Loan.hbm.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Deleted: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/Order.hbm.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/Order.hbm.xml 2008-09-16 11:56:56 UTC (rev 2262)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/Order.hbm.xml 2008-09-16 12:40:52 UTC (rev 2263)
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-
-<hibernate-mapping package="org.jbpm.pvm.api.db.embedded" default-access="field">
-
- <typedef name="execution" class="org.jbpm.pvm.internal.hibernate.ExecutionType" />
-
- <class name="Order" table="ORDERS">
-
- <id name="dbid">
- <generator class="sequence"/>
- </id>
-
- <property name="processInstance" type="execution" />
-
- </class>
-
-</hibernate-mapping>
\ No newline at end of file
Modified: jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/hibernate.cfg.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/hibernate.cfg.xml 2008-09-16 11:56:56 UTC (rev 2262)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/org/jbpm/pvm/api/db/embedded/hibernate.cfg.xml 2008-09-16 12:40:52 UTC (rev 2263)
@@ -17,7 +17,7 @@
<property name="hibernate.format_sql">true"</property>
<property name="hibernate.use_sql_comments">true"</property>
- <mapping resource="org/jbpm/pvm/api/db/embedded/Order.hbm.xml"/>
+ <mapping resource="org/jbpm/pvm/api/db/embedded/Loan.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Added: jbpm4/pvm/trunk/modules/manual/src/main/docbook/en/images/loan.db.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/pvm/trunk/modules/manual/src/main/docbook/en/images/loan.db.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: jbpm4/pvm/trunk/modules/manual/src/main/docbook/en/modules/ch02-ExecutionModes.xml
===================================================================
--- jbpm4/pvm/trunk/modules/manual/src/main/docbook/en/modules/ch02-ExecutionModes.xml 2008-09-16 11:56:56 UTC (rev 2262)
+++ jbpm4/pvm/trunk/modules/manual/src/main/docbook/en/modules/ch02-ExecutionModes.xml 2008-09-16 12:40:52 UTC (rev 2263)
@@ -134,9 +134,7 @@
<hibernate-session-factory />
<id-generator />
-
<variable-types resource="org/jbpm/pvm/pvm.types.xml" />
-
<job-executor auto-start="false" />
</environment-factory>
@@ -150,6 +148,19 @@
</environment>
</contexts></programlisting>
+ <para>And next to it a hibernate.properties like this</para>
+ <literal>hibernate.properties:</literal>
+ <programlisting>hibernate.dialect org.hibernate.dialect.HSQLDialect
+hibernate.connection.driver_class org.hsqldb.jdbcDriver
+hibernate.connection.url jdbc:hsqldb:mem:.
+hibernate.connection.username sa
+hibernate.connection.password
+hibernate.hbm2ddl.auto create-drop
+hibernate.cache.use_second_level_cache true
+hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider
+# hibernate.show_sql true
+hibernate.format_sql true
+hibernate.use_sql_comments true</programlisting>
<para>Then you can obtain the services from the environment factory like this:
</para>
<programlisting>EnvironmentFactory environmentFactory = new PvmEnvironmentFactory("environment.cfg.xml");
@@ -157,15 +168,224 @@
processService = environmentFactory.get(ProcessService.class);
executionService = environmentFactory.get(ExecutionService.class);
managementService = environmentFactory.get(ManagementService.class);</programlisting>
- <para>
+ <para>The responsibility of the <literal>ProcessService</literal> is to manage
+ the repository of process definitions. Before we can start a process execution,
+ the process definition needs to be deployed into the process repository.
+ Process definitions can be supplied in various formats and process definition
+ languages. A deployment collects process definition information from various
+ sources like a ZIP file, an XML file or a process definition object.
+ The method <literal>ProcessService.deploy</literal> will take a deployment
+ through all the deployers that are configured in the configuration file.
</para>
- </section>
+ <para>In this example, we'll supply a process definition programmatically
+ for deployment.</para>
+ <programlisting>ClientProcessDefinition processDefinition = ProcessFactory.build("loan")
+ .node("submit loan request").initial().behaviour(AutomaticActivity.class)
+ .transition().to("evaluate")
+ .node("evaluate").behaviour(WaitState.class)
+ .transition("approve").to("wire money")
+ .transition("reject").to("end")
+ .node("wire money").behaviour(AutomaticActivity.class)
+ .transition().to("archive")
+ .node("archive").behaviour(WaitState.class)
+ .transition().to("end")
+ .node("end").behaviour(WaitState.class)
+.done();
+Deployment deployment = new Deployment(processDefinition);
+processService.deploy(deployment);</programlisting>
+ <para>Now, a version of that process definition is stored in the database.
+ The <literal>check-version</literal> deployer will have assigned version 1
+ to the stored process definition. The <literal>create-id</literal> deployer
+ will have distilled id <literal>loan:1</literal> from the process name and the
+ assigned version.
+ </para>
+ <para>Deploying that process again will lead to a new process definition
+ version being created in the database. But an incremented version number will
+ be assigned. For the purpose of versioning, process definitions are considered
+ equal if they have the same name.</para>
+ <para>It is recommended that a user provided key reference is supplied for
+ all process executions. Starting a new process execution goes like this:
+ </para>
+ <programlisting>Execution execution = executionService.startExecution("loan:1", "request7836");</programlisting>
+ <para>The return value is an execution interface, which prevents navigation of relations.
+ That is because outside of the service methods, the transaction and hibernate session
+ is not guaranteed to still be open. In fact, the default configuration as given
+ above will only keep the transaction and session open for the duration of the
+ service method. So navigating the relations outside of the service methods might result
+ into a hibernate <literal>LazyInitializationException</literal>. But the
+ current node name can still be verified:
+ </para>
+ <programlisting>assertEquals("evaluate", execution.getNodeName());</programlisting>
+ <para>Also very important is the generated id that can be obtained. The default
+ <literal>id-generator</literal> will use the process definition id and the
+ given key to make a unique id for the process execution like this:</para>
+ <programlisting>assertEquals("loan:1/request7836", execution.getId());</programlisting>
+ <para>That id must be when providing the subsequent external triggers to the
+ process execution like this:
+ </para>
+ <programlisting>executionService.signalExecution("loan:1/request7836", "approve");</programlisting>
+ </section>
+
<section id="embeddedexecutionmode">
<title>Embedded execution mode</title>
<para>Embedded execution mode means that the state of a process is stored
- as a string column inside a user domain object like e.g. an Order.
+ as a string column inside a user domain object like e.g. a loan.
</para>
+ <programlisting>public class Loan {
+
+ <emphasis role="bold">/** the loan process definition as a static resource */
+ private static final ClientProcessDefinition processDefinition = createLoanProcess();
+
+ private static ClientProcessDefinition createLoanProcess() {
+ ClientProcessDefinition processDefinition = ProcessFactory.build("loan")
+ .node("submit loan request").initial().behaviour(AutomaticActivity.class)
+ .transition().to("evaluate")
+ .node("evaluate").behaviour(WaitState.class)
+ .transition("approve").to("wire money")
+ .transition("reject").to("end")
+ .node("wire money").behaviour(AutomaticActivity.class)
+ .transition().to("archive")
+ .node("archive").behaviour(WaitState.class)
+ .transition().to("end")
+ .node("end").behaviour(WaitState.class)
+ .done();
+
+ return processDefinition;
+ }
+
+ /** exposes the process definition to the execution hibernate type */
+ private static ClientProcessDefinition getProcessDefinition() {
+ return processDefinition;
+ }
+ </emphasis>
+
+ long dbid;
+ String customer;
+ double amount;
+ <emphasis role="bold">ClientExecution execution;</emphasis>
+
+ /** constructor for persistence */
+ protected Loan() {
+ }
+
+ public Loan(String customer, double amount) {
+ this.customer = customer;
+ this.amount = amount;
+ <emphasis role="bold">this.execution = processDefinition.startProcessInstance();</emphasis>
+ }
+
+ public void approve() {
+ <emphasis role="bold">execution.signal("approve");</emphasis>
+ }
+
+ public void reject() {
+ <emphasis role="bold">execution.signal("reject");</emphasis>
+ }
+
+ public void archiveComplete() {
+ <emphasis role="bold">execution.signal();</emphasis>
+ }
+
+ public String getState() {
+ return <emphasis role="bold">execution.getNodeName()</emphasis>;
+ }
+
+ ...getters...
+}</programlisting>
+ <para>If you ignore the bold parts for a second, you can see that this is a
+ POJO without anything fancy. It's just a bean that can be stored with hibernate.
+ The bold part indicate that implementation part of the class that is related
+ to process and execution. Not that nothing of the process definition or
+ execution is exposed to the user of the Loan class.
+ </para>
+ <para>Each <literal>Loan</literal> object corresponds to a <literal>loan</literal>
+ process instance. Some methods of the <literal>Loan</literal> class correspond
+ to the external triggers that need to be given during the lifecycle of a
+ <literal>Loan</literal> object.
+ </para>
+ <para>Next we'll show how to use this class. To get started we need a</para>
+ <emphasis role="bold"><literal>hibernate.cfg.xml:</literal></emphasis>
+ <programlisting><?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property name="hibernate.connection.url">jdbc:hsqldb:mem:.</property>
+ <property name="hibernate.connection.username">sa</property>
+ <property name="hibernate.connection.password"></property>
+ <property name="hibernate.hbm2ddl.auto">create</property>
+ <property name="hibernate.show_sql">true"</property>
+ <property name="hibernate.format_sql">true"</property>
+ <property name="hibernate.use_sql_comments">true"</property>
+
+ <mapping resource="Loan.hbm.xml"/>
+
+ </session-factory>
+</hibernate-configuration></programlisting>
+ <para>And a</para>
+ <emphasis role="bold"><literal>Loan.hbm.xml:</literal></emphasis>
+ <programlisting><?xml version="1.0"?<
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"<
+
+<hibernate-mapping package="org.jbpm.pvm.api.db.embedded" default-access="field"<
+
+ <typedef name="execution" class="org.jbpm.pvm.internal.hibernate.ExecutionType" /<
+
+ <class name="Loan" table="LOAN"<
+
+ <id name="dbid"<
+ <generator class="sequence"/<
+ </id<
+
+ <property name="execution" type="execution" /<
+ <property name="customer" /<
+ <property name="amount" /<
+
+ </class<
+
+</hibernate-mapping<</programlisting>
+ <para>Then you can use the Loan class like this in a test</para>
+ <programlisting>Configuration configuration = new Configuration();
+configuration.configure();
+SessionFactory sessionFactory = configuration.buildSessionFactory();
+
+// start a session/transaction
+Session session = sessionFactory.openSession();
+Transaction transaction = session.beginTransaction();
+
+Loan loan = new Loan("john doe", 234.0);
+session.save(loan);
+assertEquals("evaluate", loan.getState());
+
+// start a new session/transaction
+transaction.commit();
+session.close();
+session = sessionFactory.openSession();
+transaction = session.beginTransaction();
+
+loan = (Loan) session.get(Loan.class, loan.getDbid());
+assertEquals("evaluate", loan.getState());
+loan.approve();
+assertEquals("archive", loan.getState());
+
+// start a new session/transaction
+transaction.commit();
+session.close();</programlisting>
+ <para>After executing this code snippet, this is the loan record in the DB:</para>
+ <figure id="loan.db">
+ <title>The loan record in the DB</title>
+ <mediaobject><imageobject><imagedata align="center" fileref="images/loan.db.png"/></imageobject></mediaobject>
+ </figure>
</section>
</chapter>
\ No newline at end of file
Modified: jbpm4/pvm/trunk/modules/manual/src/main/docbook/en/modules/ch03-Architecture.xml
===================================================================
--- jbpm4/pvm/trunk/modules/manual/src/main/docbook/en/modules/ch03-Architecture.xml 2008-09-16 11:56:56 UTC (rev 2262)
+++ jbpm4/pvm/trunk/modules/manual/src/main/docbook/en/modules/ch03-Architecture.xml 2008-09-16 12:40:52 UTC (rev 2263)
@@ -4,8 +4,9 @@
<section id="apis">
<title>APIs</title>
<para>The Process Virtual Machine has 4 integrated API's that together
- offer a complete coverage of working with processes. Each of the APIs has a
- specific purpose
+ offer a complete coverage of working with processes in the different execution modes.
+ Each of the APIs has a specific purpose that fits within the following overall
+ architecture.
</para>
<figure id="apis">
<title>The 4 API's of the Process Virtual Machine</title>
@@ -26,27 +27,124 @@
process events. It's very similar to the activity API with that exception that event listeners
are not able to control the flow of execution.
</para>
- </section>
+ </section>
<section>
- <title>Configuration</title>
- <para>
+ <title>Activity API</title>
+ <para>The activity API allows to implement the runtime activity behaviour in Java.
</para>
+ <programlisting>public interface Activity extends Serializable {
+ void execute(ActivityExecution execution) throws Exception;
+}</programlisting>
+ <para>An activity is the behaviour of the node to which it is associated.
+ The provided execution is the execution that arrives in the node.
+ The interface <literal>ActivityExecution</literal> exposes special
+ methods to control the execution flow.
+ </para>
+ <programlisting>public interface ActivityExecution extends OpenExecution {
+
+ void waitForSignal();
+ void takeDefaultTransition();
+ void take(String transitionName);
+ void execute(String nodeName);
+
+ Execution createExecution();
+ void removeExecution(Execution child);
+
+ ClientProcessInstance createSubProcessInstance(ClientProcessDefinition processDefinition);
+
+ ...
+
+}</programlisting>
</section>
+
<section>
+ <title>Event listener API</title>
+ <para>The event listener API allows for listeners to be developed in Java code
+ and that are invoked on specific process events like entering a node or leaving
+ a node. It is very similar to the activity API, but the difference is
+ that the propagation of the execution flow cannot be controlled. E.g. when an execution
+ is taking a transition, a listener to that event can be notified, but since the
+ transition is already being taking, the execution flow cannot be changed
+ by the event listeners.
+ </para>
+ <programlisting>public interface EventListener extends Serializable {
+
+ void notify(EventListenerExecution execution) throws Exception;
+
+}</programlisting>
+ </section>
+
+ <section>
+ <title>Client API</title>
+ <para>The client API was already introduced above in the object execution mode
+ and embedded execution mode. It's an interface that exposes the methods for
+ managing executions on the plain process definition and execution objects directly.
+ </para>
+ <para>At a minimal, the client API and the activity API are needed to create
+ some a process definition with activities and execute it.
+ </para>
+ </section>
+
+ <section>
<title>Environment</title>
- <para>
+ <para>In the persistent execution mode, the first purpose of the environment is
+ to enable processes to be executed in different transactional environments like
+ standard Java, enterprise Java, SEAM and Spring.
</para>
+ <para>The PVM code itself will only use transactional resources through self-defined
+ interfaces. For example, the PVM itself has interfaces for some methods on the hibernate
+ session, a async messaging session and a timer session.
+ </para>
+ <para>The environment allows to configure the actual implementations, lazy
+ initialization of the services on a request-basis and caching the service
+ objects for the duration of the transaction.
+ </para>
+ <para>An environment factory is static and one environment factory can serve
+ all the threads in an application.
+ </para>
+ <programlisting>EnvironmentFactory environmentFactory = new PvmEnvironmentFactory("environment.cfg.xml");</programlisting>
+ <para>Environment blocks can surround persistent process operations
+ like this:
+ </para>
+ <programlisting>Environment environment = environmentFactory.openEnvironment();
+try {
+
+ ... inside the environment block...
+
+} finally {
+ environment.close();
+}</programlisting>
+ <para>The PVM itself will fetch all it's transactional resources and configurations
+ from the environment.
+ </para>
</section>
+
<section>
<title>Commands</title>
- <para>
+ <para>Commands encapsulate operations that are to be executed within an environment
+ block. The main purpose for commands is to capture the logic of
</para>
+ <programlisting>public interface Command<T> extends Serializable {
+
+ T execute(Environment environment) throws Exception;
+
+}</programlisting>
+ <para></para>
</section>
+
<section>
<title>Services</title>
+ <para>Services are session facades that expose methods for persistent usage of
+ the PVM.
+ </para>
+ </section>
+
+ <section>
+ <title>Configuration</title>
<para>
</para>
</section>
+
</chapter>
\ No newline at end of file
17 years, 7 months
JBoss JBPM SVN: r2262 - in jbpm3/trunk/modules/core/src/test: resources/org/jbpm/jbpm1135 and 1 other directory.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2008-09-16 07:56:56 -0400 (Tue, 16 Sep 2008)
New Revision: 2262
Modified:
jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1135/JBPM1135Test.java
jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm1135/timerprocess.xml
Log:
[JBPM-1135] increasing the reliability of event notifications actually affected JBPM1135Test, which relied on a lost notification to pass
Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1135/JBPM1135Test.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1135/JBPM1135Test.java 2008-09-16 09:31:59 UTC (rev 2261)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1135/JBPM1135Test.java 2008-09-16 11:56:56 UTC (rev 2262)
@@ -52,10 +52,13 @@
startJobExecutor();
try
{
- EventCallback.waitForEvent(Event.EVENTTYPE_NODE_ENTER);
+ EventCallback.waitForEvent(Event.EVENTTYPE_TIMER);
beginSessionTransaction();
long processInstanceId = processInstance.getId();
- assertEquals("secondNode", jbpmContext.loadProcessInstance(processInstanceId).getRootToken().getNode().getName());
+ assertEquals("secondNode", jbpmContext.loadProcessInstance(processInstanceId)
+ .getRootToken()
+ .getNode()
+ .getName());
commitAndCloseSession();
EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
Modified: jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm1135/timerprocess.xml
===================================================================
--- jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm1135/timerprocess.xml 2008-09-16 09:31:59 UTC (rev 2261)
+++ jbpm3/trunk/modules/core/src/test/resources/org/jbpm/jbpm1135/timerprocess.xml 2008-09-16 11:56:56 UTC (rev 2262)
@@ -3,18 +3,12 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jbpm.org:jpdl-3.2 http://jbpm.org/xsd/jpdl-3.2.xsd">
- <event type="process-start">
- <action expression="#{eventCallback.processStart}"/>
- </event>
<event type="process-end">
<action expression="#{eventCallback.processEnd}"/>
</event>
- <event type="node-enter">
- <action expression="#{eventCallback.nodeEnter}" />
+ <event type="timer">
+ <action expression="#{eventCallback.timer}" />
</event>
- <event type="node-leave">
- <action expression="#{eventCallback.nodeLeave}" />
- </event>
<start-state name="start">
<transition name="doneStart" to="firstNode" />
17 years, 7 months
JBoss JBPM SVN: r2261 - in projects/jbpm-spec/trunk/modules: api/src/main/java/org/jboss/bpm/test and 10 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-09-16 05:31:59 -0400 (Tue, 16 Sep 2008)
New Revision: 2261
Modified:
projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/DialectHandler.java
projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/DialectRegistry.java
projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java
projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/test/AbstractAPITestCase.java
projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/test/IntegrationTestHelper.java
projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/test/IntegrationTestSetup.java
projects/jbpm-spec/trunk/modules/cts/src/test/resources/jbpm-beans.xml
projects/jbpm-spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/DialectHandlerImpl.java
projects/jbpm-spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessUnmarshaller.java
projects/jbpm-spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBInclude.java
projects/jbpm-spec/trunk/modules/dialects/api10/src/test/resources/jbpm-beans.xml
projects/jbpm-spec/trunk/modules/dialects/jpdl32/src/main/java/org/jboss/bpm/dialect/jpdl32/DialectHandlerImpl.java
projects/jbpm-spec/trunk/modules/dialects/stp/src/main/java/org/jboss/bpm/dialect/stp/DialectHandlerImpl.java
projects/jbpm-spec/trunk/modules/dialects/stp/src/test/resources/jbpm-beans.xml
projects/jbpm-spec/trunk/modules/dialects/xpdl21/src/main/java/org/jboss/bpm/dialect/xpdl21/DialectHandlerImpl.java
projects/jbpm-spec/trunk/modules/ri/src/test/resources/jbpm-beans.xml
projects/jbpm-spec/trunk/modules/samples/airticket/server/src/main/resources/jbpm-beans.xml
Log:
Use URI for dialect nsURI
Modified: projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/DialectHandler.java
===================================================================
--- projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/DialectHandler.java 2008-09-16 08:28:42 UTC (rev 2260)
+++ projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/DialectHandler.java 2008-09-16 09:31:59 UTC (rev 2261)
@@ -25,6 +25,7 @@
import java.io.IOException;
import java.io.Writer;
+import java.net.URI;
import java.net.URL;
import org.jboss.bpm.model.Process;
@@ -37,12 +38,12 @@
*/
public interface DialectHandler
{
- String DEFAULT_NAMESPACE_URI = "urn:bpm.jboss:pdl-0.1";
+ URI DEFAULT_NAMESPACE_URI = URI.create("urn:bpm.jboss:pdl-0.1");
/**
* Get the the supported namespace from this dialect.
*/
- String getNamespaceURI();
+ URI getNamespaceURI();
/**
* Create a {@link Process} from a descriptor.
Modified: projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/DialectRegistry.java
===================================================================
--- projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/DialectRegistry.java 2008-09-16 08:28:42 UTC (rev 2260)
+++ projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/DialectRegistry.java 2008-09-16 09:31:59 UTC (rev 2261)
@@ -23,6 +23,7 @@
//$Id$
+import java.net.URI;
import java.util.Map;
/**
@@ -36,14 +37,14 @@
public static final Object BEAN_NAME = "jBPMDialectRegistry";
// Maps namespaceURI to dialect Id
- private Map<String,String> registry;
+ private Map<URI,String> registry;
- public void setRegistry(Map<String, String> registry)
+ public void setRegistry(Map<URI, String> registry)
{
this.registry = registry;
}
- public String getDialect(String nsURI)
+ public String getDialect(URI nsURI)
{
return registry.get(nsURI);
}
Modified: projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java
===================================================================
--- projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java 2008-09-16 08:28:42 UTC (rev 2260)
+++ projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/ProcessManager.java 2008-09-16 09:31:59 UTC (rev 2261)
@@ -26,6 +26,7 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.net.URI;
import java.net.URL;
import java.util.Collections;
import java.util.HashMap;
@@ -41,6 +42,7 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.bpm.EngineShutdownException;
import org.jboss.bpm.model.Process;
+import org.jboss.bpm.model.Process.ProcessStatus;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -81,7 +83,7 @@
*/
public final Process createProcess(String pXML)
{
- String nsURI = getNamespaceURI(new ByteArrayInputStream(pXML.getBytes()));
+ URI nsURI = getNamespaceURI(new ByteArrayInputStream(pXML.getBytes()));
Process proc = getDialectHandler(nsURI).createProcess(pXML, false);
return proc;
}
@@ -91,7 +93,7 @@
*/
public final Process createProcess(URL pURL) throws IOException
{
- String nsURI = getNamespaceURI(pURL.openStream());
+ URI nsURI = getNamespaceURI(pURL.openStream());
Process proc = getDialectHandler(nsURI).createProcess(pURL, false);
return proc;
}
@@ -112,7 +114,7 @@
* @param status The optional process status
* @return An empty set if the process cannot be found
*/
- public Set<Process> getProcesses(String name, Process.ProcessStatus status)
+ public Set<Process> getProcesses(String name, ProcessStatus status)
{
Set<Process> procSet = new HashSet<Process>();
for (Process aux : procs.values())
@@ -142,7 +144,7 @@
{
if (ProcessEngine.locateProcessEngine().isPrepareForShutdown())
throw new EngineShutdownException("Cannot register a process while engine is shutting down");
-
+
log.debug("registerProcess: " + proc);
procs.put(proc.getID(), proc);
}
@@ -156,7 +158,7 @@
procs.remove(proc.getID());
}
- private String getNamespaceURI(InputStream inStream)
+ private URI getNamespaceURI(InputStream inStream)
{
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
@@ -176,13 +178,13 @@
if (nsURI == null)
throw new IllegalStateException("Cannot get namespace URI from root element");
- return nsURI;
+ return URI.create(nsURI);
}
/**
* Get the handler for the dialect with the given namespace URI
*/
- public DialectHandler getDialectHandler(String nsURI)
+ public DialectHandler getDialectHandler(URI nsURI)
{
String dialectId = dialectRegistry.getDialect(nsURI);
if (dialectId == null)
Modified: projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/test/AbstractAPITestCase.java
===================================================================
--- projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/test/AbstractAPITestCase.java 2008-09-16 08:28:42 UTC (rev 2260)
+++ projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/test/AbstractAPITestCase.java 2008-09-16 09:31:59 UTC (rev 2261)
@@ -28,6 +28,7 @@
import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
+import java.net.URI;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
@@ -347,9 +348,10 @@
/**
* Get the BPM descriptor dialect ID
*/
- protected String getDialectURI()
+ protected URI getDialectURI()
{
- String dialect = System.getProperty("jbpm.dialect.uri", DialectHandler.DEFAULT_NAMESPACE_URI);
- return dialect;
+ String defaultURI = DialectHandler.DEFAULT_NAMESPACE_URI.toString();
+ URI nsURI = URI.create(System.getProperty("jbpm.dialect.uri", defaultURI));
+ return nsURI;
}
}
Modified: projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/test/IntegrationTestHelper.java
===================================================================
--- projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/test/IntegrationTestHelper.java 2008-09-16 08:28:42 UTC (rev 2260)
+++ projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/test/IntegrationTestHelper.java 2008-09-16 09:31:59 UTC (rev 2261)
@@ -49,7 +49,7 @@
*/
public void deploy(String archive) throws Exception
{
- URL url = getArchiveFile(archive).toURL();
+ URL url = getArchiveFile(archive).toURI().toURL();
getDeployer().deploy(url);
}
@@ -57,7 +57,7 @@
*/
public void undeploy(String archive) throws Exception
{
- URL url = getArchiveFile(archive).toURL();
+ URL url = getArchiveFile(archive).toURI().toURL();
getDeployer().undeploy(url);
}
@@ -89,7 +89,7 @@
/** Try to discover the URL for the deployment archive */
public URL getArchiveURL(String archive) throws MalformedURLException
{
- return getArchiveFile(archive).toURL();
+ return getArchiveFile(archive).toURI().toURL();
}
/** Try to discover the File for the deployment archive */
@@ -110,7 +110,7 @@
/** Try to discover the URL for the test resource */
public URL getResourceURL(String resource) throws MalformedURLException
{
- return getResourceFile(resource).toURL();
+ return getResourceFile(resource).toURI().toURL();
}
/** Try to discover the File for the test resource */
Modified: projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/test/IntegrationTestSetup.java
===================================================================
--- projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/test/IntegrationTestSetup.java 2008-09-16 08:28:42 UTC (rev 2260)
+++ projects/jbpm-spec/trunk/modules/api/src/main/java/org/jboss/bpm/test/IntegrationTestSetup.java 2008-09-16 09:31:59 UTC (rev 2261)
@@ -72,7 +72,7 @@
public URL getArchiveURL(String archive) throws MalformedURLException
{
- return delegate.getArchiveFile(archive).toURL();
+ return delegate.getArchiveFile(archive).toURI().toURL();
}
public File getResourceFile(String resource)
@@ -82,7 +82,7 @@
public URL getResourceURL(String resource) throws MalformedURLException
{
- return delegate.getResourceFile(resource).toURL();
+ return delegate.getResourceFile(resource).toURI().toURL();
}
private void getArchiveArray(String archiveList)
Modified: projects/jbpm-spec/trunk/modules/cts/src/test/resources/jbpm-beans.xml
===================================================================
--- projects/jbpm-spec/trunk/modules/cts/src/test/resources/jbpm-beans.xml 2008-09-16 08:28:42 UTC (rev 2260)
+++ projects/jbpm-spec/trunk/modules/cts/src/test/resources/jbpm-beans.xml 2008-09-16 09:31:59 UTC (rev 2261)
@@ -40,7 +40,7 @@
<!-- The DialectRegistry -->
<bean name="jBPMDialectRegistry" class="org.jboss.bpm.client.DialectRegistry">
<property name="registry">
- <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <map keyClass="java.net.URI" valueClass="java.lang.String">
<entry><key>urn:bpm.jboss:pdl-0.1</key><value>api10</value></entry>
<entry><key>urn:jbpm.org:jpdl-3.2</key><value>jpdl32</value></entry>
<entry><key>http://stp.eclipse.org/bpmn</key><value>stp</value></entry>
Modified: projects/jbpm-spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/DialectHandlerImpl.java
===================================================================
--- projects/jbpm-spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/DialectHandlerImpl.java 2008-09-16 08:28:42 UTC (rev 2260)
+++ projects/jbpm-spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/DialectHandlerImpl.java 2008-09-16 09:31:59 UTC (rev 2261)
@@ -27,6 +27,7 @@
import java.io.InputStreamReader;
import java.io.StringReader;
import java.io.Writer;
+import java.net.URI;
import java.net.URL;
import javax.xml.bind.JAXBException;
@@ -43,7 +44,7 @@
*/
public class DialectHandlerImpl implements DialectHandler
{
- public String getNamespaceURI()
+ public URI getNamespaceURI()
{
return DEFAULT_NAMESPACE_URI;
}
Modified: projects/jbpm-spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessUnmarshaller.java
===================================================================
--- projects/jbpm-spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessUnmarshaller.java 2008-09-16 08:28:42 UTC (rev 2260)
+++ projects/jbpm-spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessUnmarshaller.java 2008-09-16 09:31:59 UTC (rev 2261)
@@ -27,6 +27,7 @@
import java.io.Reader;
import java.io.StringWriter;
import java.net.MalformedURLException;
+import java.net.URI;
import java.net.URL;
import javax.management.ObjectName;
@@ -170,7 +171,7 @@
{
for (JAXBInclude incl : jaxbProc.getIncludes())
{
- String nsURI = incl.getNamespace();
+ URI nsURI = incl.getNamespace();
String location = incl.getLocation();
URL procURL;
Modified: projects/jbpm-spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBInclude.java
===================================================================
--- projects/jbpm-spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBInclude.java 2008-09-16 08:28:42 UTC (rev 2260)
+++ projects/jbpm-spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/model/JAXBInclude.java 2008-09-16 09:31:59 UTC (rev 2261)
@@ -23,6 +23,8 @@
//$Id$
+import java.net.URI;
+
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
@@ -35,16 +37,16 @@
@XmlType(name = "Include")
public class JAXBInclude
{
- private String namespace;
+ private URI namespace;
private String location;
- public String getNamespace()
+ public URI getNamespace()
{
return namespace;
}
@XmlAttribute(required = true)
- public void setNamespace(String namespace)
+ public void setNamespace(URI namespace)
{
this.namespace = namespace;
}
Modified: projects/jbpm-spec/trunk/modules/dialects/api10/src/test/resources/jbpm-beans.xml
===================================================================
--- projects/jbpm-spec/trunk/modules/dialects/api10/src/test/resources/jbpm-beans.xml 2008-09-16 08:28:42 UTC (rev 2260)
+++ projects/jbpm-spec/trunk/modules/dialects/api10/src/test/resources/jbpm-beans.xml 2008-09-16 09:31:59 UTC (rev 2261)
@@ -34,7 +34,7 @@
<!-- The DialectRegistry -->
<bean name="jBPMDialectRegistry" class="org.jboss.bpm.client.DialectRegistry">
<property name="registry">
- <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <map keyClass="java.net.URI" valueClass="java.lang.String">
<entry><key>urn:bpm.jboss:pdl-0.1</key><value>api10</value></entry>
</map>
</property>
Modified: projects/jbpm-spec/trunk/modules/dialects/jpdl32/src/main/java/org/jboss/bpm/dialect/jpdl32/DialectHandlerImpl.java
===================================================================
--- projects/jbpm-spec/trunk/modules/dialects/jpdl32/src/main/java/org/jboss/bpm/dialect/jpdl32/DialectHandlerImpl.java 2008-09-16 08:28:42 UTC (rev 2260)
+++ projects/jbpm-spec/trunk/modules/dialects/jpdl32/src/main/java/org/jboss/bpm/dialect/jpdl32/DialectHandlerImpl.java 2008-09-16 09:31:59 UTC (rev 2261)
@@ -27,6 +27,7 @@
import java.io.InputStreamReader;
import java.io.StringReader;
import java.io.Writer;
+import java.net.URI;
import java.net.URL;
import javax.xml.bind.JAXBException;
@@ -45,9 +46,9 @@
*/
public class DialectHandlerImpl implements DialectHandler
{
- public static final String NAMESPACE_URI = "urn:jbpm.org:jpdl-3.2";
+ public static final URI NAMESPACE_URI = URI.create("urn:jbpm.org:jpdl-3.2");
- public String getNamespaceURI()
+ public URI getNamespaceURI()
{
return NAMESPACE_URI;
}
Modified: projects/jbpm-spec/trunk/modules/dialects/stp/src/main/java/org/jboss/bpm/dialect/stp/DialectHandlerImpl.java
===================================================================
--- projects/jbpm-spec/trunk/modules/dialects/stp/src/main/java/org/jboss/bpm/dialect/stp/DialectHandlerImpl.java 2008-09-16 08:28:42 UTC (rev 2260)
+++ projects/jbpm-spec/trunk/modules/dialects/stp/src/main/java/org/jboss/bpm/dialect/stp/DialectHandlerImpl.java 2008-09-16 09:31:59 UTC (rev 2261)
@@ -26,6 +26,7 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.Writer;
+import java.net.URI;
import java.net.URL;
import javax.xml.bind.JAXBException;
@@ -43,9 +44,9 @@
*/
public class DialectHandlerImpl implements DialectHandler
{
- public static final String NAMESPACE_URI = "http://stp.eclipse.org/bpmn";
+ public static final URI NAMESPACE_URI = URI.create("http://stp.eclipse.org/bpmn");
- public String getNamespaceURI()
+ public URI getNamespaceURI()
{
return NAMESPACE_URI;
}
Modified: projects/jbpm-spec/trunk/modules/dialects/stp/src/test/resources/jbpm-beans.xml
===================================================================
--- projects/jbpm-spec/trunk/modules/dialects/stp/src/test/resources/jbpm-beans.xml 2008-09-16 08:28:42 UTC (rev 2260)
+++ projects/jbpm-spec/trunk/modules/dialects/stp/src/test/resources/jbpm-beans.xml 2008-09-16 09:31:59 UTC (rev 2261)
@@ -34,7 +34,7 @@
<!-- The DialectRegistry -->
<bean name="jBPMDialectRegistry" class="org.jboss.bpm.client.DialectRegistry">
<property name="registry">
- <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <map keyClass="java.net.URI" valueClass="java.lang.String">
<entry><key>http://stp.eclipse.org/bpmn</key><value>stp</value></entry>
</map>
</property>
Modified: projects/jbpm-spec/trunk/modules/dialects/xpdl21/src/main/java/org/jboss/bpm/dialect/xpdl21/DialectHandlerImpl.java
===================================================================
--- projects/jbpm-spec/trunk/modules/dialects/xpdl21/src/main/java/org/jboss/bpm/dialect/xpdl21/DialectHandlerImpl.java 2008-09-16 08:28:42 UTC (rev 2260)
+++ projects/jbpm-spec/trunk/modules/dialects/xpdl21/src/main/java/org/jboss/bpm/dialect/xpdl21/DialectHandlerImpl.java 2008-09-16 09:31:59 UTC (rev 2261)
@@ -27,6 +27,7 @@
import java.io.InputStreamReader;
import java.io.StringReader;
import java.io.Writer;
+import java.net.URI;
import java.net.URL;
import javax.xml.bind.JAXBException;
@@ -45,9 +46,9 @@
*/
public class DialectHandlerImpl implements DialectHandler
{
- public static final String NAMESPACE_URI = "http://www.wfmc.org/2008/XPDL2.1";
+ public static final URI NAMESPACE_URI = URI.create("http://www.wfmc.org/2008/XPDL2.1");
- public String getNamespaceURI()
+ public URI getNamespaceURI()
{
return NAMESPACE_URI;
}
Modified: projects/jbpm-spec/trunk/modules/ri/src/test/resources/jbpm-beans.xml
===================================================================
--- projects/jbpm-spec/trunk/modules/ri/src/test/resources/jbpm-beans.xml 2008-09-16 08:28:42 UTC (rev 2260)
+++ projects/jbpm-spec/trunk/modules/ri/src/test/resources/jbpm-beans.xml 2008-09-16 09:31:59 UTC (rev 2261)
@@ -32,7 +32,7 @@
<!-- The DialectRegistry -->
<bean name="jBPMDialectRegistry" class="org.jboss.bpm.client.DialectRegistry">
<property name="registry">
- <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <map keyClass="java.net.URI" valueClass="java.lang.String">
<entry><key>urn:bpm.jboss:pdl-0.1</key><value>api10</value></entry>
<entry><key>urn:jbpm.org:jpdl-3.2</key><value>jpdl32</value></entry>
<entry><key>http://stp.eclipse.org/bpmn</key><value>stp</value></entry>
Modified: projects/jbpm-spec/trunk/modules/samples/airticket/server/src/main/resources/jbpm-beans.xml
===================================================================
--- projects/jbpm-spec/trunk/modules/samples/airticket/server/src/main/resources/jbpm-beans.xml 2008-09-16 08:28:42 UTC (rev 2260)
+++ projects/jbpm-spec/trunk/modules/samples/airticket/server/src/main/resources/jbpm-beans.xml 2008-09-16 09:31:59 UTC (rev 2261)
@@ -36,7 +36,7 @@
<!-- The DialectRegistry -->
<bean name="jBPMDialectRegistry" class="org.jboss.bpm.client.DialectRegistry">
<property name="registry">
- <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <map keyClass="java.net.URI" valueClass="java.lang.String">
<entry><key>urn:bpm.jboss:pdl-0.1</key><value>api10</value></entry>
<entry><key>http://stp.eclipse.org/bpmn</key><value>stp</value></entry>
</map>
17 years, 7 months
JBoss JBPM SVN: r2260 - in jbpm3/trunk/modules/examples/src/test/resources: simple and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-09-16 04:28:42 -0400 (Tue, 16 Sep 2008)
New Revision: 2260
Added:
jbpm3/trunk/modules/examples/src/test/resources/simple/
jbpm3/trunk/modules/examples/src/test/resources/simple/gpd.xml
jbpm3/trunk/modules/examples/src/test/resources/simple/processdefinition.xml
jbpm3/trunk/modules/examples/src/test/resources/simple/processimage.jpg
Log:
Restore the simple example resources
Added: jbpm3/trunk/modules/examples/src/test/resources/simple/gpd.xml
===================================================================
--- jbpm3/trunk/modules/examples/src/test/resources/simple/gpd.xml (rev 0)
+++ jbpm3/trunk/modules/examples/src/test/resources/simple/gpd.xml 2008-09-16 08:28:42 UTC (rev 2260)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container name="simple" width="469" height="438">
+ <node name="start" x="150" y="25" width="140" height="40">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="first" x="150" y="125" width="140" height="40">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="end" x="150" y="225" width="140" height="40"/>
+</root-container>
Property changes on: jbpm3/trunk/modules/examples/src/test/resources/simple/gpd.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/examples/src/test/resources/simple/processdefinition.xml
===================================================================
--- jbpm3/trunk/modules/examples/src/test/resources/simple/processdefinition.xml (rev 0)
+++ jbpm3/trunk/modules/examples/src/test/resources/simple/processdefinition.xml 2008-09-16 08:28:42 UTC (rev 2260)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-definition
+ xmlns="urn:jbpm.org:jpdl-3.2"
+ name="simple">
+ <start-state name="start">
+ <transition name="to_state" to="first">
+ <action name="action" class="com.sample.action.MessageActionHandler">
+ <message>Going to the first state!</message>
+ </action>
+ </transition>
+ </start-state>
+ <state name="first">
+ <transition name="to_end" to="end">
+ <action name="action" class="com.sample.action.MessageActionHandler">
+ <message>About to finish!</message>
+ </action>
+ </transition>
+ </state>
+ <end-state name="end"></end-state>
+</process-definition>
\ No newline at end of file
Property changes on: jbpm3/trunk/modules/examples/src/test/resources/simple/processdefinition.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/examples/src/test/resources/simple/processimage.jpg
===================================================================
(Binary files differ)
Property changes on: jbpm3/trunk/modules/examples/src/test/resources/simple/processimage.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 7 months
JBoss JBPM SVN: r2259 - jbpm3/trunk.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-09-16 00:54:22 -0400 (Tue, 16 Sep 2008)
New Revision: 2259
Modified:
jbpm3/trunk/pom.xml
Log:
Fix distro dependency on userguide
Modified: jbpm3/trunk/pom.xml
===================================================================
--- jbpm3/trunk/pom.xml 2008-09-15 22:21:26 UTC (rev 2258)
+++ jbpm3/trunk/pom.xml 2008-09-16 04:54:22 UTC (rev 2259)
@@ -450,6 +450,7 @@
<id>distro</id>
<modules>
<module>modules/distribution</module>
+ <module>modules/userguide</module>
</modules>
<build>
<plugins>
@@ -481,28 +482,6 @@
</build>
</profile>
- <!--
- Name: release
- Desc: Build the release
- -->
- <profile>
- <id>release</id>
- <modules>
- <module>modules/distribution</module>
- <module>modules/userguide</module>
- </modules>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skipTests>true</skipTests>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
<!-- DATABASE PROFILES ***************************************************************************** -->
<!--
17 years, 7 months
JBoss JBPM SVN: r2258 - jbpm3/trunk/modules/console/src/main/webapp/WEB-INF.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2008-09-15 18:21:26 -0400 (Mon, 15 Sep 2008)
New Revision: 2258
Modified:
jbpm3/trunk/modules/console/src/main/webapp/WEB-INF/jboss-web.xml
Log:
workaround for "mapped-name is required" exception in JBoss 5.0.0.CR1
Modified: jbpm3/trunk/modules/console/src/main/webapp/WEB-INF/jboss-web.xml
===================================================================
--- jbpm3/trunk/modules/console/src/main/webapp/WEB-INF/jboss-web.xml 2008-09-15 22:20:58 UTC (rev 2257)
+++ jbpm3/trunk/modules/console/src/main/webapp/WEB-INF/jboss-web.xml 2008-09-15 22:21:26 UTC (rev 2258)
@@ -21,4 +21,10 @@
<jndi-name>java:JmsXA</jndi-name>
</resource-ref>
+ <!-- workaround for "mapped-name is required" exception in JBoss 5.0.0.CR1 -->
+ <message-destination-ref>
+ <message-destination-ref-name>jms/JobQueue</message-destination-ref-name>
+ <jndi-name>queue/JbpmJobQueue</jndi-name>
+ </message-destination-ref>
+
</jboss-web>
17 years, 7 months
JBoss JBPM SVN: r2257 - in jbpm3/trunk/modules: enterprise/jar/src/test/java/org/jbpm/msg/jms and 1 other directory.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2008-09-15 18:20:58 -0400 (Mon, 15 Sep 2008)
New Revision: 2257
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/EventCallback.java
jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/msg/jms/JmsMessageTest.java
Log:
[JBPM-1709] replaced monitors with semaphores to make event notifications more reliable
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/EventCallback.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/EventCallback.java 2008-09-15 20:30:06 UTC (rev 2256)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/EventCallback.java 2008-09-15 22:20:58 UTC (rev 2257)
@@ -22,6 +22,10 @@
package org.jbpm;
import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
import javax.transaction.Status;
import javax.transaction.Synchronization;
@@ -36,6 +40,8 @@
private static final long serialVersionUID = 1L;
private static final Log log = LogFactory.getLog(EventCallback.class);
+ private static Map<String, Semaphore> eventSemaphores = new HashMap<String, Semaphore>();
+
public void processStart() {
registerNotification(Event.EVENTTYPE_PROCESS_START);
}
@@ -75,15 +81,14 @@
private static void registerNotification(final String event) {
Synchronization notification = new Synchronization() {
- public void beforeCompletion() {}
+ public void beforeCompletion() {
+ }
public void afterCompletion(int status) {
if (status == Status.STATUS_COMMITTED) {
- String canonEvent = event.intern();
- log.debug("notifying " + canonEvent + "@" + Integer.toHexString(System.identityHashCode(canonEvent)));
- synchronized (canonEvent) {
- canonEvent.notify();
- }
+ log.debug("sending '" + event + "' notification");
+ Semaphore eventSemaphore = getEventSemaphore(event);
+ eventSemaphore.release();
}
}
@@ -99,20 +104,39 @@
}
public static void waitForEvent(String event, long timeout) {
- String canonEvent = event.intern();
- long startTime = System.currentTimeMillis();
- log.debug("waiting for " + canonEvent + "@" + Integer.toHexString(System.identityHashCode(canonEvent)));
+ log.debug("waiting for " + event);
+ Semaphore eventSemaphore = getEventSemaphore(event);
try {
- synchronized (canonEvent) {
- canonEvent.wait(timeout);
+ if (eventSemaphore.tryAcquire(timeout, TimeUnit.MILLISECONDS)) {
+ log.debug("received '" + event + "' notification");
}
+ else {
+ log.warn("event '" + event + "' did not occur within " + timeout + " ms");
+ }
}
catch (InterruptedException e) {
// reassert interruption
Thread.currentThread().interrupt();
}
- if (System.currentTimeMillis() - startTime >= timeout) {
- log.debug("event '" + canonEvent + "' took longer than " + timeout + " ms to occur");
+ }
+
+ private static Semaphore getEventSemaphore(String event) {
+ synchronized (eventSemaphores) {
+ Semaphore semaphore = eventSemaphores.get(event);
+ if (semaphore == null) {
+ semaphore = new Semaphore(0);
+ eventSemaphores.put(event, semaphore);
+ }
+ return semaphore;
}
}
+
+ public static void clear() {
+ for (Map.Entry<String, Semaphore> entry : eventSemaphores.entrySet()) {
+ int permits = entry.getValue().drainPermits();
+ if (permits != 0) {
+ log.warn("event '" + entry.getKey() + "' has " + permits + " outstanding notifications");
+ }
+ }
+ }
}
\ No newline at end of file
Modified: jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/msg/jms/JmsMessageTest.java
===================================================================
--- jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/msg/jms/JmsMessageTest.java 2008-09-15 20:30:06 UTC (rev 2256)
+++ jbpm3/trunk/modules/enterprise/jar/src/test/java/org/jbpm/msg/jms/JmsMessageTest.java 2008-09-15 22:20:58 UTC (rev 2257)
@@ -55,7 +55,7 @@
private static LocalCommandServiceHome commandServiceHome;
static final int processExecutionCount = 20;
- static final int maxWaitTime = 30000;
+ static final int maxWaitTime = 10000;
public static Test suite() throws Exception {
return new IntegrationTestSetup(JmsMessageTest.class, "enterprise-test.war");
@@ -77,6 +77,7 @@
protected void tearDown() throws Exception {
log.info("### " + getName() + " done ###");
+ EventCallback.clear();
commandService = null;
}
@@ -168,7 +169,7 @@
+ " <transition name='d' to='d' />"
+ " <transition name='e' to='e' />"
+ " </fork>"
- + " <node name='a' async='true'>"
+ + " <node name='a'>"
+ " <transition to='j' />"
+ " </node>"
+ " <node name='b' async='true'>"
@@ -214,10 +215,10 @@
+ " <transition to='d' />"
+ " </node>"
+ " <node name='d'>"
- + " <transition to='e' />"
+ " <event type='node-leave'>"
+ " <action async='true' expression='#{eventCallback.nodeLeave}' />"
+ " </event>"
+ + " <transition to='e' />"
+ " </node>"
+ " <node name='e' async='true'>"
+ " <transition to='end' />"
@@ -227,6 +228,8 @@
long[] processIds = new long[processExecutionCount];
for (int i = 0; i < processExecutionCount; i++) {
processIds[i] = launchProcess("execution").getId();
+ EventCallback.waitForEvent(Event.EVENTTYPE_NODE_ENTER);
+ EventCallback.waitForEvent(Event.EVENTTYPE_NODE_LEAVE);
}
for (int i = 0; i < processExecutionCount; i++) {
waitForProcessEnd(processIds[i]);
@@ -257,13 +260,13 @@
private void waitForProcessEnd(long processId) {
long startTime = System.currentTimeMillis();
- while (!hasProcessEnded(processId)) {
+ do {
+ EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END, 1000);
if (System.currentTimeMillis() - startTime > maxWaitTime) {
log.warn("process " + processId + " took too long");
break;
}
- EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END, 500);
- }
+ } while (!hasProcessEnded(processId));
}
private static Log log = LogFactory.getLog(JmsMessageTest.class);
17 years, 7 months
JBoss JBPM SVN: r2256 - jbpm3/trunk/modules/core/src/main/java/org/jbpm/jpdl/el/impl.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2008-09-15 16:30:06 -0400 (Mon, 15 Sep 2008)
New Revision: 2256
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/jpdl/el/impl/JbpmVariableResolver.java
Log:
correction to process variable resolution
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/jpdl/el/impl/JbpmVariableResolver.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/jpdl/el/impl/JbpmVariableResolver.java 2008-09-15 15:57:27 UTC (rev 2255)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/jpdl/el/impl/JbpmVariableResolver.java 2008-09-15 20:30:06 UTC (rev 2256)
@@ -45,7 +45,7 @@
Token token = executionContext.getToken();
if ( (contextInstance!=null)
- && (contextInstance.hasVariable(name))
+ && (contextInstance.hasVariable(name, token))
) {
value = contextInstance.getVariable(name, token);
17 years, 7 months
JBoss JBPM SVN: r2255 - jbpm3/trunk/modules/core/src/main/java/org/jbpm/db.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-09-15 11:57:27 -0400 (Mon, 15 Sep 2008)
New Revision: 2255
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/AbstractDbTestCase.java
Log:
Remove the DbTest convention check
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/AbstractDbTestCase.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/AbstractDbTestCase.java 2008-09-15 15:16:13 UTC (rev 2254)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/AbstractDbTestCase.java 2008-09-15 15:57:27 UTC (rev 2255)
@@ -60,15 +60,6 @@
protected void setUp() throws Exception
{
super.setUp();
-
- String shortName = getShortName();
- if (shortName.endsWith("DbTest." + getName()) == false)
- {
- // Sticking to this convention allows us to run
- // mvn -Dtest=foo/bar/*DbTest test
- // fail("By convention a database test case must end with 'DbTest'");
- }
-
createJbpmContext();
initializeMembers();
}
17 years, 7 months