JBoss JBPM SVN: r4915 - jbpm4/trunk/qa.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-05-27 10:03:06 -0400 (Wed, 27 May 2009)
New Revision: 4915
Modified:
jbpm4/trunk/qa/build.xml
Log:
adding drop of db tables in the hudson script at the start
Modified: jbpm4/trunk/qa/build.xml
===================================================================
--- jbpm4/trunk/qa/build.xml 2009-05-27 13:39:42 UTC (rev 4914)
+++ jbpm4/trunk/qa/build.xml 2009-05-27 14:03:06 UTC (rev 4915)
@@ -55,6 +55,7 @@
<ant antfile="${jbpm.home}/jboss/build.xml" target="internal.install.jbpm.into.jboss.integrationtestspecifics" />
<antcall target="enable.jboss.debug" />
<ant antfile="${jbpm.home}/jboss/build.xml" target="start.jboss" />
+ <ant antfile="${jbpm.home}/db/build.xml" target="drop.jbpm.schema" />
<ant antfile="${jbpm.home}/db/build.xml" target="create.jbpm.schema" />
</target>
15 years
JBoss JBPM SVN: r4914 - jbpm4/trunk/modules/integration/report/src/main/resources.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-05-27 09:39:42 -0400 (Wed, 27 May 2009)
New Revision: 4914
Added:
jbpm4/trunk/modules/integration/report/src/main/resources/definition_report.rptconfig
jbpm4/trunk/modules/integration/report/src/main/resources/definition_report.rptdesign
Log:
Begin work on defintion report
Added: jbpm4/trunk/modules/integration/report/src/main/resources/definition_report.rptconfig
===================================================================
--- jbpm4/trunk/modules/integration/report/src/main/resources/definition_report.rptconfig (rev 0)
+++ jbpm4/trunk/modules/integration/report/src/main/resources/definition_report.rptconfig 2009-05-27 13:39:42 UTC (rev 4914)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17" id="1">
+ <list-property name="configVars">
+ <structure>
+ <property name="name">__isdisplay__id_42_0</property>
+ <property name="value">vacation2-1</property>
+ </structure>
+ <structure>
+ <property name="name">id_42_1</property>
+ <property name="value">vacation2-1</property>
+ </structure>
+ <structure>
+ <property name="name">id_42_type_</property>
+ <property name="value">string</property>
+ </structure>
+ </list-property>
+</report>
Added: jbpm4/trunk/modules/integration/report/src/main/resources/definition_report.rptdesign
===================================================================
--- jbpm4/trunk/modules/integration/report/src/main/resources/definition_report.rptdesign (rev 0)
+++ jbpm4/trunk/modules/integration/report/src/main/resources/definition_report.rptdesign 2009-05-27 13:39:42 UTC (rev 4914)
@@ -0,0 +1,833 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17" id="1">
+ <property name="createdBy">Eclipse BIRT Designer Version 2.3.2.r232_20090202 Build <2.3.2.v20090218-0730></property>
+ <property name="units">in</property>
+ <property name="iconFile">/templates/blank_report.gif</property>
+ <property name="bidiLayoutOrientation">ltr</property>
+ <parameters>
+ <scalar-parameter name="id" id="42">
+ <property name="valueType">static</property>
+ <property name="dataType">string</property>
+ <property name="paramType">simple</property>
+ <text-property name="promptText">Please enter an execution ID</text-property>
+ <property name="controlType">text-box</property>
+ <property name="distinct">true</property>
+ <structure name="format">
+ <property name="category">Unformatted</property>
+ </structure>
+ </scalar-parameter>
+ </parameters>
+ <data-sources>
+ <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="MySQL" id="7">
+ <property name="odaDriverClass">com.mysql.jdbc.Driver</property>
+ <property name="odaURL">jdbc:mysql://localhost:3306/jbpmdb</property>
+ <property name="odaUser">jbpm</property>
+ <encrypted-property name="odaPassword" encryptionID="base64">amJwbQ==</encrypted-property>
+ <property name="odaJndiName">java:/JbpmDS</property>
+ </oda-data-source>
+ </data-sources>
+ <data-sets>
+ <oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet" name="active_instances" id="126">
+ <list-property name="computedColumns">
+ <structure>
+ <property name="name">total</property>
+ <property name="dataType">integer</property>
+ <property name="aggregateFunction">COUNT</property>
+ <list-property name="arguments">
+ <structure>
+ <property name="name">Expression</property>
+ </structure>
+ </list-property>
+ </structure>
+ </list-property>
+ <list-property name="columnHints">
+ <structure>
+ <property name="columnName">ID_</property>
+ <property name="displayName">ID_</property>
+ </structure>
+ <structure>
+ <property name="columnName">DBVERSION_</property>
+ <property name="displayName">DBVERSION_</property>
+ </structure>
+ <structure>
+ <property name="columnName">PROCDEFID_</property>
+ <property name="displayName">PROCDEFID_</property>
+ </structure>
+ <structure>
+ <property name="columnName">KEY_</property>
+ <property name="displayName">KEY_</property>
+ </structure>
+ <structure>
+ <property name="columnName">START_</property>
+ <property name="displayName">START_</property>
+ </structure>
+ <structure>
+ <property name="columnName">END_</property>
+ <property name="displayName">END_</property>
+ </structure>
+ <structure>
+ <property name="columnName">DURATION_</property>
+ <property name="displayName">DURATION_</property>
+ </structure>
+ <structure>
+ <property name="columnName">STATE_</property>
+ <property name="displayName">STATE_</property>
+ </structure>
+ <structure>
+ <property name="columnName">ENDACTIVITY_</property>
+ <property name="displayName">ENDACTIVITY_</property>
+ </structure>
+ </list-property>
+ <structure name="cachedMetaData">
+ <list-property name="resultSet">
+ <structure>
+ <property name="position">1</property>
+ <property name="name">ID_</property>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="position">2</property>
+ <property name="name">DBVERSION_</property>
+ <property name="dataType">integer</property>
+ </structure>
+ <structure>
+ <property name="position">3</property>
+ <property name="name">PROCDEFID_</property>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="position">4</property>
+ <property name="name">KEY_</property>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="position">5</property>
+ <property name="name">START_</property>
+ <property name="dataType">date-time</property>
+ </structure>
+ <structure>
+ <property name="position">6</property>
+ <property name="name">END_</property>
+ <property name="dataType">date-time</property>
+ </structure>
+ <structure>
+ <property name="position">7</property>
+ <property name="name">DURATION_</property>
+ <property name="dataType">decimal</property>
+ </structure>
+ <structure>
+ <property name="position">8</property>
+ <property name="name">STATE_</property>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="position">9</property>
+ <property name="name">ENDACTIVITY_</property>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="position">10</property>
+ <property name="name">total</property>
+ <property name="dataType">integer</property>
+ </structure>
+ </list-property>
+ </structure>
+ <property name="dataSource">MySQL</property>
+ <list-property name="parameters">
+ <structure>
+ <property name="name">id</property>
+ <property name="paramName">id</property>
+ <property name="dataType">string</property>
+ <property name="position">1</property>
+ <property name="isInput">true</property>
+ <property name="isOutput">false</property>
+ </structure>
+ </list-property>
+ <list-property name="resultSet">
+ <structure>
+ <property name="position">1</property>
+ <property name="name">ID_</property>
+ <property name="nativeName">ID_</property>
+ <property name="dataType">string</property>
+ <property name="nativeDataType">12</property>
+ </structure>
+ <structure>
+ <property name="position">2</property>
+ <property name="name">DBVERSION_</property>
+ <property name="nativeName">DBVERSION_</property>
+ <property name="dataType">integer</property>
+ <property name="nativeDataType">4</property>
+ </structure>
+ <structure>
+ <property name="position">3</property>
+ <property name="name">PROCDEFID_</property>
+ <property name="nativeName">PROCDEFID_</property>
+ <property name="dataType">string</property>
+ <property name="nativeDataType">12</property>
+ </structure>
+ <structure>
+ <property name="position">4</property>
+ <property name="name">KEY_</property>
+ <property name="nativeName">KEY_</property>
+ <property name="dataType">string</property>
+ <property name="nativeDataType">12</property>
+ </structure>
+ <structure>
+ <property name="position">5</property>
+ <property name="name">START_</property>
+ <property name="nativeName">START_</property>
+ <property name="dataType">date-time</property>
+ <property name="nativeDataType">93</property>
+ </structure>
+ <structure>
+ <property name="position">6</property>
+ <property name="name">END_</property>
+ <property name="nativeName">END_</property>
+ <property name="dataType">date-time</property>
+ <property name="nativeDataType">93</property>
+ </structure>
+ <structure>
+ <property name="position">7</property>
+ <property name="name">DURATION_</property>
+ <property name="nativeName">DURATION_</property>
+ <property name="dataType">decimal</property>
+ <property name="nativeDataType">-5</property>
+ </structure>
+ <structure>
+ <property name="position">8</property>
+ <property name="name">STATE_</property>
+ <property name="nativeName">STATE_</property>
+ <property name="dataType">string</property>
+ <property name="nativeDataType">12</property>
+ </structure>
+ <structure>
+ <property name="position">9</property>
+ <property name="name">ENDACTIVITY_</property>
+ <property name="nativeName">ENDACTIVITY_</property>
+ <property name="dataType">string</property>
+ <property name="nativeDataType">12</property>
+ </structure>
+ </list-property>
+ <property name="queryText">select *
+ FROM JBPM4_HIST_PROCINST J
+ WHERE PROCDEFID_= ?
+ AND STATE_ = "active"</property>
+ </oda-data-set>
+ <oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet" name="total_instances" id="147">
+ <list-property name="computedColumns">
+ <structure>
+ <property name="name">total_instances</property>
+ <property name="dataType">integer</property>
+ <property name="aggregateFunction">COUNT</property>
+ <list-property name="arguments">
+ <structure>
+ <property name="name">Expression</property>
+ </structure>
+ </list-property>
+ </structure>
+ </list-property>
+ <list-property name="columnHints">
+ <structure>
+ <property name="columnName">ID_</property>
+ <property name="displayName">ID_</property>
+ </structure>
+ <structure>
+ <property name="columnName">DBVERSION_</property>
+ <property name="displayName">DBVERSION_</property>
+ </structure>
+ <structure>
+ <property name="columnName">PROCDEFID_</property>
+ <property name="displayName">PROCDEFID_</property>
+ </structure>
+ <structure>
+ <property name="columnName">KEY_</property>
+ <property name="displayName">KEY_</property>
+ </structure>
+ <structure>
+ <property name="columnName">START_</property>
+ <property name="displayName">START_</property>
+ </structure>
+ <structure>
+ <property name="columnName">END_</property>
+ <property name="displayName">END_</property>
+ </structure>
+ <structure>
+ <property name="columnName">DURATION_</property>
+ <property name="displayName">DURATION_</property>
+ </structure>
+ <structure>
+ <property name="columnName">STATE_</property>
+ <property name="displayName">STATE_</property>
+ </structure>
+ <structure>
+ <property name="columnName">ENDACTIVITY_</property>
+ <property name="displayName">ENDACTIVITY_</property>
+ </structure>
+ </list-property>
+ <structure name="cachedMetaData">
+ <list-property name="resultSet">
+ <structure>
+ <property name="position">1</property>
+ <property name="name">ID_</property>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="position">2</property>
+ <property name="name">DBVERSION_</property>
+ <property name="dataType">integer</property>
+ </structure>
+ <structure>
+ <property name="position">3</property>
+ <property name="name">PROCDEFID_</property>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="position">4</property>
+ <property name="name">KEY_</property>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="position">5</property>
+ <property name="name">START_</property>
+ <property name="dataType">date-time</property>
+ </structure>
+ <structure>
+ <property name="position">6</property>
+ <property name="name">END_</property>
+ <property name="dataType">date-time</property>
+ </structure>
+ <structure>
+ <property name="position">7</property>
+ <property name="name">DURATION_</property>
+ <property name="dataType">decimal</property>
+ </structure>
+ <structure>
+ <property name="position">8</property>
+ <property name="name">STATE_</property>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="position">9</property>
+ <property name="name">ENDACTIVITY_</property>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="position">10</property>
+ <property name="name">total_instances</property>
+ <property name="dataType">integer</property>
+ </structure>
+ </list-property>
+ </structure>
+ <property name="dataSource">MySQL</property>
+ <list-property name="parameters">
+ <structure>
+ <property name="name">id</property>
+ <property name="paramName">id</property>
+ <property name="dataType">string</property>
+ <property name="position">1</property>
+ <property name="isInput">true</property>
+ <property name="isOutput">false</property>
+ </structure>
+ </list-property>
+ <list-property name="resultSet">
+ <structure>
+ <property name="position">1</property>
+ <property name="name">ID_</property>
+ <property name="nativeName">ID_</property>
+ <property name="dataType">string</property>
+ <property name="nativeDataType">12</property>
+ </structure>
+ <structure>
+ <property name="position">2</property>
+ <property name="name">DBVERSION_</property>
+ <property name="nativeName">DBVERSION_</property>
+ <property name="dataType">integer</property>
+ <property name="nativeDataType">4</property>
+ </structure>
+ <structure>
+ <property name="position">3</property>
+ <property name="name">PROCDEFID_</property>
+ <property name="nativeName">PROCDEFID_</property>
+ <property name="dataType">string</property>
+ <property name="nativeDataType">12</property>
+ </structure>
+ <structure>
+ <property name="position">4</property>
+ <property name="name">KEY_</property>
+ <property name="nativeName">KEY_</property>
+ <property name="dataType">string</property>
+ <property name="nativeDataType">12</property>
+ </structure>
+ <structure>
+ <property name="position">5</property>
+ <property name="name">START_</property>
+ <property name="nativeName">START_</property>
+ <property name="dataType">date-time</property>
+ <property name="nativeDataType">93</property>
+ </structure>
+ <structure>
+ <property name="position">6</property>
+ <property name="name">END_</property>
+ <property name="nativeName">END_</property>
+ <property name="dataType">date-time</property>
+ <property name="nativeDataType">93</property>
+ </structure>
+ <structure>
+ <property name="position">7</property>
+ <property name="name">DURATION_</property>
+ <property name="nativeName">DURATION_</property>
+ <property name="dataType">decimal</property>
+ <property name="nativeDataType">-5</property>
+ </structure>
+ <structure>
+ <property name="position">8</property>
+ <property name="name">STATE_</property>
+ <property name="nativeName">STATE_</property>
+ <property name="dataType">string</property>
+ <property name="nativeDataType">12</property>
+ </structure>
+ <structure>
+ <property name="position">9</property>
+ <property name="name">ENDACTIVITY_</property>
+ <property name="nativeName">ENDACTIVITY_</property>
+ <property name="dataType">string</property>
+ <property name="nativeDataType">12</property>
+ </structure>
+ </list-property>
+ <property name="queryText">select *
+ FROM JBPM4_HIST_PROCINST J
+ WHERE PROCDEFID_= ?</property>
+ <xml-property name="designerValues"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<model:DesignValues xmlns:design="http://www.eclipse.org/datatools/connectivity/oda/design" xmlns:model="http://www.eclipse.org/birt/report/model/adapter/odaModel">
+ <Version>1.0</Version>
+ <design:ResultSets derivedMetaData="true">
+ <design:resultSetDefinitions>
+ <design:resultSetColumns>
+ <design:resultColumnDefinitions>
+ <design:attributes>
+ <design:name>ID_</design:name>
+ <design:position>1</design:position>
+ <design:nativeDataTypeCode>12</design:nativeDataTypeCode>
+ <design:precision>255</design:precision>
+ <design:scale>0</design:scale>
+ <design:nullability>NotNullable</design:nullability>
+ <design:uiHints>
+ <design:displayName>ID_</design:displayName>
+ </design:uiHints>
+ </design:attributes>
+ <design:usageHints>
+ <design:label>ID_</design:label>
+ <design:formattingHints>
+ <design:displaySize>255</design:displaySize>
+ </design:formattingHints>
+ </design:usageHints>
+ </design:resultColumnDefinitions>
+ <design:resultColumnDefinitions>
+ <design:attributes>
+ <design:name>DBVERSION_</design:name>
+ <design:position>2</design:position>
+ <design:nativeDataTypeCode>4</design:nativeDataTypeCode>
+ <design:precision>11</design:precision>
+ <design:scale>0</design:scale>
+ <design:nullability>NotNullable</design:nullability>
+ <design:uiHints>
+ <design:displayName>DBVERSION_</design:displayName>
+ </design:uiHints>
+ </design:attributes>
+ <design:usageHints>
+ <design:label>DBVERSION_</design:label>
+ <design:formattingHints>
+ <design:displaySize>11</design:displaySize>
+ </design:formattingHints>
+ </design:usageHints>
+ </design:resultColumnDefinitions>
+ <design:resultColumnDefinitions>
+ <design:attributes>
+ <design:name>PROCDEFID_</design:name>
+ <design:position>3</design:position>
+ <design:nativeDataTypeCode>12</design:nativeDataTypeCode>
+ <design:precision>255</design:precision>
+ <design:scale>0</design:scale>
+ <design:nullability>Nullable</design:nullability>
+ <design:uiHints>
+ <design:displayName>PROCDEFID_</design:displayName>
+ </design:uiHints>
+ </design:attributes>
+ <design:usageHints>
+ <design:label>PROCDEFID_</design:label>
+ <design:formattingHints>
+ <design:displaySize>255</design:displaySize>
+ </design:formattingHints>
+ </design:usageHints>
+ </design:resultColumnDefinitions>
+ <design:resultColumnDefinitions>
+ <design:attributes>
+ <design:name>KEY_</design:name>
+ <design:position>4</design:position>
+ <design:nativeDataTypeCode>12</design:nativeDataTypeCode>
+ <design:precision>255</design:precision>
+ <design:scale>0</design:scale>
+ <design:nullability>Nullable</design:nullability>
+ <design:uiHints>
+ <design:displayName>KEY_</design:displayName>
+ </design:uiHints>
+ </design:attributes>
+ <design:usageHints>
+ <design:label>KEY_</design:label>
+ <design:formattingHints>
+ <design:displaySize>255</design:displaySize>
+ </design:formattingHints>
+ </design:usageHints>
+ </design:resultColumnDefinitions>
+ <design:resultColumnDefinitions>
+ <design:attributes>
+ <design:name>START_</design:name>
+ <design:position>5</design:position>
+ <design:nativeDataTypeCode>93</design:nativeDataTypeCode>
+ <design:precision>19</design:precision>
+ <design:scale>0</design:scale>
+ <design:nullability>Nullable</design:nullability>
+ <design:uiHints>
+ <design:displayName>START_</design:displayName>
+ </design:uiHints>
+ </design:attributes>
+ <design:usageHints>
+ <design:label>START_</design:label>
+ <design:formattingHints>
+ <design:displaySize>19</design:displaySize>
+ </design:formattingHints>
+ </design:usageHints>
+ </design:resultColumnDefinitions>
+ <design:resultColumnDefinitions>
+ <design:attributes>
+ <design:name>END_</design:name>
+ <design:position>6</design:position>
+ <design:nativeDataTypeCode>93</design:nativeDataTypeCode>
+ <design:precision>19</design:precision>
+ <design:scale>0</design:scale>
+ <design:nullability>Nullable</design:nullability>
+ <design:uiHints>
+ <design:displayName>END_</design:displayName>
+ </design:uiHints>
+ </design:attributes>
+ <design:usageHints>
+ <design:label>END_</design:label>
+ <design:formattingHints>
+ <design:displaySize>19</design:displaySize>
+ </design:formattingHints>
+ </design:usageHints>
+ </design:resultColumnDefinitions>
+ <design:resultColumnDefinitions>
+ <design:attributes>
+ <design:name>DURATION_</design:name>
+ <design:position>7</design:position>
+ <design:nativeDataTypeCode>-5</design:nativeDataTypeCode>
+ <design:precision>20</design:precision>
+ <design:scale>0</design:scale>
+ <design:nullability>Nullable</design:nullability>
+ <design:uiHints>
+ <design:displayName>DURATION_</design:displayName>
+ </design:uiHints>
+ </design:attributes>
+ <design:usageHints>
+ <design:label>DURATION_</design:label>
+ <design:formattingHints>
+ <design:displaySize>20</design:displaySize>
+ </design:formattingHints>
+ </design:usageHints>
+ </design:resultColumnDefinitions>
+ <design:resultColumnDefinitions>
+ <design:attributes>
+ <design:name>STATE_</design:name>
+ <design:position>8</design:position>
+ <design:nativeDataTypeCode>12</design:nativeDataTypeCode>
+ <design:precision>255</design:precision>
+ <design:scale>0</design:scale>
+ <design:nullability>Nullable</design:nullability>
+ <design:uiHints>
+ <design:displayName>STATE_</design:displayName>
+ </design:uiHints>
+ </design:attributes>
+ <design:usageHints>
+ <design:label>STATE_</design:label>
+ <design:formattingHints>
+ <design:displaySize>255</design:displaySize>
+ </design:formattingHints>
+ </design:usageHints>
+ </design:resultColumnDefinitions>
+ <design:resultColumnDefinitions>
+ <design:attributes>
+ <design:name>ENDACTIVITY_</design:name>
+ <design:position>9</design:position>
+ <design:nativeDataTypeCode>12</design:nativeDataTypeCode>
+ <design:precision>255</design:precision>
+ <design:scale>0</design:scale>
+ <design:nullability>Nullable</design:nullability>
+ <design:uiHints>
+ <design:displayName>ENDACTIVITY_</design:displayName>
+ </design:uiHints>
+ </design:attributes>
+ <design:usageHints>
+ <design:label>ENDACTIVITY_</design:label>
+ <design:formattingHints>
+ <design:displaySize>255</design:displaySize>
+ </design:formattingHints>
+ </design:usageHints>
+ </design:resultColumnDefinitions>
+ </design:resultSetColumns>
+ </design:resultSetDefinitions>
+ </design:ResultSets>
+</model:DesignValues>
+]]></xml-property>
+ </oda-data-set>
+ </data-sets>
+ <styles>
+ <style name="report" id="4">
+ <property name="fontFamily">"Verdana"</property>
+ <property name="fontSize">10pt</property>
+ </style>
+ <style name="crosstab" id="5">
+ <property name="borderBottomColor">#CCCCCC</property>
+ <property name="borderBottomStyle">solid</property>
+ <property name="borderBottomWidth">1pt</property>
+ <property name="borderLeftColor">#CCCCCC</property>
+ <property name="borderLeftStyle">solid</property>
+ <property name="borderLeftWidth">1pt</property>
+ <property name="borderRightColor">#CCCCCC</property>
+ <property name="borderRightStyle">solid</property>
+ <property name="borderRightWidth">1pt</property>
+ <property name="borderTopColor">#CCCCCC</property>
+ <property name="borderTopStyle">solid</property>
+ <property name="borderTopWidth">1pt</property>
+ </style>
+ <style name="crosstab-cell" id="6">
+ <property name="borderBottomColor">#CCCCCC</property>
+ <property name="borderBottomStyle">solid</property>
+ <property name="borderBottomWidth">1pt</property>
+ <property name="borderLeftColor">#CCCCCC</property>
+ <property name="borderLeftStyle">solid</property>
+ <property name="borderLeftWidth">1pt</property>
+ <property name="borderRightColor">#CCCCCC</property>
+ <property name="borderRightStyle">solid</property>
+ <property name="borderRightWidth">1pt</property>
+ <property name="borderTopColor">#CCCCCC</property>
+ <property name="borderTopStyle">solid</property>
+ <property name="borderTopWidth">1pt</property>
+ </style>
+ </styles>
+ <page-setup>
+ <simple-master-page name="Simple MasterPage" id="2">
+ <property name="topMargin">0.25in</property>
+ <property name="leftMargin">0.25in</property>
+ <property name="bottomMargin">0.25in</property>
+ <property name="rightMargin">0.25in</property>
+ </simple-master-page>
+ </page-setup>
+ <body>
+ <label id="8">
+ <property name="fontFamily">sans-serif</property>
+ <property name="fontSize">14pt</property>
+ <property name="fontWeight">normal</property>
+ <property name="color">#000000</property>
+ <property name="borderBottomColor">#000000</property>
+ <property name="borderBottomStyle">solid</property>
+ <property name="borderBottomWidth">1px</property>
+ <property name="marginTop">0pt</property>
+ <property name="marginBottom">10pt</property>
+ <property name="paddingTop">5pt</property>
+ <property name="paddingLeft">5pt</property>
+ <property name="paddingBottom">5pt</property>
+ <property name="paddingRight">5pt</property>
+ <text-property name="text">Process Definition Report</text-property>
+ </label>
+ <table id="28">
+ <property name="marginLeft">10pt</property>
+ <property name="width">100%</property>
+ <column id="38">
+ <property name="width">2.388888888888889in</property>
+ </column>
+ <column id="39"/>
+ <detail>
+ <row id="32">
+ <cell id="33">
+ <label id="40">
+ <property name="fontWeight">normal</property>
+ <text-property name="text">Process Definition ID:</text-property>
+ </label>
+ </cell>
+ <cell id="34">
+ <text-data id="41">
+ <expression name="valueExpr">params["id"].value</expression>
+ <property name="contentType">html</property>
+ </text-data>
+ </cell>
+ </row>
+ </detail>
+ </table>
+ <table id="128">
+ <property name="marginTop">10pt</property>
+ <property name="marginLeft">10pt</property>
+ <property name="width">100%</property>
+ <list-property name="boundDataColumns">
+ <structure>
+ <property name="name">total_active</property>
+ <expression name="expression">params["id"].value</expression>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="name">Column Binding</property>
+ <expression name="expression">params["id"].value</expression>
+ <property name="dataType">string</property>
+ </structure>
+ </list-property>
+ <column id="141">
+ <property name="width">2.361111111111111in</property>
+ </column>
+ <column id="142"/>
+ <detail>
+ <row id="132">
+ <cell id="133">
+ <label id="145">
+ <text-property name="text">Total Instances:</text-property>
+ </label>
+ </cell>
+ <cell id="134">
+ <data id="146">
+ <property name="marginTop">0pt</property>
+ <property name="dataSet">total_instances</property>
+ <list-property name="boundDataColumns">
+ <structure>
+ <property name="name">ID_</property>
+ <expression name="expression">dataSetRow["ID_"]</expression>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="name">DBVERSION_</property>
+ <expression name="expression">dataSetRow["DBVERSION_"]</expression>
+ <property name="dataType">integer</property>
+ </structure>
+ <structure>
+ <property name="name">PROCDEFID_</property>
+ <expression name="expression">dataSetRow["PROCDEFID_"]</expression>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="name">KEY_</property>
+ <expression name="expression">dataSetRow["KEY_"]</expression>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="name">START_</property>
+ <expression name="expression">dataSetRow["START_"]</expression>
+ <property name="dataType">date-time</property>
+ </structure>
+ <structure>
+ <property name="name">END_</property>
+ <expression name="expression">dataSetRow["END_"]</expression>
+ <property name="dataType">date-time</property>
+ </structure>
+ <structure>
+ <property name="name">DURATION_</property>
+ <expression name="expression">dataSetRow["DURATION_"]</expression>
+ <property name="dataType">decimal</property>
+ </structure>
+ <structure>
+ <property name="name">STATE_</property>
+ <expression name="expression">dataSetRow["STATE_"]</expression>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="name">ENDACTIVITY_</property>
+ <expression name="expression">dataSetRow["ENDACTIVITY_"]</expression>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="name">total_instances</property>
+ <expression name="expression">dataSetRow["total_instances"]</expression>
+ <property name="dataType">integer</property>
+ </structure>
+ <structure>
+ <property name="name">Column Binding</property>
+ <expression name="expression">dataSetRow["total_instances"]</expression>
+ <property name="dataType">string</property>
+ </structure>
+ </list-property>
+ <property name="resultSetColumn">Column Binding</property>
+ </data>
+ </cell>
+ </row>
+ <row id="135">
+ <cell id="136">
+ <label id="143">
+ <text-property name="text">Active Instances:</text-property>
+ </label>
+ </cell>
+ <cell id="137">
+ <data id="144">
+ <property name="marginTop">0pt</property>
+ <property name="dataSet">active_instances</property>
+ <list-property name="boundDataColumns">
+ <structure>
+ <property name="name">ID_</property>
+ <expression name="expression">dataSetRow["ID_"]</expression>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="name">DBVERSION_</property>
+ <expression name="expression">dataSetRow["DBVERSION_"]</expression>
+ <property name="dataType">integer</property>
+ </structure>
+ <structure>
+ <property name="name">PROCDEFID_</property>
+ <expression name="expression">dataSetRow["PROCDEFID_"]</expression>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="name">KEY_</property>
+ <expression name="expression">dataSetRow["KEY_"]</expression>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="name">START_</property>
+ <expression name="expression">dataSetRow["START_"]</expression>
+ <property name="dataType">date-time</property>
+ </structure>
+ <structure>
+ <property name="name">END_</property>
+ <expression name="expression">dataSetRow["END_"]</expression>
+ <property name="dataType">date-time</property>
+ </structure>
+ <structure>
+ <property name="name">DURATION_</property>
+ <expression name="expression">dataSetRow["DURATION_"]</expression>
+ <property name="dataType">decimal</property>
+ </structure>
+ <structure>
+ <property name="name">STATE_</property>
+ <expression name="expression">dataSetRow["STATE_"]</expression>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="name">ENDACTIVITY_</property>
+ <expression name="expression">dataSetRow["ENDACTIVITY_"]</expression>
+ <property name="dataType">string</property>
+ </structure>
+ <structure>
+ <property name="name">total</property>
+ <expression name="expression">dataSetRow["total"]</expression>
+ <property name="dataType">integer</property>
+ </structure>
+ <structure>
+ <property name="name">total_active</property>
+ <expression name="expression">dataSetRow["total"]</expression>
+ <property name="dataType">string</property>
+ </structure>
+ </list-property>
+ <property name="resultSetColumn">total_active</property>
+ </data>
+ </cell>
+ </row>
+ </detail>
+ </table>
+ </body>
+</report>
15 years
JBoss JBPM SVN: r4913 - projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-05-27 08:44:31 -0400 (Wed, 27 May 2009)
New Revision: 4913
Added:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/RenderDispatchEvent.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/RenderReportAction.java
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java
Log:
Dispatch report generation through action to get load indicator and async callback
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/RenderDispatchEvent.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/RenderDispatchEvent.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/RenderDispatchEvent.java 2009-05-27 12:44:31 UTC (rev 4913)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.report;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public final class RenderDispatchEvent
+{
+ String targetView;
+ String dispatchUrl;
+
+ public RenderDispatchEvent(String targetView, String dispatchUrl)
+ {
+ this.targetView = targetView;
+ this.dispatchUrl = dispatchUrl;
+ }
+
+ public String getTargetView()
+ {
+ return targetView;
+ }
+
+ public String getDispatchUrl()
+ {
+ return dispatchUrl;
+ }
+}
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/RenderReportAction.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/RenderReportAction.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/RenderReportAction.java 2009-05-27 12:44:31 UTC (rev 4913)
@@ -0,0 +1,146 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.report;
+
+import com.google.gwt.http.client.*;
+import com.google.gwt.user.client.Timer;
+import com.mvc4g.client.ActionInterface;
+import com.mvc4g.client.Controller;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.LoadingStatusAction;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+
+import java.io.IOException;
+
+/**
+ * Engage a report generation and update {@link org.jboss.bpm.console.client.report.ReportView}
+ * when the report is finished.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class RenderReportAction implements ActionInterface
+{
+
+ public final static String ID = RenderReportAction.class.getName();
+
+ private ApplicationContext appContext;
+
+ public RenderReportAction(ApplicationContext appContext)
+ {
+ this.appContext = appContext;
+ }
+
+ public void execute(final Controller controller, Object object)
+ {
+ final RenderDispatchEvent event = (RenderDispatchEvent)object;
+
+ final String url = event.getDispatchUrl();
+ RequestBuilder builder = new RequestBuilder(
+ RequestBuilder.GET, url);
+
+ ConsoleLog.debug(RequestBuilder.GET +": " + url);
+ final ReportView view = (ReportView)controller.getView(event.getTargetView());
+
+ try
+ {
+ controller.handleEvent( LoadingStatusAction.ON );
+ view.setLoading(true);
+
+ final Request request = builder.sendRequest(null,
+ new RequestCallback()
+ {
+ public void onError(Request request, Throwable exception) {
+ // Couldn't connect to server (could be timeout, SOP violation, etc.)
+ handleError(url, exception);
+ controller.handleEvent( LoadingStatusAction.OFF );
+ }
+
+ public void onResponseReceived(Request request, Response response) {
+ try
+ {
+ if (200 == response.getStatusCode())
+ {
+ // update view
+
+ view.update(event.getDispatchUrl());
+ }
+ else
+ {
+ final String msg = response.getText().equals("") ? "Unknown error" : response.getText();
+ handleError(
+ url,
+ new RequestException("HTTP "+ response.getStatusCode()+ ": " + msg)
+ );
+ }
+ }
+ finally
+ {
+ controller.handleEvent( LoadingStatusAction.OFF );
+ view.setLoading(false);
+ }
+ }
+ }
+ );
+
+ // Timer to handle pending request
+ Timer t = new Timer() {
+
+ public void run()
+ {
+ if(request.isPending())
+ {
+ request.cancel();
+ handleError(
+ url,
+ new IOException("Request timeout")
+ );
+ }
+
+ }
+ };
+ t.schedule(20000);
+
+ }
+ catch (RequestException e)
+ {
+ // Couldn't connect to server
+ handleError(url, e);
+ controller.handleEvent( LoadingStatusAction.OFF );
+ view.setLoading(false);
+ }
+ }
+
+ protected void handleError(String url, Throwable t)
+ {
+ final String out =
+ "<ul>"+
+ "<li>URL: '" + url + "'\n"+
+ "<li>Action: '" + ID + "'\n" +
+ "<li>Exception: '" + t.getClass() +"'"+
+ "</ul>\n\n"+
+ t.getMessage();
+
+ ConsoleLog.error(out, t);
+ appContext.displayMessage(out, true);
+
+ }
+}
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java 2009-05-27 12:05:01 UTC (rev 4912)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java 2009-05-27 12:44:31 UTC (rev 4913)
@@ -22,16 +22,17 @@
package org.jboss.bpm.console.client.report;
import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.ui.Frame;
+import com.google.gwt.user.client.ui.MenuBar;
import com.google.gwt.user.client.ui.Widget;
-import com.google.gwt.user.client.ui.MenuBar;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
+import org.gwt.mosaic.ui.client.PopupMenu;
import org.gwt.mosaic.ui.client.ToolBar;
import org.gwt.mosaic.ui.client.ToolButton;
-import org.gwt.mosaic.ui.client.PopupMenu;
+import org.gwt.mosaic.ui.client.Label;
import org.gwt.mosaic.ui.client.layout.BoxLayout;
import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
import org.gwt.mosaic.ui.client.layout.LayoutPanel;
@@ -42,6 +43,7 @@
import org.jboss.bpm.console.client.search.SearchDelegate;
import org.jboss.bpm.console.client.search.SearchWindow;
import org.jboss.bpm.console.client.search.UpdateSearchDefinitionsAction;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import java.util.Date;
@@ -60,6 +62,8 @@
private SearchDefinitionView search;
+ private LayoutPanel loadingPanel;
+
public ReportView(ApplicationContext appContext)
{
super();
@@ -91,11 +95,16 @@
{
public void handleResult(String procDefId)
{
- String reportUrl = appContext.getUrlBuilder().getDefinitionReportUrl(
- procDefId
+ String reportUrl = appContext.getUrlBuilder().getDefinitionReportUrl(procDefId);
+
+ // load report
+ controller.handleEvent(
+ new Event(RenderReportAction.ID,
+ new RenderDispatchEvent(
+ ReportView.ID, reportUrl
+ )
+ )
);
-
- setFrameUrl(reportUrl);
}
public String getActionName()
@@ -120,8 +129,14 @@
toolBar.add(createMenuBtn());
toolBox.add(toolBar, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+ // loading panel
+ loadingPanel = new LayoutPanel();
+ loadingPanel.add(new Label("Generating report, please wait..."));
+ loadingPanel.setVisible(false);
+
// assembly
layout.add(toolBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+ layout.add(loadingPanel, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
layout.add(frame, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
this.add(layout);
@@ -131,17 +146,29 @@
"report.definition.search", search
);
- controller.addAction(
- UpdateSearchDefinitionsAction.ID, new UpdateSearchDefinitionsAction(appContext)
+ controller.addAction(UpdateSearchDefinitionsAction.ID, new UpdateSearchDefinitionsAction(appContext));
+ controller.addAction(RenderReportAction.ID, new RenderReportAction(appContext));
+
+ // initial report
+ controller.handleEvent(
+ new Event(RenderReportAction.ID,
+ new RenderDispatchEvent(
+ ReportView.ID, appContext.getUrlBuilder().getOverviewReportUrl()
+ )
+ )
);
- // default report
- setFrameUrl(appContext.getUrlBuilder().getOverviewReportUrl());
-
this.isInitialized = true;
}
}
+
+ public void onClick(Widget widget)
+ {
+ System.out.println(widget);
+ }
+
+
private Widget createMenuBtn()
{
// Add a menu button
@@ -224,4 +251,14 @@
return menu;
}
+
+ public void update(String reportUrl)
+ {
+ setFrameUrl(reportUrl);
+ }
+
+ void setLoading(boolean b)
+ {
+ loadingPanel.setVisible(b);
+ }
}
15 years
JBoss JBPM SVN: r4912 - in jbpm4/branches/tbaeyens/modules/pvm/src/main: java/org/jbpm/pvm/internal/model/op and 1 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-05-27 08:05:01 -0400 (Wed, 27 May 2009)
New Revision: 4912
Added:
jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionEndActivity.java
Removed:
jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionEndActivity.java
jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionEndActivityMessage.java
jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionTakeMessage.java
Modified:
jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ActivityImpl.java
jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/EventImpl.java
jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ObservableElementImpl.java
jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/ExecuteEventListener.java
jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionStartActivity.java
jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionStartActivityMessage.java
jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionTake.java
jbpm4/branches/tbaeyens/modules/pvm/src/main/resources/jbpm.execution.hbm.xml
Log:
execution refactoring
Modified: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ActivityImpl.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ActivityImpl.java 2009-05-27 10:03:38 UTC (rev 4911)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ActivityImpl.java 2009-05-27 12:05:01 UTC (rev 4912)
@@ -400,6 +400,16 @@
return ! (continuation==Continuation.SYNCHRONOUS);
}
+ public boolean contains(ActivityImpl activity) {
+ while (activity!=null) {
+ if (activity.getParent()==this) {
+ return true;
+ }
+ activity = activity.getParentActivity();
+ }
+ return false;
+ }
+
// getters and setters //////////////////////////////////////////////////////
public ObservableElementImpl getParent() {
Modified: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/EventImpl.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/EventImpl.java 2009-05-27 10:03:38 UTC (rev 4911)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/EventImpl.java 2009-05-27 12:05:01 UTC (rev 4912)
@@ -37,6 +37,7 @@
private static final long serialVersionUID = 1L;
protected String name;
+ protected ObservableElementImpl observableElement;
protected List<EventListenerReference> listenerReferences;
protected Continuation continuation = Continuation.SYNCHRONOUS;
@@ -100,4 +101,10 @@
public void setContinuation(Continuation continuation) {
this.continuation = continuation;
}
+ public ObservableElementImpl getObservableElement() {
+ return observableElement;
+ }
+ public void setObservableElement(ObservableElementImpl observableElement) {
+ this.observableElement = observableElement;
+ }
}
\ No newline at end of file
Modified: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2009-05-27 10:03:38 UTC (rev 4911)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2009-05-27 12:05:01 UTC (rev 4912)
@@ -40,9 +40,7 @@
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.api.client.ClientProcessDefinition;
import org.jbpm.api.client.ClientProcessInstance;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
-import org.jbpm.api.env.Transaction;
import org.jbpm.api.job.Timer;
import org.jbpm.api.listener.EventListenerExecution;
import org.jbpm.api.model.Activity;
@@ -56,7 +54,6 @@
import org.jbpm.api.session.RepositorySession;
import org.jbpm.api.session.TimerSession;
import org.jbpm.internal.log.Log;
-import org.jbpm.pvm.internal.env.PvmEnvironment;
import org.jbpm.pvm.internal.hibernate.HibernatePvmDbSession;
import org.jbpm.pvm.internal.history.HistoryEvent;
import org.jbpm.pvm.internal.history.HistorySession;
@@ -94,10 +91,13 @@
// atomic operations
public static final AtomicOperation EXECUTE_ACTIVITY = new ExecuteActivity();
- public static final AtomicOperation TRANSITION_END_ACTIVITY = new TransitionEndActivity();
+ public static final AtomicOperation PROPAGATE_TO_PARENT = new MoveToParentActivity();
+
public static final AtomicOperation TRANSITION_TAKE = new TransitionTake();
public static final AtomicOperation TRANSITION_START_ACTIVITY = new TransitionStartActivity();
- public static final AtomicOperation PROPAGATE_TO_PARENT = new MoveToParentActivity();
+
+ public static final AtomicOperation EXECUTE_EVENT_LISTENER = new ExecuteEventListener();
+ public static final AtomicOperation TRANSITION_END_ACTIVITY = new TransitionEndActivity();
// persistent member fields /////////////////////////////////////////////////
@@ -146,9 +146,6 @@
/** persistent activity reference */
protected String activityName;
- protected Integer transitionSourceIndex;
- protected String transitionSourceName;
-
// transient cached indicators of the current position //////////////////////
/** transient cached process definition. persistence is managed in {@link #processDefinitionId} */
@@ -160,12 +157,12 @@
/** transition is not to be made persistable by default */
protected TransitionImpl transition;
- /** the activity from which the transition was taken. This can be different from
- * the transition source in case a transition of an eclosing activity was taken. */
- protected ActivityImpl transitionSource;
-
protected EventImpl event;
+ protected AtomicOperation eventCompletedOperation;
+
+ protected int eventListenerIndex;
+
protected ObservableElementImpl eventSource;
// cached named executions //////////////////////////////////////////////////
@@ -452,11 +449,14 @@
checkActive();
setPropagation(Propagation.EXPLICIT);
- setTransition((TransitionImpl) transition);
- performAtomicOperation(TRANSITION_END_ACTIVITY);
+ setTransition((TransitionImpl) transition);
+
+ ObservableElementImpl observableElement = getActivity();
+
+ fire(Event.END, observableElement, TRANSITION_END_ACTIVITY);
}
-
+
public void take(Transition transition, Execution execution) {
((ExecutionImpl)execution).take(transition);
}
@@ -532,13 +532,49 @@
setActivity((ActivityImpl) activity);
}
+ // events ///////////////////////////////////////////////////////////////////
+
+ public void fire(String eventName, ObservableElement eventSource) {
+ fire(eventName, (ObservableElementImpl) eventSource, null);
+ }
+
+ public void fire(String eventName, ObservableElementImpl observableElement, AtomicOperation eventCompletedOperation) {
+ EventImpl event = findEvent(observableElement, eventName);
+ if (event!=null) {
+ setEvent(event);
+ setEventSource(observableElement);
+ setEventListenerIndex(0);
+ setEventCompletedOperation(eventCompletedOperation);
+ performAtomicOperation(EXECUTE_EVENT_LISTENER);
+ } else {
+ if (eventCompletedOperation!=null) {
+ performAtomicOperationSync(eventCompletedOperation);
+ }
+ }
+ }
+
+ public static EventImpl findEvent(ObservableElementImpl observableElement, String eventName) {
+ if (observableElement==null) {
+ return null;
+ }
+
+ EventImpl event = observableElement.getEvent(eventName);
+ if ( (event==null)
+ || (event.getListenerReferences()==null)
+ || (event.getListenerReferences().isEmpty())
+ ) {
+ return event;
+ }
+
+ return findEvent(observableElement.getParent(), eventName);
+ }
+
// execution : internal methods /////////////////////////////////////////////
public void moveTo(ActivityImpl destination) {
// move the execution to the destination
setActivity(destination);
transition = null;
- transitionSource = null;
}
public ExecutionImpl startActivity(ActivityImpl activity) {
@@ -603,52 +639,6 @@
}
}
- // events ///////////////////////////////////////////////////////////////////
-
- /** @see Execution#fire(String, ObservableElement) */
- public void fire(String eventName, ObservableElement eventSource) {
- fire(eventName, eventSource, (ObservableElementImpl) eventSource);
- }
-
- /** fires the event on the given *processElement* and then propagates the event
- * up to the *processElement* parent chain. */
- void fire(String eventName, ObservableElement eventSource, ObservableElementImpl observableElement) {
- if (observableElement!=null) {
- EventImpl event = (EventImpl) observableElement.getEvent(eventName);
- if (event!=null) {
- if (log.isTraceEnabled()) {
- if (observableElement==eventSource) {
- log.trace("firing "+event+" on "+eventSource);
- } else {
- log.trace("firing "+event+" on "+observableElement+", propagated from source "+eventSource);
- }
- }
- fire(event, eventSource, observableElement);
- }
- propagateEvent(eventName, eventSource, observableElement);
- }
- }
-
- /** this method enables specific process languages to overwrite the event propagation behaviour */
- protected void propagateEvent(String eventName, ObservableElement eventSource, ObservableElementImpl observableElement) {
- fire(eventName, eventSource, observableElement.getParent());
- }
-
- /** fires the given event without propagation */
- public void fire(EventImpl event, ObservableElement eventSource, ObservableElement observableElement) {
- List<EventListenerReference> eventListenerReferences = event.getListenerReferences();
- if (eventListenerReferences!=null) {
- for (EventListenerReference eventListenerReference: eventListenerReferences) {
- ExecuteEventListener executeEventListenerOperation = new ExecuteEventListener(eventListenerReference, event, (ObservableElementImpl) eventSource, observableElement);
- if (eventListenerReference.isAsync()) {
- sendContinuationMessage(executeEventListenerOperation);
- } else {
- executeEventListenerOperation.perform(this);
- }
- }
- }
- }
-
public void handleException(ObservableElementImpl observableElement,
EventImpl event,
EventListenerReference eventListenerReference,
@@ -690,23 +680,6 @@
ExceptionHandlerImpl.rethrow(exception, rethrowMessage+": "+exception.getMessage());
}
-
- /** searches for an event up the process element parent hierarchy starting
- * from the given process element and returns an event or null if no such
- * event exists. */
- EventImpl findEvent(String eventName, ObservableElementImpl observableElement) {
- EventImpl event = null;
- while ( (event==null)
- && (observableElement!=null)
- ) {
- event = (EventImpl) observableElement.getEvent(eventName);
- if (event==null) {
- observableElement = observableElement.getParent();
- }
- }
- return event;
- }
-
// comments /////////////////////////////////////////////////////////////////
public Comment createComment(String message) {
@@ -1070,59 +1043,40 @@
return activityName;
}
- // transition getter and setter /////////////////////////////////////////////
- // this getter and setter is special because persistence is based on the //
- // transition index of the current activity. //
- /////////////////////////////////////////////////////////////////////////////
+ // special getters and setters /////////////////////////////////////////////////
- public void setTransition(TransitionImpl transition) {
- this.transition = transition;
- if (transition==null) {
- this.transitionSource = null;
- this.transitionSourceName = null;
- this.transitionSourceIndex = null;
- } else {
- this.transitionSource = transition.getSource();
- this.transitionSourceName = transitionSource.getName();
- this.transitionSourceIndex = transition.getSourceIndex();
+ public boolean hasAsyncEndEvent(List<ActivityImpl> leftActivities) {
+ for (ActivityImpl leftActivity : leftActivities) {
+ EventImpl endEvent = leftActivity.getEvent(Event.END);
+ if ( (endEvent!=null)
+ && (endEvent.isAsync())
+ ) {
+ return true;
+ }
}
+ return false;
}
- public TransitionImpl getTransition() {
- if ( (transition==null)
- && (transitionSourceIndex!=null)
- ) {
- transition = (TransitionImpl) getTransitionSource().getOutgoingTransitions().get(transitionSourceIndex);
+ public List<Comment> getComments() {
+ if (comments==null) {
+ return Collections.emptyList();
}
- return transition;
+ return new ArrayList<Comment>(comments);
}
-
- public ActivityImpl getTransitionSource() {
- if ( (transitionSource==null)
- && (transitionSourceName!=null)
- ) {
- transitionSource = getProcessDefinition().findActivity(transitionSourceName);
- }
- return transitionSource;
- }
-
-
- // getters and setters /////////////////////////////////////////////////////////
-
-
public boolean isProcessInstance() {
return parent==null;
}
- public List<Comment> getComments() {
- if (comments==null) {
- return Collections.emptyList();
- }
- return new ArrayList<Comment>(comments);
+ // getters and setters /////////////////////////////////////////////////////////
+
+ public TransitionImpl getTransition() {
+ return transition;
}
-
- public Event getEvent() {
+ public void setTransition(TransitionImpl transition) {
+ this.transition = transition;
+ }
+ public EventImpl getEvent() {
return event;
}
public ObservableElement getEventSource() {
@@ -1212,16 +1166,16 @@
public String getProcessDefinitionId() {
return processDefinitionId;
}
-
- public boolean hasAsyncEndEvent(List<ActivityImpl> leftActivities) {
- for (ActivityImpl leftActivity : leftActivities) {
- EventImpl endEvent = leftActivity.getEvent(Event.END);
- if ( (endEvent!=null)
- && (endEvent.isAsync())
- ) {
- return true;
- }
- }
- return false;
+ public int getEventListenerIndex() {
+ return eventListenerIndex;
}
+ public void setEventListenerIndex(int eventListenerIndex) {
+ this.eventListenerIndex = eventListenerIndex;
+ }
+ public AtomicOperation getEventCompletedOperation() {
+ return eventCompletedOperation;
+ }
+ public void setEventCompletedOperation(AtomicOperation eventCompletedOperation) {
+ this.eventCompletedOperation = eventCompletedOperation;
+ }
}
Modified: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ObservableElementImpl.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ObservableElementImpl.java 2009-05-27 10:03:38 UTC (rev 4911)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ObservableElementImpl.java 2009-05-27 12:05:01 UTC (rev 4912)
@@ -59,6 +59,7 @@
/** event factory method that also establishes the bidirectional relation. */
public EventImpl createEvent(String eventName) {
EventImpl event = new EventImpl();
+ event.setObservableElement(this);
event.setName(eventName);
return addEvent(event);
}
Modified: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/ExecuteEventListener.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/ExecuteEventListener.java 2009-05-27 10:03:38 UTC (rev 4911)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/ExecuteEventListener.java 2009-05-27 12:05:01 UTC (rev 4912)
@@ -21,6 +21,8 @@
*/
package org.jbpm.pvm.internal.model.op;
+import java.util.List;
+
import org.jbpm.api.listener.EventListener;
import org.jbpm.api.model.ObservableElement;
import org.jbpm.internal.log.Log;
@@ -38,50 +40,77 @@
private static Log log = Log.getLog(ExecuteEventListener.class.getName());
- protected EventListenerReference eventListenerReference;
- protected EventImpl event;
- protected ObservableElementImpl eventSource;
- protected ObservableElement observableElement;
-
- public ExecuteEventListener(EventListenerReference eventListenerReference, EventImpl event, ObservableElementImpl eventSource, ObservableElement observableElement) {
- this.eventListenerReference = eventListenerReference;
- this.event = event;
- this.eventSource = eventSource;
- this.observableElement = observableElement;
- }
-
public boolean isAsync(ExecutionImpl execution) {
+ int eventListenerIndex = execution.getEventListenerIndex();
+ EventImpl event = execution.getEvent();
+ List<EventListenerReference> eventListenerReferences = event.getListenerReferences();
+ EventListenerReference eventListenerReference = eventListenerReferences.get(eventListenerIndex);
return eventListenerReference.isAsync();
}
public void perform(ExecutionImpl execution) {
- try {
- execution.setEvent(event);
- execution.setEventSource(eventSource);
+ EventImpl event = execution.getEvent();
+ int eventListenerIndex = execution.getEventListenerIndex();
+ List<EventListenerReference> eventListenerReferences = event.getListenerReferences();
+ EventListenerReference eventListenerReference = eventListenerReferences.get(eventListenerIndex);
+ ObservableElement eventSource = execution.getEventSource();
+ ObservableElementImpl observableElement = event.getObservableElement();
- if ( (observableElement.equals(eventSource)) // this event is not propagated
- || (eventListenerReference.isPropagationEnabled()) // propagation is allowed
- ) {
- EventListener eventListener = eventListenerReference.get();
+ if ( (eventSource==observableElement)
+ || (eventListenerReference.isPropagationEnabled())
+ ) {
+ EventListener eventListener = eventListenerReference.get();
+ log.trace("executing "+eventListener+" for "+event);
+ try {
+ // TODO can/should this invocation be unified with the exception handler invocation of the event notification method?
+ eventListener.notify(execution);
+ } catch (Exception e) {
+ log.trace("exception during action: "+e);
+ execution.handleException((ObservableElementImpl) observableElement, event, eventListenerReference, e, "couldn't run action "+eventListener);
+ }
+ }
+
+ // increment the event listener index
+ eventListenerIndex++;
+ execution.setEventListenerIndex(eventListenerIndex);
+
+ // if there are more listeners in this event
+ if (eventListenerIndex<eventListenerReferences.size()) {
+ // execute the next listener
+ execution.performAtomicOperation(ExecutionImpl.EXECUTE_EVENT_LISTENER);
+
+ } else {
+ // there are no more listeners in this even
+
+ ObservableElementImpl parent = observableElement.getParent();
+ // find the next event with listeners
+ EventImpl propagatedEvent = ExecutionImpl.findEvent(parent, event.getName());
+
+ // if there is an propagated event with listeners
+ if (propagatedEvent!=null) {
+ // propagate to the that event
+ execution.setEvent(propagatedEvent);
+ execution.setEventListenerIndex(0);
+ execution.performAtomicOperation(ExecutionImpl.EXECUTE_EVENT_LISTENER);
+
+ } else {
+ // event is completed, perform the eventCompletedOperation
+ AtomicOperation eventCompletedOperation = execution.getEventCompletedOperation();
+
+ execution.setEvent(null);
+ execution.setEventSource(null);
+ execution.setEventListenerIndex(0);
+ execution.setEventCompletedOperation(null);
- log.trace("executing "+eventListener+" for "+event);
- try {
- // TODO can/should this invocation be unified with the exception handler invocation of the event notification method?
- eventListener.notify(execution);
- } catch (Exception e) {
- log.trace("exception during action: "+e);
- execution.handleException((ObservableElementImpl) observableElement, event, eventListenerReference, e, "couldn't run action "+eventListener);
+ if (eventCompletedOperation!=null) {
+ execution.performAtomicOperation(eventCompletedOperation);
}
}
-
- } finally {
- execution.setEvent(null);
- execution.setEventSource(null);
}
}
public MessageImpl< ? > createAsyncMessage(ExecutionImpl execution) {
- return new ExecuteEventListenerMessage(execution, observableElement, event, eventListenerReference);
+ throw new UnsupportedOperationException("please implement me");
}
public String toString() {
Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionEndActivity.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionEndActivity.java 2009-05-27 10:03:38 UTC (rev 4911)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionEndActivity.java 2009-05-27 12:05:01 UTC (rev 4912)
@@ -1,97 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.model.op;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jbpm.internal.log.Log;
-import org.jbpm.pvm.internal.job.MessageImpl;
-import org.jbpm.pvm.internal.model.ActivityImpl;
-import org.jbpm.pvm.internal.model.ExecutionImpl;
-import org.jbpm.pvm.internal.model.ObservableElementImpl;
-import org.jbpm.pvm.internal.model.TransitionImpl;
-
-public class TransitionEndActivity implements AtomicOperation {
-
- private static final TransitionTake TRANSITION_TAKE = new TransitionTake();
-
- private static Log log = Log.getLog(TransitionEndActivity.class.getName());
-
- public boolean isAsync(ExecutionImpl execution) {
- TransitionImpl transition = execution.getTransition();
- List<ActivityImpl> leftActivities = getActivitiesLeft(execution.getActivity(), transition.getDestination());
- return execution.hasAsyncEndEvent(leftActivities);
- }
-
- public void perform(ExecutionImpl execution) {
- TransitionImpl transition = execution.getTransition();
-
- if (execution.getName() != null) {
- log.debug(execution.toString() + " takes " + transition);
- } else {
- log.debug("taking " + transition);
- }
-
- List<ActivityImpl> leftActivities = getActivitiesLeft(execution.getActivity(), transition.getDestination());
- ExecutionImpl propagatingExecution = endActivity(execution, leftActivities);
-
- propagatingExecution.performAtomicOperation(TRANSITION_TAKE);
- }
-
- public static ExecutionImpl endActivity(ExecutionImpl execution, List<ActivityImpl> leftActivities) {
- ExecutionImpl propagatingExecution = execution;
- for (ActivityImpl leftActivity : leftActivities) {
- propagatingExecution = propagatingExecution.endActivity(leftActivity);
- }
- propagatingExecution.setActivity(null);
- return propagatingExecution;
- }
-
- List<ActivityImpl> getActivitiesLeft(ActivityImpl source, ActivityImpl destination) {
- List<ActivityImpl> activitiesLeft = new ArrayList<ActivityImpl>();
-
- if (source.equals(destination)) {
- activitiesLeft.add(source);
- } else {
- List<ObservableElementImpl> destinationChain = destination.getParentChain();
-
- if (!destinationChain.contains(source)) {
- ActivityImpl sourceActivity = source;
- while ((sourceActivity != null) && (!destinationChain.contains(sourceActivity))) {
- activitiesLeft.add(sourceActivity);
- sourceActivity = sourceActivity.getParentActivity();
- }
- }
- }
-
- return activitiesLeft;
- }
-
- public String toString() {
- return "TakeTransition";
- }
-
- public MessageImpl< ? > createAsyncMessage(ExecutionImpl execution) {
- return new TransitionEndActivityMessage(execution);
- }
-}
\ No newline at end of file
Added: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionEndActivity.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionEndActivity.java (rev 0)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionEndActivity.java 2009-05-27 12:05:01 UTC (rev 4912)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.model.op;
+
+import org.jbpm.api.model.Event;
+import org.jbpm.pvm.internal.job.MessageImpl;
+import org.jbpm.pvm.internal.model.ActivityImpl;
+import org.jbpm.pvm.internal.model.ExecutionImpl;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class TransitionEndActivity implements AtomicOperation {
+
+ public boolean isAsync(ExecutionImpl execution) {
+ return false;
+ }
+
+ public void perform(ExecutionImpl execution) {
+ ActivityImpl activity = execution.getActivity();
+
+ ExecutionImpl propagatingExecution = execution;
+ if (activity.isLocalScope()) {
+ propagatingExecution = execution.destroyScope(activity);
+ }
+
+ ActivityImpl parentActivity = activity.getParentActivity();
+ ActivityImpl destination = execution.getTransition().getDestination();
+ if (isLeft(parentActivity, activity, destination)) {
+ propagatingExecution.setActivity(parentActivity);
+ propagatingExecution.fire(Event.END, parentActivity, ExecutionImpl.TRANSITION_END_ACTIVITY);
+ } else {
+ propagatingExecution.performAtomicOperation(ExecutionImpl.TRANSITION_TAKE);
+ }
+ }
+
+ protected boolean isLeft(ActivityImpl activity, ActivityImpl from, ActivityImpl to) {
+ return false;
+ }
+
+ public MessageImpl< ? > createAsyncMessage(ExecutionImpl execution) {
+ throw new UnsupportedOperationException("please implement me");
+ }
+
+ public String toString() {
+ return "TransitionEndActivity";
+ }
+}
Property changes on: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionEndActivity.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionEndActivityMessage.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionEndActivityMessage.java 2009-05-27 10:03:38 UTC (rev 4911)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionEndActivityMessage.java 2009-05-27 12:05:01 UTC (rev 4912)
@@ -1,58 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.model.op;
-
-import org.jbpm.api.Execution;
-import org.jbpm.api.env.Environment;
-import org.jbpm.pvm.internal.job.MessageImpl;
-import org.jbpm.pvm.internal.jobexecutor.JobDbSession;
-import org.jbpm.pvm.internal.model.ExecutionImpl;
-
-/**
- * @author Tom Baeyens
- */
-public class TransitionEndActivityMessage extends MessageImpl<Object> {
-
- private static final long serialVersionUID = 1L;
-
- public TransitionEndActivityMessage() {
- }
-
- public TransitionEndActivityMessage(ExecutionImpl execution) {
- super(execution);
- }
-
- public Object execute(Environment environment) throws Exception {
- AsyncContinuations.restoreState(execution);
-
- execution.performAtomicOperationSync(ExecutionImpl.TRANSITION_END_ACTIVITY);
-
- JobDbSession jobDbSession = environment.get(JobDbSession.class);
- jobDbSession.delete(this);
-
- return null;
- }
-
- public String toString() {
- return "TakeTransitionMessage["+dbid+"]";
- }
-}
Modified: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionStartActivity.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionStartActivity.java 2009-05-27 10:03:38 UTC (rev 4911)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionStartActivity.java 2009-05-27 12:05:01 UTC (rev 4912)
@@ -21,13 +21,11 @@
*/
package org.jbpm.pvm.internal.model.op;
-import java.util.LinkedList;
-import java.util.List;
-
+import org.jbpm.api.JbpmException;
import org.jbpm.pvm.internal.job.MessageImpl;
+import org.jbpm.pvm.internal.model.ActivityImpl;
import org.jbpm.pvm.internal.model.ExecutionImpl;
-import org.jbpm.pvm.internal.model.ActivityImpl;
-import org.jbpm.pvm.internal.model.ObservableElementImpl;
+import org.jbpm.pvm.internal.model.TransitionImpl;
/**
* @author Tom Baeyens
@@ -39,50 +37,57 @@
}
public void perform(ExecutionImpl execution) {
- ActivityImpl destination = execution.getTransition().getDestination();
- execution.setActivity(destination);
- List<ActivityImpl> enteredActivities = getActivitiesEntered(execution.getTransitionSource(), destination);
+ TransitionImpl transition = execution.getTransition();
+ ActivityImpl source = transition.getSource();
+ ActivityImpl destination = transition.getDestination();
- ExecutionImpl propagatingExecution = execution;
- for (ActivityImpl enteredActivity : enteredActivities) {
- propagatingExecution = propagatingExecution.startActivity(enteredActivity);
- }
-
- propagatingExecution.setActivity(destination);
- propagatingExecution.setTransition(null);
-
- propagatingExecution.performAtomicOperation(ExecutionImpl.EXECUTE_ACTIVITY);
- }
-
- public List<ActivityImpl> getActivitiesEntered(ActivityImpl origin, ActivityImpl destination) {
- LinkedList<ActivityImpl> activitiesEntered = new LinkedList<ActivityImpl>();
-
- if (origin.equals(destination)) {
- activitiesEntered.add(destination);
+ ActivityImpl activity = execution.getActivity();
+ if (activity==null) {
+ // find outer most activity to start
+ activity = destination;
+ while ( (activity.getParentActivity()!=null)
+ && (!activity.getParentActivity().contains(source))
+ ) {
+ activity = activity.getParentActivity();
+ }
+ } else if (activity==destination){
+ activity = null;
+
} else {
- List<ObservableElementImpl> sourceChain = origin.getParentChain();
-
- if (!sourceChain.contains(destination)) {
- ActivityImpl destinationActivity = destination;
- while ( (destinationActivity!=null)
- && (!sourceChain.contains(destinationActivity))
- ) {
- activitiesEntered.addFirst(destinationActivity);
- destinationActivity = destinationActivity.getParentActivity();
- }
+ ActivityImpl parent = activity;
+ activity = destination;
+ while ( (activity!=null)
+ && (activity.getParent()!=parent)
+ ) {
+ activity = activity.getParentActivity();
}
+ if (activity==null) {
+ throw new JbpmException("implementation bug: couldn't find parent "+parent+" around destination "+destination);
+ }
}
- return activitiesEntered;
+ if (activity==null) {
+ execution.setTransition(null);
+ execution.performAtomicOperation(ExecutionImpl.EXECUTE_ACTIVITY);
+
+ } else {
+ execution.setActivity(activity);
+
+ ExecutionImpl propagatingExecution = execution;
+ if (activity.isLocalScope()) {
+ propagatingExecution = execution.createScope(activity);
+ }
+
+ propagatingExecution.performAtomicOperation(ExecutionImpl.TRANSITION_START_ACTIVITY);
+ }
}
-
- public String toString() {
- return "ProceedToDestination";
+ public MessageImpl<?> createAsyncMessage(ExecutionImpl execution) {
+ throw new UnsupportedOperationException("please implement me");
}
- public MessageImpl<?> createAsyncMessage(ExecutionImpl execution) {
- return new TransitionStartActivityMessage(execution);
+ public String toString() {
+ return "TransitionStartActivity";
}
}
Modified: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionStartActivityMessage.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionStartActivityMessage.java 2009-05-27 10:03:38 UTC (rev 4911)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionStartActivityMessage.java 2009-05-27 12:05:01 UTC (rev 4912)
@@ -21,7 +21,6 @@
*/
package org.jbpm.pvm.internal.model.op;
-import org.jbpm.api.Execution;
import org.jbpm.api.env.Environment;
import org.jbpm.pvm.internal.job.MessageImpl;
import org.jbpm.pvm.internal.jobexecutor.JobDbSession;
Modified: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionTake.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionTake.java 2009-05-27 10:03:38 UTC (rev 4911)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionTake.java 2009-05-27 12:05:01 UTC (rev 4912)
@@ -41,11 +41,15 @@
public void perform(ExecutionImpl execution) {
TransitionImpl transition = execution.getTransition();
- execution.fire(Event.TAKE, transition);
- execution.performAtomicOperation(ExecutionImpl.TRANSITION_START_ACTIVITY);
+ execution.setActivity(null);
+ execution.fire(Event.TAKE, transition, ExecutionImpl.TRANSITION_START_ACTIVITY);
}
public MessageImpl< ? > createAsyncMessage(ExecutionImpl execution) {
- return new TransitionTakeMessage(execution);
+ throw new UnsupportedOperationException("please implement me");
}
+
+ public String toString() {
+ return "TransitionTake";
+ }
}
Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionTakeMessage.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionTakeMessage.java 2009-05-27 10:03:38 UTC (rev 4911)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/TransitionTakeMessage.java 2009-05-27 12:05:01 UTC (rev 4912)
@@ -1,59 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.model.op;
-
-import org.jbpm.api.Execution;
-import org.jbpm.api.env.Environment;
-import org.jbpm.pvm.internal.job.MessageImpl;
-import org.jbpm.pvm.internal.jobexecutor.JobDbSession;
-import org.jbpm.pvm.internal.model.ExecutionImpl;
-
-
-/**
- * @author Tom Baeyens
- */
-public class TransitionTakeMessage extends MessageImpl<Object> {
-
- private static final long serialVersionUID = 1L;
-
- public TransitionTakeMessage() {
- }
-
- public TransitionTakeMessage(ExecutionImpl execution) {
- super(execution);
- }
-
- public Object execute(Environment environment) throws Exception {
- AsyncContinuations.restoreState(execution);
-
- execution.performAtomicOperationSync(ExecutionImpl.TRANSITION_TAKE);
-
- JobDbSession jobDbSession = environment.get(JobDbSession.class);
- jobDbSession.delete(this);
-
- return null;
- }
-
- public String toString() {
- return "TransitionTakeMessage["+dbid+"]";
- }
-}
Modified: jbpm4/branches/tbaeyens/modules/pvm/src/main/resources/jbpm.execution.hbm.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/resources/jbpm.execution.hbm.xml 2009-05-27 10:03:38 UTC (rev 4911)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/resources/jbpm.execution.hbm.xml 2009-05-27 12:05:01 UTC (rev 4912)
@@ -30,8 +30,6 @@
<property name="activityName" column="ACTIVITYNAME_" />
<property name="processDefinitionId" column="PROCDEFID_" />
- <property name="transitionSourceName" column="TRANSRC_" />
- <property name="transitionSourceIndex" column="TRANSRCIDX_" />
<property name="hasVariables" column="HASVARS_" />
<map name="variables"
15 years
JBoss JBPM SVN: r4911 - in jbpm4/trunk: modules/distro and 4 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-05-27 06:03:38 -0400 (Wed, 27 May 2009)
New Revision: 4911
Added:
jbpm4/trunk/modules/integration/report/pom.xml
Modified:
jbpm4/trunk/modules/distro/pom.xml
jbpm4/trunk/modules/distro/src/main/files/jboss/build.xml
jbpm4/trunk/modules/integration/pom.xml
jbpm4/trunk/modules/integration/spi/integration-spi.iml
jbpm4/trunk/pom.xml
Log:
Added report-engine and default reports to distro
Modified: jbpm4/trunk/modules/distro/pom.xml
===================================================================
--- jbpm4/trunk/modules/distro/pom.xml 2009-05-27 09:20:30 UTC (rev 4910)
+++ jbpm4/trunk/modules/distro/pom.xml 2009-05-27 10:03:38 UTC (rev 4911)
@@ -56,6 +56,10 @@
</dependency>
<dependency>
<groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-console-reports</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-jboss4</artifactId>
</dependency>
<dependency>
@@ -87,8 +91,12 @@
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-test-db</artifactId>
</dependency>
-
<dependency>
+ <groupId>org.eclipse.birt</groupId>
+ <artifactId>report-engine</artifactId>
+ <type>zip</type>
+ </dependency>
+ <dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
</dependency>
Modified: jbpm4/trunk/modules/distro/src/main/files/jboss/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/jboss/build.xml 2009-05-27 09:20:30 UTC (rev 4910)
+++ jbpm4/trunk/modules/distro/src/main/files/jboss/build.xml 2009-05-27 10:03:38 UTC (rev 4911)
@@ -21,7 +21,8 @@
<property name="jboss.distro.path" value="${jboss.distro.dir}/${jboss.filename}" />
<property name="jboss.server.configuration" value="default" />
<property name="jboss.server.config.dir" value="${jboss.home}/server/${jboss.server.configuration}" />
-
+ <property name="jboss.server.data.dir" value="${jboss.home}/server/${jboss.server.configuration}/data" />
+
<property name="jbossidm.version" value="1.0.0.Alpha7" />
<property name="jbossidm.home" value="${jboss.parent.dir}/jbossidm-${jbossidm.version}" />
<property name="jbossidm.distro.url" value="http://repository.jboss.com/maven2/org/jboss/identity/idm/idm-assembly/${..." />
@@ -188,6 +189,12 @@
<copy todir="${jboss.home}/docs/examples/jbpm" overwrite="true">
<fileset dir="${jbpm.home}/jboss/datasources" />
</copy>
+
+ <!-- reporting -->
+ <property name="birt.dir" value="${jboss.server.data.dir}/birt"/>
+ <mkdir dir="${birt.dir}"/>
+ <unzip src="${jbpm.home}/lib/report-engine.zip" dest="${birt.dir}"/>
+ <unzip src="${jbpm.home}/lib/jbpm-console-reports.jar" dest="${birt.dir}"/>
</target>
<!-- ### THE JBOSS 5 SPECIFIC PART ############################### -->
@@ -210,7 +217,7 @@
</copy>
</target>
- <target name="internal.install.idm.into.jboss" if="jbpm.identity.idm">
+ <target name="internal.install.idm.into.jboss" if="jbpm.identity.idm">
<antcall target="get.jbossidm" />
<unzip src="${jbossidm.distro.path}" dest="${jbossidm.home}/.." />
<ant antfile="${jbossidm.home}/jboss/build.xml" target="install.jbossidm.into.jboss">
Modified: jbpm4/trunk/modules/integration/pom.xml
===================================================================
--- jbpm4/trunk/modules/integration/pom.xml 2009-05-27 09:20:30 UTC (rev 4910)
+++ jbpm4/trunk/modules/integration/pom.xml 2009-05-27 10:03:38 UTC (rev 4911)
@@ -123,6 +123,7 @@
<module>console</module>
<module>form-plugin</module>
<module>graphView-plugin</module>
+ <module>report</module>
</modules>
</project>
Added: jbpm4/trunk/modules/integration/report/pom.xml
===================================================================
--- jbpm4/trunk/modules/integration/report/pom.xml (rev 0)
+++ jbpm4/trunk/modules/integration/report/pom.xml 2009-05-27 10:03:38 UTC (rev 4911)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>jBPM 4 - Integration Reports</name>
+ <description>JBoss jBPM - GWT console Report Templates</description>
+
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-console-reports</artifactId>
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-integration</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- Dependencies -->
+ <dependencies>
+
+ </dependencies>
+
+</project>
Modified: jbpm4/trunk/modules/integration/spi/integration-spi.iml
===================================================================
--- jbpm4/trunk/modules/integration/spi/integration-spi.iml 2009-05-27 09:20:30 UTC (rev 4910)
+++ jbpm4/trunk/modules/integration/spi/integration-spi.iml 2009-05-27 10:03:38 UTC (rev 4911)
@@ -13,7 +13,6 @@
<orderEntry type="module" module-name="api" exported="" />
<orderEntry type="module" module-name="jpdl" exported="" />
<orderEntry type="module" module-name="test-base" exported="" />
- <orderEntry type="module" module-name="pvm" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: hsqldb:hsqldb:jar:1.8.0.7:test">
<CLASSES>
Modified: jbpm4/trunk/pom.xml
===================================================================
--- jbpm4/trunk/pom.xml 2009-05-27 09:20:30 UTC (rev 4910)
+++ jbpm4/trunk/pom.xml 2009-05-27 10:03:38 UTC (rev 4911)
@@ -62,6 +62,7 @@
<junit.version>3.8.1</junit.version>
<log4j.version>1.2.14</log4j.version>
<mail.version>1.4.1</mail.version>
+ <report.engine.version>2.3.2</report.engine.version>
<servlet-api.version>2.5</servlet-api.version>
<spring.version>2.0.8</spring.version>
<stax.api.version>1.0.1</stax.api.version>
@@ -151,6 +152,17 @@
<version>${version}</version>
</dependency>
<dependency>
+ <groupId>org.eclipse.birt</groupId>
+ <artifactId>report-engine</artifactId>
+ <type>zip</type>
+ <version>${report.engine.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-console-reports</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-jboss4</artifactId>
<version>${version}</version>
15 years
JBoss JBPM SVN: r4910 - in projects/gwt-console/trunk/gui: war/src/main/java/org/jboss/bpm/console/client/common and 6 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-05-27 05:20:30 -0400 (Wed, 27 May 2009)
New Revision: 4910
Added:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateDefinitionsAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/search/
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/search/SearchDefinitionView.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/search/SearchDelegate.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/search/SearchWindow.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/search/UpdateSearchDefinitionsAction.java
Removed:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadDefinitionsAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadInstancesAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/OverviewReportView.java
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteDefinitionAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteInstanceAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorNavigation.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/StartNewInstanceAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/StateChangeAction.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorNavigation.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorNavigation.java
projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/public/console.css
projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java
projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/Editor.java
Log:
Added definition search. More work on ReportView
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -108,7 +108,7 @@
}
};
- t.schedule(5000);
+ t.schedule(20000);
}
catch (RequestException e)
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -33,6 +33,7 @@
import org.gwt.mosaic.ui.client.ToolButton;
import org.gwt.mosaic.ui.client.layout.*;
import org.gwt.mosaic.ui.client.list.DefaultListModel;
+import org.gwt.mosaic.ui.client.list.ListModel;
import org.jboss.bpm.console.client.common.AbstractView;
import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
@@ -60,6 +61,9 @@
ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
setTitle("Process Definitions");
setIcon(icons.processIcon());
+
+ listBox = createListBox();
+
}
public boolean isInitialized()
@@ -75,60 +79,6 @@
definitionList.setPadding(0);
definitionList.setWidgetSpacing(0);
- listBox =
- new ListBox<ProcessDefinitionRef>(
- new String[] {
- "Process ID", "Version", "Name"}
- );
-
-
- listBox.setCellRenderer(new ListBox.CellRenderer<ProcessDefinitionRef>() {
- public void renderCell(ListBox<ProcessDefinitionRef> listBox, int row, int column,
- ProcessDefinitionRef item) {
- switch (column) {
- case 0:
- listBox.setText(row, column, item.getId());
- break;
- case 1:
- listBox.setText(row, column, String.valueOf(item.getVersion()));
- break;
- case 2:
- listBox.setText(row, column, item.getName());
- break;
- default:
- throw new RuntimeException("Unexpected column size");
- }
- }
- });
-
- listBox.addChangeListener(new ChangeListener()
- {
- public void onChange(Widget widget)
- {
- int index = listBox.getSelectedIndex();
- if(index!=-1)
- {
- ProcessDefinitionRef item = listBox.getItem(index);
-
- // update details
- controller.handleEvent(
- new Event(UpdateProcessDetailAction.ID, item)
- );
-
- // load instances
- controller.handleEvent(
- new Event(
- LoadInstancesAction.ID,
- item
- )
- );
- }
- }
- });
-
- final DefaultListModel<ProcessDefinitionRef> model =
- (DefaultListModel<ProcessDefinitionRef>) listBox.getModel();
-
// toolbar
final LayoutPanel toolBox = new LayoutPanel();
@@ -142,7 +92,7 @@
public void onClick(Widget sender) {
// force loading
controller.handleEvent(
- new Event(LoadDefinitionsAction.ID, null)
+ new Event(UpdateDefinitionsAction.ID, null)
);
}
}
@@ -192,17 +142,70 @@
}
}
+ private ListBox createListBox()
+ {
+ final ListBox<ProcessDefinitionRef> listBox =
+ new ListBox<ProcessDefinitionRef>(
+ new String[] {
+ "Process ID", "Version", "Name"}
+ );
+
+ listBox.setCellRenderer(new ListBox.CellRenderer<ProcessDefinitionRef>() {
+ public void renderCell(ListBox<ProcessDefinitionRef> listBox, int row, int column,
+ ProcessDefinitionRef item) {
+ switch (column) {
+ case 0:
+ listBox.setText(row, column, item.getId());
+ break;
+ case 1:
+ listBox.setText(row, column, String.valueOf(item.getVersion()));
+ break;
+ case 2:
+ listBox.setText(row, column, item.getName());
+ break;
+ default:
+ throw new RuntimeException("Unexpected column size");
+ }
+ }
+ });
+
+ listBox.addChangeListener(new ChangeListener()
+ {
+ public void onChange(Widget widget)
+ {
+ int index = listBox.getSelectedIndex();
+ if(index!=-1)
+ {
+ ProcessDefinitionRef item = listBox.getItem(index);
+
+ // update details
+ controller.handleEvent(
+ new Event(UpdateProcessDetailAction.ID, item)
+ );
+
+ // load instances
+ controller.handleEvent(
+ new Event(
+ UpdateInstancesAction.ID,
+ item
+ )
+ );
+ }
+ }
+ });
+
+ return listBox;
+ }
+
+
public void setController(Controller controller)
{
this.controller = controller;
}
public void update(List<ProcessDefinitionRef> definitions)
- {
- // lazy init
- initialize();
-
+ {
final DefaultListModel<ProcessDefinitionRef> model =
(DefaultListModel<ProcessDefinitionRef>) listBox.getModel();
@@ -226,4 +229,5 @@
selection = listBox.getItem( listBox.getSelectedIndex());
return selection;
}
+
}
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteDefinitionAction.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteDefinitionAction.java 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteDefinitionAction.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -61,7 +61,7 @@
{
// refresh
controller.handleEvent(
- new Event(LoadDefinitionsAction.ID, null)
+ new Event(UpdateDefinitionsAction.ID, null)
);
}
}
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteInstanceAction.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteInstanceAction.java 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/DeleteInstanceAction.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -67,7 +67,7 @@
// refresh instances
controller.handleEvent(
new Event(
- LoadInstancesAction.ID,
+ UpdateInstancesAction.ID,
def
)
);
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -39,8 +39,6 @@
import org.jboss.bpm.console.client.model.ProcessInstanceRef;
import org.jboss.bpm.console.client.model.util.SimpleDateFormat;
import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.ServerStatusView;
-import org.jboss.bpm.console.client.ServerPlugins;
import java.util.List;
@@ -144,7 +142,7 @@
public void onClick(Widget sender) {
controller.handleEvent(
new Event(
- LoadInstancesAction.ID,
+ UpdateInstancesAction.ID,
getCurrentDefinition()
)
);
Deleted: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadDefinitionsAction.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadDefinitionsAction.java 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadDefinitionsAction.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.console.client.process;
-
-import com.google.gwt.http.client.RequestBuilder;
-import com.google.gwt.http.client.Response;
-import com.google.gwt.json.client.JSONParser;
-import com.google.gwt.json.client.JSONValue;
-import com.mvc4g.client.Controller;
-import com.mvc4g.client.Event;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.util.ConsoleLog;
-import org.jboss.bpm.console.client.common.AbstractRESTAction;
-import org.jboss.bpm.console.client.model.DTOParser;
-import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
-
-import java.util.List;
-
-/**
- * Loads a process definition list.
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-class LoadDefinitionsAction extends AbstractRESTAction
-{
- public final static String ID = LoadDefinitionsAction.class.getName();
-
- public LoadDefinitionsAction(ApplicationContext appContext)
- {
- super(appContext);
- }
-
- public String getId()
- {
- return ID;
- }
-
- public String getUrl(Object event)
- {
- return appContext.getUrlBuilder().getProcessDefinitionsURL();
- }
-
- public RequestBuilder.Method getRequestMethod()
- {
- return RequestBuilder.GET;
- }
-
- public void handleSuccessfulResponse(final Controller controller, final Object event, Response response)
- {
- if (200 == response.getStatusCode())
- {
- JSONValue json = JSONParser.parse(response.getText());
- List<ProcessDefinitionRef> definitions = DTOParser.parseProcessDefinitions(json);
- DefinitionListView view = (DefinitionListView) controller.getView(DefinitionListView.ID);
- view.update(definitions);
-
- ConsoleLog.info("Loaded " + definitions.size() + " process definitions");
- }
- else
- {
- // Handle the error. Can get the status text from response.getStatusText()
- String message = "Failed to load instances. " +
- "HTTP " + response.getStatusCode() +
- ": " + response.getText();
- ConsoleLog.error(message);
- appContext.displayMessage(message,true);
- }
- }
-}
Deleted: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadInstancesAction.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadInstancesAction.java 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadInstancesAction.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -1,84 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.console.client.process;
-
-import com.google.gwt.http.client.RequestBuilder;
-import com.google.gwt.http.client.Response;
-import com.google.gwt.json.client.JSONParser;
-import com.google.gwt.json.client.JSONValue;
-import com.mvc4g.client.Controller;
-import com.mvc4g.client.Event;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.util.ConsoleLog;
-import org.jboss.bpm.console.client.common.AbstractRESTAction;
-import org.jboss.bpm.console.client.model.DTOParser;
-import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
-import org.jboss.bpm.console.client.model.ProcessInstanceRef;
-
-import java.util.List;
-
-/**
- * Force loading of a process instance list.
- * Triggered through {@link org.jboss.bpm.console.client.model.ProcessDefinitionRef}.
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-class LoadInstancesAction extends AbstractRESTAction
-{
- public final static String ID = LoadInstancesAction.class.getName();
-
- public LoadInstancesAction(ApplicationContext appContext)
- {
- super(appContext);
- }
-
- public String getId()
- {
- return ID;
- }
-
- public String getUrl(Object event)
- {
- final ProcessDefinitionRef def = (ProcessDefinitionRef)event;
- return appContext.getUrlBuilder().getProcessInstancesURL(def.getId());
- }
-
- public RequestBuilder.Method getRequestMethod()
- {
- return RequestBuilder.GET;
- }
-
- public void handleSuccessfulResponse(final Controller controller, final Object event, Response response)
- {
- final ProcessDefinitionRef def = (ProcessDefinitionRef)event;
- JSONValue json = JSONParser.parse(response.getText());
-
- List<ProcessInstanceRef> instances = DTOParser.parseProcessInstances(json);
- InstanceListView view = (InstanceListView) controller.getView(InstanceListView.ID);
- view.update(def, instances);
-
- ConsoleLog.info("Loaded " + instances.size() + " process instance(s)");
-
- }
-
-}
-
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -23,11 +23,9 @@
import com.google.gwt.user.client.ui.SourcesTabEvents;
import com.google.gwt.user.client.ui.TabListener;
-import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.core.client.GWT;
import com.mvc4g.client.ActionInterface;
import com.mvc4g.client.Event;
-import com.mvc4g.client.ViewInterface;
import org.gwt.mosaic.ui.client.DecoratedTabLayoutPanel;
import org.gwt.mosaic.ui.client.MessageBox;
import org.gwt.mosaic.ui.client.TabLayoutPanel;
@@ -101,8 +99,8 @@
registerView(InstanceListView.ID, new InstanceListView(appContext));
// create and register actions
- registerAction(LoadDefinitionsAction.ID, new LoadDefinitionsAction(appContext));
- registerAction(LoadInstancesAction.ID, new LoadInstancesAction(appContext));
+ registerAction(UpdateDefinitionsAction.ID, new UpdateDefinitionsAction(appContext));
+ registerAction(UpdateInstancesAction.ID, new UpdateInstancesAction(appContext));
registerAction(StartNewInstanceAction.ID, new StartNewInstanceAction(appContext));
registerAction(StateChangeAction.ID, new StateChangeAction(appContext));
registerAction(DeleteDefinitionAction.ID, new DeleteDefinitionAction(appContext));
@@ -113,7 +111,7 @@
// force loading
super.controller.handleEvent(
- new Event(LoadDefinitionsAction.ID, null)
+ new Event(UpdateDefinitionsAction.ID, null)
);
appContext.refreshView();
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorNavigation.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorNavigation.java 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditorNavigation.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -38,14 +38,14 @@
super.setTitle("Processes");
TreeItem root = addItem("Process Definitions");
- TreeItem definitions = root.addItem("View definitions");
+ TreeItem definitions = root.addItem("Definition List");
addTreeListener(
new TreeListener()
{
public void onTreeItemSelected(TreeItem treeItem)
{
- if("View definitions".equals(treeItem.getText()))
+ if("Definition List".equals(treeItem.getText()))
{
Workspace workspace = appContext.getWorkpace();
workspace.showEditor(ProcessEditor.ID);
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/StartNewInstanceAction.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/StartNewInstanceAction.java 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/StartNewInstanceAction.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -66,7 +66,7 @@
// force reload instance list
controller.handleEvent(
- new Event(LoadInstancesAction.ID, def)
+ new Event(UpdateInstancesAction.ID, def)
);
}
}
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/StateChangeAction.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/StateChangeAction.java 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/StateChangeAction.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -69,7 +69,7 @@
ProcessDefinitionRef def = view.getCurrentDefinition();
// force reload instance list
- controller.handleEvent( new Event(LoadInstancesAction.ID, def));
+ controller.handleEvent( new Event(UpdateInstancesAction.ID, def));
}
}
Copied: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateDefinitionsAction.java (from rev 4881, projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadDefinitionsAction.java)
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateDefinitionsAction.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateDefinitionsAction.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.process;
+
+import com.google.gwt.http.client.RequestBuilder;
+import com.google.gwt.http.client.Response;
+import com.google.gwt.json.client.JSONParser;
+import com.google.gwt.json.client.JSONValue;
+import com.mvc4g.client.Controller;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.model.DTOParser;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+
+import java.util.List;
+
+/**
+ * Loads a process definition list
+ * and updates {@link org.jboss.bpm.console.client.process.DefinitionListView}
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class UpdateDefinitionsAction extends AbstractRESTAction
+{
+ public final static String ID = UpdateDefinitionsAction.class.getName();
+
+ public UpdateDefinitionsAction(ApplicationContext appContext)
+ {
+ super(appContext);
+ }
+
+ public String getId()
+ {
+ return ID;
+ }
+
+ public String getUrl(Object event)
+ {
+ return appContext.getUrlBuilder().getProcessDefinitionsURL();
+ }
+
+ public RequestBuilder.Method getRequestMethod()
+ {
+ return RequestBuilder.GET;
+ }
+
+ public void handleSuccessfulResponse(final Controller controller, final Object event, Response response)
+ {
+ JSONValue json = JSONParser.parse(response.getText());
+ List<ProcessDefinitionRef> definitions = DTOParser.parseProcessDefinitions(json);
+
+ DefinitionListView view = (DefinitionListView) controller.getView(DefinitionListView.ID);
+ view.update(definitions);
+
+ ConsoleLog.info("Loaded " + definitions.size() + " process definitions");
+
+ }
+}
Copied: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java (from rev 4881, projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/LoadInstancesAction.java)
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateInstancesAction.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.process;
+
+import com.google.gwt.http.client.RequestBuilder;
+import com.google.gwt.http.client.Response;
+import com.google.gwt.json.client.JSONParser;
+import com.google.gwt.json.client.JSONValue;
+import com.mvc4g.client.Controller;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.model.DTOParser;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
+
+import java.util.List;
+
+/**
+ * Loads a process instance list and updates
+ * {@link org.jboss.bpm.console.client.process.InstanceListView}.<br>
+ * Triggered by {@link org.jboss.bpm.console.client.model.ProcessDefinitionRef}.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class UpdateInstancesAction extends AbstractRESTAction
+{
+ public final static String ID = UpdateInstancesAction.class.getName();
+
+ public UpdateInstancesAction(ApplicationContext appContext)
+ {
+ super(appContext);
+ }
+
+ public String getId()
+ {
+ return ID;
+ }
+
+ public String getUrl(Object event)
+ {
+ final ProcessDefinitionRef def = (ProcessDefinitionRef)event;
+ return appContext.getUrlBuilder().getProcessInstancesURL(def.getId());
+ }
+
+ public RequestBuilder.Method getRequestMethod()
+ {
+ return RequestBuilder.GET;
+ }
+
+ public void handleSuccessfulResponse(final Controller controller, final Object event, Response response)
+ {
+ final ProcessDefinitionRef def = (ProcessDefinitionRef)event;
+ JSONValue json = JSONParser.parse(response.getText());
+
+ List<ProcessInstanceRef> instances = DTOParser.parseProcessInstances(json);
+ InstanceListView view = (InstanceListView) controller.getView(InstanceListView.ID);
+ view.update(def, instances);
+
+ ConsoleLog.info("Loaded " + instances.size() + " process instance(s)");
+
+ }
+
+}
+
Deleted: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/OverviewReportView.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/OverviewReportView.java 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/OverviewReportView.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -1,134 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.console.client.report;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.ui.ClickListener;
-import com.google.gwt.user.client.ui.Frame;
-import com.google.gwt.user.client.ui.Widget;
-import com.mvc4g.client.Controller;
-import org.gwt.mosaic.ui.client.ToolBar;
-import org.gwt.mosaic.ui.client.ToolButton;
-import org.gwt.mosaic.ui.client.layout.BoxLayout;
-import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
-import org.gwt.mosaic.ui.client.layout.LayoutPanel;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.common.AbstractView;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
-import org.jboss.bpm.console.client.util.ConsoleLog;
-
-import java.util.Date;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class OverviewReportView extends AbstractView
-{
- public final static String ID = OverviewReportView.class.getName();
-
- private Controller controller;
-
- private boolean isInitialized;
-
- private ApplicationContext appContext;
-
- private LayoutPanel layout;
-
- private Frame frame;
-
- public OverviewReportView(ApplicationContext appContext)
- {
- super();
- this.appContext = appContext;
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
- setTitle("Process Activity");
- setIcon(icons.reportIcon());
- }
-
- public boolean isInitialized()
- {
- return isInitialized;
- }
-
- public void initialize()
- {
- if(!isInitialized)
- {
-
- // layout
- layout = new LayoutPanel( new BoxLayout(BoxLayout.Orientation.VERTICAL));
- layout.setPadding(0);
- layout.setWidgetSpacing(0);
-
- // report frame
- frame = new Frame();
- DOM.setStyleAttribute(frame.getElement(), "border", "none");
-
- setFrameUrl(appContext.getUrlBuilder().getOverviewReportUrl());
-
-
- // toolbar
- final LayoutPanel toolBox = new LayoutPanel();
- toolBox.setPadding(0);
- toolBox.setWidgetSpacing(5);
- //toolBox.setLayout(new BoxLayout(BoxLayout.Orientation.VERTICAL));
-
- final ToolBar toolBar = new ToolBar();
- toolBar.add(
- new ToolButton("Refresh", new ClickListener() {
- public void onClick(Widget sender) {
- setFrameUrl(appContext.getUrlBuilder().getOverviewReportUrl());
- }
- }
- )
- );
-
- toolBar.addSeparator();
-
- toolBox.add(toolBar, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
-
- // assembly
- layout.add(toolBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
- layout.add(frame, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
-
- this.add(layout);
- this.isInitialized = true;
- }
- }
-
- public void setController(Controller controller)
- {
- this.controller = controller;
- }
-
- private void setFrameUrl(String url)
- {
- // https://jira.jboss.org/jira/browse/JBPM-2244
- frame.getElement().setId(
- String.valueOf( new Date().getTime())
- );
-
- frame.setUrl(url);
-
- }
-}
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -26,24 +26,15 @@
import org.jboss.bpm.console.client.ApplicationContext;
import org.jboss.bpm.console.client.LazyPanel;
import org.jboss.bpm.console.client.common.AbstractView;
-import org.jboss.bpm.console.client.process.*;
-import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
import org.gwt.mosaic.ui.client.DecoratedTabLayoutPanel;
-import org.gwt.mosaic.ui.client.MessageBox;
import org.gwt.mosaic.ui.client.layout.BorderLayoutData;
import org.gwt.mosaic.ui.client.layout.BorderLayout;
import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.ui.Frame;
import com.google.gwt.user.client.ui.TabListener;
import com.google.gwt.user.client.ui.SourcesTabEvents;
-import com.google.gwt.user.client.ui.TabPanel;
-import com.google.gwt.user.client.DOM;
-import com.mvc4g.client.Event;
import com.mvc4g.client.ActionInterface;
-import java.util.Date;
-
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
@@ -100,10 +91,10 @@
this.add(tabPanel, new BorderLayoutData(BorderLayout.Region.CENTER));
// create and register views
- registerView(OverviewReportView.ID, new OverviewReportView(appContext));
+ registerView(ReportView.ID, new ReportView(appContext));
// create and register actions
- //registerAction(LoadDefinitionsAction.ID, new LoadDefinitionsAction(appContext));
+ //registerAction(UpdateDefinitionsAction.ID, new UpdateDefinitionsAction(appContext));
// display tab, needs to visible for correct rendering
tabPanel.selectTab(0);
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorNavigation.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorNavigation.java 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditorNavigation.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -36,15 +36,15 @@
{
super.setTitle("Reporting");
- TreeItem root = addItem("Processes");
- TreeItem definitions = root.addItem("Overview");
+ TreeItem root = addItem("Available Reports");
+ TreeItem definitions = root.addItem("Processes");
addTreeListener(
new TreeListener()
{
public void onTreeItemSelected(TreeItem treeItem)
{
- if("Overview".equals(treeItem.getText()))
+ if("Processes".equals(treeItem.getText()))
{
Workspace workspace = appContext.getWorkpace();
workspace.showEditor(ReportEditor.ID);
Copied: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java (from rev 4901, projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/OverviewReportView.java)
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportView.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -0,0 +1,227 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.report;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.ui.Frame;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.ui.MenuBar;
+import com.mvc4g.client.Controller;
+import com.mvc4g.client.Event;
+import org.gwt.mosaic.ui.client.ToolBar;
+import org.gwt.mosaic.ui.client.ToolButton;
+import org.gwt.mosaic.ui.client.PopupMenu;
+import org.gwt.mosaic.ui.client.layout.BoxLayout;
+import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
+import org.gwt.mosaic.ui.client.layout.LayoutPanel;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.common.AbstractView;
+import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
+import org.jboss.bpm.console.client.search.SearchDefinitionView;
+import org.jboss.bpm.console.client.search.SearchDelegate;
+import org.jboss.bpm.console.client.search.SearchWindow;
+import org.jboss.bpm.console.client.search.UpdateSearchDefinitionsAction;
+
+import java.util.Date;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class ReportView extends AbstractView
+{
+ public final static String ID = ReportView.class.getName();
+
+ private Controller controller;
+ private boolean isInitialized;
+ private ApplicationContext appContext;
+ private LayoutPanel layout;
+ private Frame frame;
+
+ private SearchDefinitionView search;
+
+ public ReportView(ApplicationContext appContext)
+ {
+ super();
+ this.appContext = appContext;
+ ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
+ setTitle("Process Reports");
+ setIcon(icons.reportIcon());
+ }
+
+ public boolean isInitialized()
+ {
+ return isInitialized;
+ }
+
+ public void initialize()
+ {
+ if(!isInitialized)
+ {
+
+ // layout
+ layout = new LayoutPanel( new BoxLayout(BoxLayout.Orientation.VERTICAL));
+ layout.setPadding(0);
+ layout.setWidgetSpacing(0);
+
+ // search capabilities
+ search = new SearchDefinitionView(
+ appContext,
+ new SearchDelegate()
+ {
+ public void handleResult(String procDefId)
+ {
+ String reportUrl = appContext.getUrlBuilder().getDefinitionReportUrl(
+ procDefId
+ );
+
+ setFrameUrl(reportUrl);
+ }
+
+ public String getActionName()
+ {
+ return "Open report";
+ }
+ }
+ );
+
+
+ // report frame
+ frame = new Frame();
+ DOM.setStyleAttribute(frame.getElement(), "border", "none");
+
+ // toolbar
+ final LayoutPanel toolBox = new LayoutPanel();
+ toolBox.setPadding(0);
+ toolBox.setWidgetSpacing(5);
+ //toolBox.setLayout(new BoxLayout(BoxLayout.Orientation.VERTICAL));
+
+ final ToolBar toolBar = new ToolBar();
+ toolBar.add(createMenuBtn());
+ toolBox.add(toolBar, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+
+ // assembly
+ layout.add(toolBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+ layout.add(frame, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
+
+ this.add(layout);
+
+ // views and actions
+ controller.addView(
+ "report.definition.search", search
+ );
+
+ controller.addAction(
+ UpdateSearchDefinitionsAction.ID, new UpdateSearchDefinitionsAction(appContext)
+ );
+
+ // default report
+ setFrameUrl(appContext.getUrlBuilder().getOverviewReportUrl());
+
+ this.isInitialized = true;
+ }
+ }
+
+ private Widget createMenuBtn()
+ {
+ // Add a menu button
+ ToolButton menuButton = new ToolButton("Available Reports");
+ menuButton.setStyle(ToolButton.ToolButtonStyle.MENU);
+
+ // Make a command that we will execute from all menu items.
+ Command cmd1 = new Command() {
+ public void execute() {
+ setFrameUrl(appContext.getUrlBuilder().getOverviewReportUrl());
+ }
+ };
+
+ Command cmd2 = new Command() {
+ public void execute()
+ {
+ SearchWindow sw = new SearchWindow("Open execution report", search);
+ sw.center();
+
+ controller.handleEvent(
+ new Event(
+ UpdateSearchDefinitionsAction.ID,
+ "report.definition.search"
+ )
+ );
+
+ }
+ };
+
+ PopupMenu menuBtnMenu = new PopupMenu();
+ menuBtnMenu.addItem("Process Activity", cmd1);
+ menuBtnMenu.addItem("Execution Details", cmd2);
+
+ menuButton.setMenu(menuBtnMenu);
+
+ return menuButton;
+ }
+
+ public void setController(Controller controller)
+ {
+ this.controller = controller;
+ }
+
+ private void setFrameUrl(String url)
+ {
+ // https://jira.jboss.org/jira/browse/JBPM-2244
+ frame.getElement().setId(
+ String.valueOf( new Date().getTime())
+ );
+
+ frame.setUrl(url);
+
+ }
+
+ /**
+ * Create the menu bar.
+ */
+ private MenuBar createMenuBar() {
+ // Create a command that will execute on menu item selection
+ Command menuCommand = new Command()
+ {
+ public void execute() {
+
+ }
+ };
+
+ // Create a menu bar
+ MenuBar menu = new MenuBar();
+ menu.setAnimationEnabled(true);
+
+ // Create a sub menu of recent documents
+ MenuBar reportMenu = new MenuBar(true);
+ reportMenu.addItem("Process Activity Report", menuCommand);
+ reportMenu.addItem("Execution Report", menuCommand);
+
+
+ // Create the help menu
+ MenuBar helpMenu = new MenuBar(true);
+ menu.addSeparator();
+
+ return menu;
+ }
+}
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/search/SearchDefinitionView.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/search/SearchDefinitionView.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/search/SearchDefinitionView.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -0,0 +1,130 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.search;
+
+import com.google.gwt.user.client.ui.*;
+import com.mvc4g.client.Controller;
+import com.mvc4g.client.ViewInterface;
+import org.gwt.mosaic.ui.client.Label;
+import org.gwt.mosaic.ui.client.layout.LayoutPanel;
+import org.gwt.mosaic.ui.client.layout.BoxLayout;
+import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class SearchDefinitionView
+ extends LayoutPanel implements ViewInterface
+{
+
+ private Controller controller;
+ private ApplicationContext appContext;
+ private SearchDelegate delegate;
+ private SuggestBox suggestBox;
+
+ private String selection = null;
+
+ private SearchWindow parent;
+
+ public SearchDefinitionView(ApplicationContext appContext, SearchDelegate delegate)
+ {
+ super(new BoxLayout(BoxLayout.Orientation.VERTICAL));
+
+ this.appContext = appContext;
+ this.delegate = delegate;
+ this.setPadding(10);
+
+ }
+
+ public void setController(Controller controller)
+ {
+ this.controller = controller;
+ }
+
+ private MultiWordSuggestOracle createOracle(List<ProcessDefinitionRef> definitions)
+ {
+ MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
+
+ for(ProcessDefinitionRef p : definitions)
+ {
+ oracle.add(p.getId());
+ }
+
+ return oracle;
+ }
+
+ public void update(List<ProcessDefinitionRef> definitions)
+ {
+ this.clear();
+ this.selection = null;
+
+ HTML desc = new HTML("Please enter a process definition ID.");
+ this.add(desc, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+
+ suggestBox = new SuggestBox(
+ createOracle(definitions)
+ );
+
+ suggestBox.addEventHandler(
+ new SuggestionHandler()
+ {
+ public void onSuggestionSelected(SuggestionEvent suggestionEvent)
+ {
+ selection = suggestionEvent.getSelectedSuggestion().getReplacementString();
+ }
+ }
+ );
+
+ this.add(suggestBox);
+
+ Grid g = new Grid(2,2);
+ g.setWidget(0,0, new Label("ID: "));
+ g.setWidget(0,1, suggestBox);
+
+ Button button = new Button(delegate.getActionName(),
+ new ClickListener()
+ {
+ public void onClick(Widget widget)
+ {
+ if(selection!=null)
+ {
+ delegate.handleResult(selection);
+ parent.close();
+ }
+ }
+ });
+
+ g.setWidget(1,1, button);
+ this.add(g, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+
+ invalidate();
+ }
+
+ void setParent(SearchWindow window)
+ {
+ this.parent = window;
+ }
+}
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/search/SearchDelegate.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/search/SearchDelegate.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/search/SearchDelegate.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.search;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public interface SearchDelegate
+{
+ void handleResult(String procDefId);
+
+ String getActionName();
+}
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/search/SearchWindow.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/search/SearchWindow.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/search/SearchWindow.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.search;
+
+import com.google.gwt.user.client.WindowCloseListener;
+import org.gwt.mosaic.ui.client.WindowPanel;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class SearchWindow
+{
+ private WindowPanel window;
+
+ public SearchWindow(String title, SearchDefinitionView view)
+ {
+ view.setParent(this);
+ createLayoutWindowPanel(title, view);
+
+ }
+
+ /**
+ * The 'layout' window panel.
+ */
+ private void createLayoutWindowPanel(String title, SearchDefinitionView view) {
+ window = new WindowPanel(title);
+ window.setAnimationEnabled(true);
+ window.setSize("320px", "180px");
+
+ window.setWidget(view);
+
+ window.addWindowCloseListener(new WindowCloseListener() {
+ public void onWindowClosed() {
+ window = null;
+ }
+
+ public String onWindowClosing() {
+ return null;
+ }
+ });
+ }
+
+ public void center()
+ {
+ window.center();
+ }
+
+ public void close()
+ {
+ window.hide();
+ window = null;
+ }
+}
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/search/UpdateSearchDefinitionsAction.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/search/UpdateSearchDefinitionsAction.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/search/UpdateSearchDefinitionsAction.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.search;
+
+import com.google.gwt.http.client.RequestBuilder;
+import com.google.gwt.http.client.Response;
+import com.google.gwt.json.client.JSONParser;
+import com.google.gwt.json.client.JSONValue;
+import com.mvc4g.client.Controller;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.model.DTOParser;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+
+import java.util.List;
+
+/**
+ * Loads a process definition list
+ * and updates a search view.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class UpdateSearchDefinitionsAction extends AbstractRESTAction
+{
+ public final static String ID = UpdateSearchDefinitionsAction.class.getName();
+
+ public UpdateSearchDefinitionsAction(ApplicationContext appContext)
+ {
+ super(appContext);
+ }
+
+ public String getId()
+ {
+ return ID;
+ }
+
+ public String getUrl(Object event)
+ {
+ return appContext.getUrlBuilder().getProcessDefinitionsURL();
+ }
+
+ public RequestBuilder.Method getRequestMethod()
+ {
+ return RequestBuilder.GET;
+ }
+
+ public void handleSuccessfulResponse(final Controller controller, final Object event, Response response)
+ {
+ String target = (String)event;
+
+ JSONValue json = JSONParser.parse(response.getText());
+ List<ProcessDefinitionRef> definitions = DTOParser.parseProcessDefinitions(json);
+
+ SearchDefinitionView view = (SearchDefinitionView)controller.getView(target);
+ view.update(definitions);
+
+ ConsoleLog.info("Loaded " + definitions.size() + " process definitions");
+ }
+}
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorNavigation.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorNavigation.java 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditorNavigation.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -37,14 +37,14 @@
super.setTitle("Tasks");
TreeItem root = addItem("Task Management");
- TreeItem definitions = root.addItem("View Tasks");
+ TreeItem definitions = root.addItem("Task Lists");
addTreeListener(
new TreeListener()
{
public void onTreeItemSelected(TreeItem treeItem)
{
- if("View Tasks".equals(treeItem.getText()))
+ if("Task Lists".equals(treeItem.getText()))
{
Workspace workspace = appContext.getWorkpace();
workspace.showEditor(TaskEditor.ID);
Modified: projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/public/console.css
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/public/console.css 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/public/console.css 2009-05-27 09:20:30 UTC (rev 4910)
@@ -267,3 +267,8 @@
}
/* end - custom widgets */
+
+.gwt-SuggestBoxPopup { z-index:100000; border: 1px solid #C3D9FF;}
+.gwt-SuggestBoxPopup .item { padding: 2px;}
+.gwt-SuggestBoxPopup .item-selected { background-color: #C3D9FF; padding: 2px;}
+
Modified: projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java
===================================================================
--- projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -46,5 +46,4 @@
Viewport getViewport();
void refreshView();
-
}
Modified: projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/Editor.java
===================================================================
--- projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/Editor.java 2009-05-27 09:14:59 UTC (rev 4909)
+++ projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/Editor.java 2009-05-27 09:20:30 UTC (rev 4910)
@@ -62,8 +62,10 @@
this.appContext = appContext;
// hmvc controller chain.
- this.controller = new Controller();
- this.controller.setParent(appContext.getController());
+ //this.controller = new Controller();
+ //this.controller.setParent(appContext.getController());
+
+ this.controller = appContext.getController();
}
public boolean isInitialized()
15 years
JBoss JBPM SVN: r4909 - in jbpm4/trunk/modules: integration/form-plugin/src/main/java/org/jbpm/integration/console/forms and 16 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-05-27 05:14:59 -0400 (Wed, 27 May 2009)
New Revision: 4909
Modified:
jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/deployer/HTTP.java
jbpm4/trunk/modules/integration/form-plugin/src/main/java/org/jbpm/integration/console/forms/TaskDispatcherPluginImpl.java
jbpm4/trunk/modules/integration/graphView-plugin/src/main/java/org/jbpm/integration/console/graphView/XmlUtil.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetParticipantsCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jms/JmsMessageUtil.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/AbstractQuery.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryActivityInstanceQueryImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryProcessInstanceQueryImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/JobQueryImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ProcessDefinitionQueryImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ProcessInstanceQueryImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/JuelScriptEngine.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/JuelScriptEngineFactory.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskQueryImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/Type.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/DOMWriter.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/ReflectUtil.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/ProblemImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/ProblemList.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/cron/CronExpression.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/type/VariableAutoTypeResolutionTest.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/process/DeploymentResourcesTest.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/variables/VariableBasicTypesTest.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/LoadTestCase.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/GenerateExceptionTestCommand.java
Log:
RESOLVED - issue JBPM-2148: StringBuffer use in jBPM 4
https://jira.jboss.org/jira/browse/JBPM-2148
Modified: jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/deployer/HTTP.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/deployer/HTTP.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/deployer/HTTP.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -35,31 +35,19 @@
public static String post(String urlString, InputStream inputStream, String[] credentials)
throws Exception
{
-
HttpURLConnection conn = null;
- BufferedReader br = null;
DataOutputStream dos = null;
- DataInputStream inStream = null;
- InputStream is = null;
- OutputStream os = null;
- boolean ret = false;
- String StrMessage = "";
-
-
String lineEnd = "\r\n";
String twoHyphens = "--";
String boundary = "*****";
-
int bytesRead, bytesAvailable, bufferSize;
byte[] buffer;
int maxBufferSize = 1*1024*1024;
- String responseFromServer = "";
-
try
{
//------------------ CLIENT REQUEST
@@ -125,13 +113,11 @@
inputStream.close();
dos.flush();
dos.close();
-
}
catch (MalformedURLException ex)
{
throw ex;
}
-
catch (IOException ioe)
{
throw ioe;
@@ -140,28 +126,25 @@
//------------------ read the SERVER RESPONSE
- StringBuffer sb = new StringBuffer();
+ StringBuilder response = new StringBuilder();
try
{
- inStream = new DataInputStream ( conn.getInputStream() );
+ BufferedReader reader = new BufferedReader( new InputStreamReader ( conn.getInputStream() ) );
String str;
- while (( str = inStream.readLine()) != null)
+ while (( str = reader.readLine()) != null)
{
- sb.append(str).append("");
+ response.append(str).append("");
}
- inStream.close();
-
+ reader.close();
}
catch (IOException ioex)
{
System.out.println("From (ServerResponse): "+ioex);
-
}
+ return response.toString();
- return sb.toString();
-
}
private static void applyCredentials(String[] credentials, HttpURLConnection conn)
@@ -173,7 +156,7 @@
public static String get(String urlString, String[] credentials)
{
- StringBuffer sb = new StringBuffer();
+ StringBuilder response = new StringBuilder();
try
{
URL url = new URL(urlString);
@@ -187,7 +170,7 @@
while ((str = in.readLine()) != null)
{
- sb.append(str);
+ response.append(str);
}
in.close();
@@ -201,7 +184,7 @@
throw new RuntimeException(e);
}
- return sb.toString();
+ return response.toString();
}
}
Modified: jbpm4/trunk/modules/integration/form-plugin/src/main/java/org/jbpm/integration/console/forms/TaskDispatcherPluginImpl.java
===================================================================
--- jbpm4/trunk/modules/integration/form-plugin/src/main/java/org/jbpm/integration/console/forms/TaskDispatcherPluginImpl.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/integration/form-plugin/src/main/java/org/jbpm/integration/console/forms/TaskDispatcherPluginImpl.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -63,17 +63,17 @@
public URL getDispatchUrl(long taskId)
{
- StringBuffer sb = new StringBuffer();
- sb.append("http://");
- sb.append(getServerConfig().getWebServiceHost());
- sb.append(":").append(getServerConfig().getWebServicePort());
- sb.append("/gwt-console-server/rs/task/");
- sb.append( taskId );
- sb.append("/render");
+ StringBuilder spec = new StringBuilder();
+ spec.append("http://");
+ spec.append(getServerConfig().getWebServiceHost());
+ spec.append(":").append(getServerConfig().getWebServicePort());
+ spec.append("/gwt-console-server/rs/task/");
+ spec.append( taskId );
+ spec.append("/render");
try
{
- return new URL(sb.toString());
+ return new URL(spec.toString());
}
catch (MalformedURLException e)
{
@@ -131,19 +131,19 @@
// plugin context
- StringBuffer sb = new StringBuffer();
- sb.append("http://");
- sb.append(getServerConfig().getWebServiceHost());
- sb.append(":").append(getServerConfig().getWebServicePort());
- sb.append("/gwt-console-server/rs/task/");
- sb.append( taskId );
- sb.append("/process");
+ StringBuilder action = new StringBuilder();
+ action.append("http://");
+ action.append(getServerConfig().getWebServiceHost());
+ action.append(":").append(getServerConfig().getWebServicePort());
+ action.append("/gwt-console-server/rs/task/");
+ action.append( taskId );
+ action.append("/process");
Map<String, Object> renderContext = new HashMap<String,Object>();
// form directive
FormDirective formDirective = new FormDirective();
- formDirective.setAction( sb.toString() );
+ formDirective.setAction( action.toString() );
renderContext.put("form", formDirective);
// outcome directive
Modified: jbpm4/trunk/modules/integration/graphView-plugin/src/main/java/org/jbpm/integration/console/graphView/XmlUtil.java
===================================================================
--- jbpm4/trunk/modules/integration/graphView-plugin/src/main/java/org/jbpm/integration/console/graphView/XmlUtil.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/integration/graphView-plugin/src/main/java/org/jbpm/integration/console/graphView/XmlUtil.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -167,15 +167,13 @@
}
public static String getContentText(Element element) {
- StringBuffer buffer = new StringBuffer();
- NodeList nodeList = element.getChildNodes();
- for (int i=0; i<nodeList.getLength(); i++) {
- Node node = nodeList.item(i);
- if (node instanceof CharacterData) {
- CharacterData characterData = (CharacterData) node;
- buffer.append(characterData.getData());
- }
- }
- return buffer.toString();
+ StringBuilder text = new StringBuilder();
+ for (Node child = element.getFirstChild(); child != null; child = child.getNextSibling()) {
+ if (child instanceof CharacterData) {
+ CharacterData characterData = (CharacterData) child;
+ text.append(characterData.getData());
+ }
+ }
+ return text.toString();
}
}
\ No newline at end of file
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetParticipantsCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetParticipantsCmd.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetParticipantsCmd.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -47,7 +47,7 @@
}
public List<Participation> execute(Environment environment) throws Exception {
- StringBuffer hql = new StringBuffer();
+ StringBuilder hql = new StringBuilder();
hql.append("select role from ");
hql.append(ParticipationImpl.class.getName());
hql.append(" as role where ");
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jms/JmsMessageUtil.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jms/JmsMessageUtil.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jms/JmsMessageUtil.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -39,27 +39,26 @@
private static final Log log = Log.getLog(JmsMessageUtil.class.getName());
public static String dump(Message message) {
+ StringBuilder dump = new StringBuilder();
- StringBuffer sb = new StringBuffer();
+ dump.append("JMS MessageImpl Dump\n").append("MessageImpl type is " + message.getClass().getName() + "\n");
- sb.append("JMS MessageImpl Dump\n").append("MessageImpl type is " + message.getClass().getName() + "\n");
-
try {
if (message instanceof ObjectMessage) {
- sb.append("MessageImpl object type is " + ((ObjectMessage) message).getObject().getClass().getName() + "\n");
+ dump.append("MessageImpl object type is " + ((ObjectMessage) message).getObject().getClass().getName() + "\n");
}
- sb.append("Reply to " + getDestinationName(message.getJMSReplyTo()) + "\n");
- Enumeration e = message.getPropertyNames();
+ dump.append("Reply to " + getDestinationName(message.getJMSReplyTo()) + "\n");
+ Enumeration<?> e = message.getPropertyNames();
while (e.hasMoreElements()) {
String propertyName = (String) e.nextElement();
Object property = message.getObjectProperty(propertyName);
- sb.append("Property " + propertyName + " value " + property.toString() + "\n");
+ dump.append("Property " + propertyName + " value " + property.toString() + "\n");
}
} catch (JMSException j) {
log.error("JMS exception while dumping message", j);
}
- return sb.toString();
+ return dump.toString();
}
public static String getDestinationName(Destination d) {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -153,23 +153,23 @@
}
public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append("timer[");
- buffer.append(dbid);
+ StringBuilder text = new StringBuilder();
+ text.append("timer[");
+ text.append(dbid);
if (dueDate!=null) {
- buffer.append("|");
- buffer.append(formatDueDate(dueDate));
+ text.append("|");
+ text.append(formatDueDate(dueDate));
}
if (signalName!=null) {
- buffer.append("|");
- buffer.append(signalName);
+ text.append("|");
+ text.append(signalName);
}
if (eventName!=null) {
- buffer.append("|");
- buffer.append(eventName);
+ text.append("|");
+ text.append(eventName);
}
- buffer.append("]");
- return buffer.toString();
+ text.append("]");
+ return text.toString();
}
public static String formatDueDate(Date date) {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/AbstractQuery.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/AbstractQuery.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/AbstractQuery.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -96,7 +96,7 @@
return query.list();
}
- protected void appendWhereClause(String whereClause, StringBuffer hql) {
+ protected void appendWhereClause(String whereClause, StringBuilder hql) {
if (isWhereAdded) {
hql.append(" and ");
} else {
@@ -106,7 +106,7 @@
hql.append(whereClause);
}
- protected void appendOrderByClause(StringBuffer hql) {
+ protected void appendOrderByClause(StringBuilder hql) {
if (orderByClause!=null) {
hql.append("order by ");
hql.append(orderByClause);
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryActivityInstanceQueryImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryActivityInstanceQueryImpl.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryActivityInstanceQueryImpl.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -52,7 +52,7 @@
}
public String hql() {
- StringBuffer hql = new StringBuffer();
+ StringBuilder hql = new StringBuilder();
hql.append("select hai ");
hql.append("from ");
hql.append(HistoryActivityInstanceImpl.class.getName());
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryProcessInstanceQueryImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryProcessInstanceQueryImpl.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryProcessInstanceQueryImpl.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -24,13 +24,11 @@
import java.util.List;
import org.hibernate.Query;
-import org.jbpm.api.JbpmException;
import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.history.HistoryProcessInstance;
import org.jbpm.api.history.HistoryProcessInstanceQuery;
import org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl;
-
/**
* @author Tom Baeyens
*/
@@ -47,7 +45,7 @@
}
public String hql() {
- StringBuffer hql = new StringBuffer();
+ StringBuilder hql = new StringBuilder();
hql.append("select hpi ");
hql.append("from ");
hql.append(HistoryProcessInstanceImpl.class.getName());
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/JobQueryImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/JobQueryImpl.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/JobQueryImpl.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -49,7 +49,7 @@
}
public String hql() {
- StringBuffer hql = new StringBuffer();
+ StringBuilder hql = new StringBuilder();
hql.append("select j ");
hql.append("from ");
if (messagesOnly) {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ProcessDefinitionQueryImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ProcessDefinitionQueryImpl.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ProcessDefinitionQueryImpl.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -85,7 +85,7 @@
}
public String hql() {
- StringBuffer hql = new StringBuffer();
+ StringBuilder hql = new StringBuilder();
hql.append("select new map( idProperty.objectName as objectName, " +
"idProperty.deployment.dbid as deploymentDbid ) ");
hql.append("from ");
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ProcessInstanceQueryImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ProcessInstanceQueryImpl.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ProcessInstanceQueryImpl.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -24,13 +24,11 @@
import java.util.List;
import org.hibernate.Query;
-import org.jbpm.api.Execution;
import org.jbpm.api.ProcessInstance;
import org.jbpm.api.ProcessInstanceQuery;
import org.jbpm.api.cmd.CommandService;
import org.jbpm.pvm.internal.model.ExecutionImpl;
-
/**
* @author Tom Baeyens
*/
@@ -55,7 +53,7 @@
}
public String hql() {
- StringBuffer hql = new StringBuffer();
+ StringBuilder hql = new StringBuilder();
hql.append("select processInstance ");
hql.append("from ");
hql.append(ExecutionImpl.class.getName());
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/JuelScriptEngine.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/JuelScriptEngine.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/JuelScriptEngine.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -187,12 +187,12 @@
int numChars;
char[] arr = new char[8192];
- StringBuilder buf = new StringBuilder();
+ StringBuilder text = new StringBuilder();
try
{
while ((numChars = reader.read(arr, 0, arr.length)) > 0)
{
- buf.append(arr, 0, numChars);
+ text.append(arr, 0, numChars);
}
}
@@ -201,7 +201,7 @@
throw new ScriptException(exp);
}
- return buf.toString();
+ return text.toString();
}
private static Method getPrintMethod()
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/JuelScriptEngineFactory.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/JuelScriptEngineFactory.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/JuelScriptEngineFactory.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -99,9 +99,9 @@
public String getOutputStatement(String toDisplay)
{
- StringBuilder buf = new StringBuilder();
+ StringBuilder statement = new StringBuilder();
- buf.append("out:print(\"");
+ statement.append("out:print(\"");
int len = toDisplay.length();
@@ -112,22 +112,22 @@
switch (ch)
{
case '"':
- buf.append("\\\"");
+ statement.append("\\\"");
break;
case '\\':
- buf.append("\\\\");
+ statement.append("\\\\");
break;
default:
- buf.append(ch);
+ statement.append(ch);
}
}
- buf.append("\")");
+ statement.append("\")");
- return buf.toString();
+ return statement.toString();
}
public String getParameter(String key)
@@ -162,22 +162,22 @@
public String getProgram(String[] statements)
{
- StringBuilder buf = new StringBuilder();
+ StringBuilder program = new StringBuilder();
if (statements.length != 0)
{
for (int i = 0; i < statements.length; ++i)
{
- buf.append("${");
+ program.append("${");
- buf.append(statements[i]);
+ program.append(statements[i]);
- buf.append("} ");
+ program.append("} ");
}
}
- return buf.toString();
+ return program.toString();
}
public ScriptEngine getScriptEngine()
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskQueryImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskQueryImpl.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskQueryImpl.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -26,7 +26,6 @@
import org.hibernate.Query;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.ProcessDefinition;
import org.jbpm.api.TaskQuery;
import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
@@ -114,7 +113,7 @@
}
public String hql() {
- StringBuffer hql = new StringBuffer();
+ StringBuilder hql = new StringBuilder();
hql.append("select distinct task ");
hql.append("from ");
hql.append(TaskImpl.class.getName());
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/Type.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/Type.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/Type.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -41,17 +41,17 @@
if (name!=null) {
return name;
}
- StringBuffer buffer = new StringBuffer();
+ StringBuilder text = new StringBuilder();
if (converter!=null) {
- buffer.append(converter.toString());
- buffer.append("-->");
+ text.append(converter.toString());
+ text.append("-->");
}
if (variableClass!=null) {
- buffer.append(ReflectUtil.getUnqualifiedClassName(variableClass));
+ text.append(ReflectUtil.getUnqualifiedClassName(variableClass));
} else {
- buffer.append("undefined");
+ text.append("undefined");
}
- return buffer.toString();
+ return text.toString();
}
public Converter getConverter() {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/DOMWriter.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/DOMWriter.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/DOMWriter.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -578,7 +578,7 @@
/** Normalizes the given string. */
public static String normalize(String s, boolean canonical)
{
- StringBuffer str = new StringBuffer();
+ StringBuilder normal = new StringBuilder();
int len = (s != null) ? s.length() : 0;
for (int i = 0; i < len; i++)
@@ -588,27 +588,27 @@
{
case '<':
{
- str.append("<");
+ normal.append("<");
break;
}
case '>':
{
- str.append(">");
+ normal.append(">");
break;
}
case '&':
{
- str.append("&");
+ normal.append("&");
break;
}
case '"':
{
- str.append(""");
+ normal.append(""");
break;
}
case '\'':
{
- str.append("'");
+ normal.append("'");
break;
}
case '\r':
@@ -616,19 +616,19 @@
{
if (canonical)
{
- str.append("&#");
- str.append(Integer.toString(ch));
- str.append(';');
+ normal.append("&#");
+ normal.append(Integer.toString(ch));
+ normal.append(';');
break;
}
// else, default append char
}
default:
{
- str.append(ch);
+ normal.append(ch);
}
}
}
- return (str.toString());
+ return (normal.toString());
}
}
\ No newline at end of file
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/ReflectUtil.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/ReflectUtil.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/util/ReflectUtil.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -178,15 +178,15 @@
private static String getParameterTypesText(Class<?>[] parameterTypes) {
if (parameterTypes==null) return "";
- StringBuffer parametersTypeText = new StringBuffer();
+ StringBuilder parameterTypesText = new StringBuilder();
for (int i=0; i<parameterTypes.length; i++) {
Class<?> parameterType = parameterTypes[i];
- parametersTypeText.append(parameterType.getName());
+ parameterTypesText.append(parameterType.getName());
if (i!=parameterTypes.length-1) {
- parametersTypeText.append(", ");
+ parameterTypesText.append(", ");
}
}
- return parametersTypeText.toString();
+ return parameterTypesText.toString();
}
public static <T> T newInstance(Class<T> clazz) {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/ProblemImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/ProblemImpl.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/ProblemImpl.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -98,7 +98,7 @@
}
public String toString() {
- StringBuffer text = new StringBuffer();
+ StringBuilder text = new StringBuilder();
text.append(type);
text.append(": ");
text.append(msg);
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/ProblemList.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/ProblemList.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/xml/ProblemList.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -149,7 +149,7 @@
Throwable cause = null;
- StringBuffer errorMsg = new StringBuffer();
+ StringBuilder errorMsg = new StringBuilder();
if (problems!=null) {
if (message!=null) {
errorMsg.append(message);
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/cron/CronExpression.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/cron/CronExpression.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/jobexecutor/cron/CronExpression.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -749,43 +749,43 @@
}
public String getExpressionSummary() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder summary = new StringBuilder();
- buf.append("seconds: ");
- buf.append(getExpressionSetSummary(seconds));
- buf.append("\n");
- buf.append("minutes: ");
- buf.append(getExpressionSetSummary(minutes));
- buf.append("\n");
- buf.append("hours: ");
- buf.append(getExpressionSetSummary(hours));
- buf.append("\n");
- buf.append("daysOfMonth: ");
- buf.append(getExpressionSetSummary(daysOfMonth));
- buf.append("\n");
- buf.append("months: ");
- buf.append(getExpressionSetSummary(months));
- buf.append("\n");
- buf.append("daysOfWeek: ");
- buf.append(getExpressionSetSummary(daysOfWeek));
- buf.append("\n");
- buf.append("lastdayOfWeek: ");
- buf.append(lastdayOfWeek);
- buf.append("\n");
- buf.append("nearestWeekday: ");
- buf.append(nearestWeekday);
- buf.append("\n");
- buf.append("NthDayOfWeek: ");
- buf.append(nthdayOfWeek);
- buf.append("\n");
- buf.append("lastdayOfMonth: ");
- buf.append(lastdayOfMonth);
- buf.append("\n");
- buf.append("years: ");
- buf.append(getExpressionSetSummary(years));
- buf.append("\n");
+ summary.append("seconds: ");
+ summary.append(getExpressionSetSummary(seconds));
+ summary.append("\n");
+ summary.append("minutes: ");
+ summary.append(getExpressionSetSummary(minutes));
+ summary.append("\n");
+ summary.append("hours: ");
+ summary.append(getExpressionSetSummary(hours));
+ summary.append("\n");
+ summary.append("daysOfMonth: ");
+ summary.append(getExpressionSetSummary(daysOfMonth));
+ summary.append("\n");
+ summary.append("months: ");
+ summary.append(getExpressionSetSummary(months));
+ summary.append("\n");
+ summary.append("daysOfWeek: ");
+ summary.append(getExpressionSetSummary(daysOfWeek));
+ summary.append("\n");
+ summary.append("lastdayOfWeek: ");
+ summary.append(lastdayOfWeek);
+ summary.append("\n");
+ summary.append("nearestWeekday: ");
+ summary.append(nearestWeekday);
+ summary.append("\n");
+ summary.append("NthDayOfWeek: ");
+ summary.append(nthdayOfWeek);
+ summary.append("\n");
+ summary.append("lastdayOfMonth: ");
+ summary.append(lastdayOfMonth);
+ summary.append("\n");
+ summary.append("years: ");
+ summary.append(getExpressionSetSummary(years));
+ summary.append("\n");
- return buf.toString();
+ return summary.toString();
}
protected String getExpressionSetSummary(java.util.Set set) {
@@ -797,7 +797,7 @@
return "*";
}
- StringBuffer buf = new StringBuffer();
+ StringBuilder summary = new StringBuilder();
Iterator itr = set.iterator();
boolean first = true;
@@ -805,16 +805,16 @@
Integer iVal = (Integer) itr.next();
String val = iVal.toString();
if (!first) {
- buf.append(",");
+ summary.append(",");
}
- buf.append(val);
+ summary.append(val);
first = false;
}
- return buf.toString();
+ return summary.toString();
}
- protected String getExpressionSetSummary(java.util.ArrayList list) {
+ protected String getExpressionSetSummary(java.util.List list) {
if (list.contains(NO_SPEC)) {
return "?";
@@ -823,7 +823,7 @@
return "*";
}
- StringBuffer buf = new StringBuffer();
+ StringBuilder summary = new StringBuilder();
Iterator itr = list.iterator();
boolean first = true;
@@ -831,13 +831,13 @@
Integer iVal = (Integer) itr.next();
String val = iVal.toString();
if (!first) {
- buf.append(",");
+ summary.append(",");
}
- buf.append(val);
+ summary.append(val);
first = false;
}
- return buf.toString();
+ return summary.toString();
}
protected int skipWhiteSpace(int i, String s) {
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/type/VariableAutoTypeResolutionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/type/VariableAutoTypeResolutionTest.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/type/VariableAutoTypeResolutionTest.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -275,12 +275,11 @@
}
String generateString(String base, int multiplier) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder text = new StringBuilder();
for (int i=0; i<multiplier; i++) {
- buffer.append(base);
+ text.append(base);
}
- String string = buffer.toString();
- return string;
+ return text.toString();
}
byte[] generateBytes(String base, int multiplier) {
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/process/DeploymentResourcesTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/process/DeploymentResourcesTest.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/process/DeploymentResourcesTest.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -85,12 +85,11 @@
}
protected String generateString(String base, int multiplier) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder text = new StringBuilder();
for (int i=0; i<multiplier; i++) {
- buffer.append(base);
+ text.append(base);
}
- String string = buffer.toString();
- return string;
+ return text.toString();
}
public static byte[] readBytes(InputStream inputStream) {
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/variables/VariableBasicTypesTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/variables/VariableBasicTypesTest.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/variables/VariableBasicTypesTest.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -128,11 +128,10 @@
}
protected String generateString(String base, int multiplier) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder text = new StringBuilder();
for (int i=0; i<multiplier; i++) {
- buffer.append(base);
+ text.append(base);
}
- String string = buffer.toString();
- return string;
+ return text.toString();
}
}
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/LoadTestCase.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/LoadTestCase.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/LoadTestCase.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -163,18 +163,18 @@
long seconds = diff / SECOND;
- StringBuffer text = new StringBuffer();
+ StringBuilder duration = new StringBuilder();
if (hours!=0) {
- text.append(hours+"h");
+ duration.append(hours+"h");
}
- text.append(minutes);
- text.append("'");
- text.append(seconds);
- text.append("\"");
+ duration.append(minutes);
+ duration.append("'");
+ duration.append(seconds);
+ duration.append("\"");
// long millis = diff - (seconds * SECOND);
// text.append(","+millis);
- return text.toString();
+ return duration.toString();
}
}
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/GenerateExceptionTestCommand.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/GenerateExceptionTestCommand.java 2009-05-27 08:22:48 UTC (rev 4908)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/GenerateExceptionTestCommand.java 2009-05-27 09:14:59 UTC (rev 4909)
@@ -56,11 +56,11 @@
}
public Object execute(Environment environment) throws Exception {
- StringBuilder stringBuilder = new StringBuilder();
- while (stringBuilder.length() < length) {
- stringBuilder.append("This is a long test message. ");
+ StringBuilder message = new StringBuilder();
+ while (message.length() < length) {
+ message.append("This is a long test message. ");
}
- throw new RuntimeException(stringBuilder.toString());
+ throw new RuntimeException(message.toString());
}
}
15 years
JBoss JBPM SVN: r4908 - jbpm4/branches.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-05-27 04:22:48 -0400 (Wed, 27 May 2009)
New Revision: 4908
Added:
jbpm4/branches/tbaeyens/
Log:
creating tbaeyens branch
Copied: jbpm4/branches/tbaeyens (from rev 4907, jbpm4/trunk)
15 years
JBoss JBPM SVN: r4907 - jbpm4/trunk/modules/api/src/main/java/org/jbpm/api.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-05-27 04:03:11 -0400 (Wed, 27 May 2009)
New Revision: 4907
Modified:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/IdentityService.java
Log:
changed confusing parameter names in identity service: changed groupId to groupName
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/IdentityService.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/IdentityService.java 2009-05-27 08:02:20 UTC (rev 4906)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/IdentityService.java 2009-05-27 08:03:11 UTC (rev 4907)
@@ -53,11 +53,11 @@
/** create a group new group
* @return the generated id for this group. */
- String createGroup(String groupId);
+ String createGroup(String groupName);
/** create a group new group
* @return the generated id for this group. */
- String createGroup(String groupId, String groupType);
+ String createGroup(String groupName, String groupType);
/** create a group new group
* @return the generated id for this group. */
15 years
JBoss JBPM SVN: r4906 - jbpm4/trunk/modules/distro/src/main/files/jboss.
by do-not-reply@jboss.org
Author: jeff.yuchang
Date: 2009-05-27 04:02:20 -0400 (Wed, 27 May 2009)
New Revision: 4906
Modified:
jbpm4/trunk/modules/distro/src/main/files/jboss/build.xml
Log:
* Update the ant build, so that only for idm will fetch the idm library.
Modified: jbpm4/trunk/modules/distro/src/main/files/jboss/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/jboss/build.xml 2009-05-27 07:30:08 UTC (rev 4905)
+++ jbpm4/trunk/modules/distro/src/main/files/jboss/build.xml 2009-05-27 08:02:20 UTC (rev 4906)
@@ -210,7 +210,8 @@
</copy>
</target>
- <target name="internal.install.idm.into.jboss" depends="get.jbossidm" if="jbpm.identity.idm">
+ <target name="internal.install.idm.into.jboss" if="jbpm.identity.idm">
+ <antcall target="get.jbossidm" />
<unzip src="${jbossidm.distro.path}" dest="${jbossidm.home}/.." />
<ant antfile="${jbossidm.home}/jboss/build.xml" target="install.jbossidm.into.jboss">
<property name="jboss.home" value="${jboss.home}" />
15 years