You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hise-commits@incubator.apache.org by rr...@apache.org on 2010/08/30 07:40:16 UTC
svn commit: r990713 - in /incubator/hise/trunk:
hise-services/src/main/java/org/apache/hise/engine/jaxws/
hise-services/src/main/java/org/apache/hise/engine/store/
hise-test-example-osgi/src/main/resources/
Author: rr
Date: Mon Aug 30 07:40:16 2010
New Revision: 990713
URL: http://svn.apache.org/viewvc?rev=990713&view=rev
Log:
HISE-83: Improve definition of tasks for the tests integration and examples. They should be consistent with the schema. (Thanks to Michał Więcław)
Modified:
incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsBaseImpl.java
incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/HumanInteractionsCompiler.java
incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml
Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsBaseImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsBaseImpl.java?rev=990713&r1=990712&r2=990713&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsBaseImpl.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsBaseImpl.java Mon Aug 30 07:40:16 2010
@@ -1014,7 +1014,7 @@ public abstract class TaskOperationsBase
}
private Element convertRendering(TRendering rendering, Task task) {
- Node rend = DOMUtil.getFirstChildElement(rendering.getDomNode(),"expression");
+ Node rend = DOMUtil.getFirstChildElement(rendering.getDomNode());
TaskEvaluator evaluator = task.getTaskEvaluator();
String expression = DOMUtil.getChildText(rend);
Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/HumanInteractionsCompiler.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/HumanInteractionsCompiler.java?rev=990713&r1=990712&r2=990713&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/HumanInteractionsCompiler.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/HumanInteractionsCompiler.java Mon Aug 30 07:40:16 2010
@@ -40,6 +40,7 @@ import org.apache.hise.lang.xsd.htd.TImp
import org.apache.hise.lang.xsd.htd.TNotification;
import org.apache.hise.lang.xsd.htd.TTask;
import org.apache.hise.lang.xsd.htd.TTaskInterface;
+import org.apache.xmlbeans.impl.regex.ParseException;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.w3c.dom.Document;
@@ -70,8 +71,12 @@ public class HumanInteractionsCompiler {
private HumanInteractions compile2(Resource resource) throws Exception {
Validate.notNull(resource);
+
THumanInteractions hiDoc = HumanInteractionsDocument.Factory.parse(resource.getInputStream()).getHumanInteractions();
-
+ if(!hiDoc.validate()){
+ throw new ParseException("Human Interactions definition incompatible with the schema definition: hise-wsdl/src/main/resources/ws-humantask.xsd", 0);
+ }
+
Set<Definition> definitions = new HashSet<Definition>();
for (TImport tImport : hiDoc.getImportList()) {
Modified: incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml?rev=990713&r1=990712&r2=990713&view=diff
==============================================================================
--- incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml (original)
+++ incubator/hise/trunk/hise-test-example-osgi/src/main/resources/testHtd1.xml Mon Aug 30 07:40:16 2010
@@ -12,7 +12,7 @@ Business Machines Corporation, Oracle In
xmlns:tns="http://www.insurance.example.com/claims"
xmlns:cla="http://www.insurance.example.com/claims"
targetNamespace="http://www.insurance.example.com/claims"
- xsi:schemaLocation="http://www.example.org/WS-HT file:/usr/share/schemas/ws-humantask.xsd">
+ xsi:schemaLocation="http://www.example.org/WS-HT file:/home/touk/workspace/hise/trunk/hise-wsdl/src/main/resources/ws-humantask.xsd">
<!--
Test human task definition. Contains: task definitions, different human roles definitions,
@@ -142,21 +142,21 @@ Business Machines Corporation, Oracle In
<htd:renderings>
<htd:rendering type="NSW">
- <expression>
+ <tst:expression xmlns:tst="http://www.example.org/WS-HT/rendering">
<![CDATA[
<example name="anyname" xmlns:cla="http://www.insurance.example.com/claims">
<param name="type" value="{htd:getInput("ClaimApprovalRequest")/cla:cust/cla:firstname/text()}"/>
</example>
]]>
- </expression>
+ </tst:expression>
</htd:rendering>
<htd:rendering type="simpleText">
- <expression>
+ <tst:expression xmlns:tst="http://www.example.org/WS-HT/rendering">
<![CDATA[
"test_expression"
]]>
- </expression>
+ </tst:expression>
</htd:rendering>
</htd:renderings>
@@ -269,23 +269,23 @@ Business Machines Corporation, Oracle In
<htd:from>
<htd:literal>
<htd:organizationalEntity>
- <htd:groups>
- <htd:group>group1</htd:group>
- <htd:group>group2</htd:group>
- </htd:groups>
+ <htd:users>
+ <htd:user>user1</htd:user>
+ <htd:user>user2</htd:user>
+ </htd:users>
</htd:organizationalEntity>
</htd:literal>
</htd:from>
</htd:businessAdministrators>
-
+
<htd:businessAdministrators>
<htd:from>
<htd:literal>
<htd:organizationalEntity>
- <htd:users>
- <htd:user>user1</htd:user>
- <htd:user>user2</htd:user>
- </htd:users>
+ <htd:groups>
+ <htd:group>group1</htd:group>
+ <htd:group>group2</htd:group>
+ </htd:groups>
</htd:organizationalEntity>
</htd:literal>
</htd:from>
@@ -313,7 +313,7 @@ Business Machines Corporation, Oracle In
</htd:peopleAssignments>
- <htd:delegation potentialDelegatees="abody"/>
+ <htd:delegation potentialDelegatees="anybody"/>
<htd:presentationElements>
@@ -850,21 +850,21 @@ Business Machines Corporation, Oracle In
<htd:renderings>
<htd:rendering type="NSW">
- <expression>
+ <tst:expression xmlns:tst="http://www.example.org/WS-HT/rendering">
<![CDATA[
<example name="anyname" xmlns:cla="http://www.insurance.example.com/claims">
<param name="type" value="{htd:getInput("ClaimApprovalRequest")/cla:cust/cla:firstname/text()}"/>
</example>
]]>
- </expression>
+ </tst:expression>
</htd:rendering>
<htd:rendering type="simpleText">
- <expression>
+ <tst:expression xmlns:tst="http://www.example.org/WS-HT/rendering">
<![CDATA[
"test_expression"
]]>
- </expression>
+ </tst:expression>
</htd:rendering>
</htd:renderings>
@@ -1240,21 +1240,21 @@ Business Machines Corporation, Oracle In
<htd:renderings>
<htd:rendering type="NSW">
- <expression>
+ <tst:expression xmlns:tst="http://www.example.org/WS-HT/rendering">
<![CDATA[
<example name="anyname" xmlns:cla="http://www.insurance.example.com/claims">
<param name="type" value="{htd:getInput("ClaimApprovalRequest")/cla:cust/cla:firstname/text()}"/>
</example>
]]>
- </expression>
+ </tst:expression>
</htd:rendering>
<htd:rendering type="simpleText">
- <expression>
+ <tst:expression xmlns:tst="http://www.example.org/WS-HT/rendering">
<![CDATA[
"test_expression"
]]>
- </expression>
+ </tst:expression>
</htd:rendering>
</htd:renderings>
@@ -1476,7 +1476,7 @@ Business Machines Corporation, Oracle In
<htd:completionDeadline>
<htd:until>'2013-02-01'</htd:until>
- <htd:escalation name="example until complet by">
+ <htd:escalation name="example_until_complet_by">
<htd:reassignment>
<htd:potentialOwners>
<htd:from>