diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2013-10-27 00:27:24 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2013-10-27 00:27:24 +0200 |
| commit | 30cd736670a579985890d8c2dfe363bacbad7568 (patch) | |
| tree | 152b34486ed4a77c6d6a3a49c13b796ae669f512 /src/main/resources | |
| parent | 0f892332b19ba8741a7db66a5c4daa386b2b5c1e (diff) | |
Beta?
Diffstat (limited to 'src/main/resources')
| -rw-r--r-- | src/main/resources/boot/CA/ModuleWorkflow.xml | 2 | ||||
| -rw-r--r-- | src/main/resources/boot/CA/ServerItemWorkflow.xml | 5 | ||||
| -rw-r--r-- | src/main/resources/boot/OD/StateMachine.xsd | 98 | ||||
| -rw-r--r-- | src/main/resources/boot/SM/CompositeActivity.xml | 4 | ||||
| -rw-r--r-- | src/main/resources/boot/SM/Default.xml | 10 | ||||
| -rw-r--r-- | src/main/resources/boot/SM/PredefinedStep.xml | 2 | ||||
| -rw-r--r-- | src/main/resources/boot/allbootitems.txt | 7 | ||||
| -rw-r--r-- | src/main/resources/boot/property/SMProp.xml | 5 | ||||
| -rw-r--r-- | src/main/resources/mapFiles/JobListMap.xml | 2 | ||||
| -rw-r--r-- | src/main/resources/mapFiles/ModuleMap.xml | 6 | ||||
| -rw-r--r-- | src/main/resources/mapFiles/StateMachineMap.xml | 18 |
11 files changed, 82 insertions, 77 deletions
diff --git a/src/main/resources/boot/CA/ModuleWorkflow.xml b/src/main/resources/boot/CA/ModuleWorkflow.xml index 20ce685..1eb3ee4 100644 --- a/src/main/resources/boot/CA/ModuleWorkflow.xml +++ b/src/main/resources/boot/CA/ModuleWorkflow.xml @@ -49,7 +49,7 @@ <OutEdgeId>4</OutEdgeId>
<Properties>
<KeyValuePair Key="Name" String="EditModuleDefinition"/>
- <KeyValuePair Key="Version" String="0"/>
+ <KeyValuePair Key="Version" Integer="0"/>
</Properties>
<activityDef>EditModuleDefinition</activityDef>
</ActivitySlotDef>
diff --git a/src/main/resources/boot/CA/ServerItemWorkflow.xml b/src/main/resources/boot/CA/ServerItemWorkflow.xml index 085f8ab..b27b3cb 100644 --- a/src/main/resources/boot/CA/ServerItemWorkflow.xml +++ b/src/main/resources/boot/CA/ServerItemWorkflow.xml @@ -24,7 +24,6 @@ <OutEdgeId>19</OutEdgeId>
<Properties>
<KeyValuePair Key="LastNum" String="2"/>
- <KeyValuePair Key="RoutingScriptVersion" String=""/>
<KeyValuePair Key="RoutingScriptName" String="javascript:true;"/>
</Properties>
</LoopDef>
@@ -39,7 +38,6 @@ <OutEdgeId>18</OutEdgeId>
<Properties>
<KeyValuePair Key="LastNum" String="2"/>
- <KeyValuePair Key="RoutingScriptVersion" String=""/>
<KeyValuePair Key="RoutingScriptName" String="javascript:true;"/>
</Properties>
</LoopDef>
@@ -78,7 +76,6 @@ <OutEdgeId>10</OutEdgeId>
<OutEdgeId>11</OutEdgeId>
<Properties>
- <KeyValuePair Key="RoutingScriptVersion" String=""/>
<KeyValuePair Key="RoutingScriptName" String=""/>
</Properties>
</AndSplitDef>
@@ -94,6 +91,7 @@ <KeyValuePair Key="Prefill" Boolean="false"/>
<KeyValuePair Key="Prefill Version" String="-1"/>
<KeyValuePair Key="Name" String="CreateNewAgent"/>
+ <KeyValuePair Key="Version" Integer="0"/>
</Properties>
<activityDef>CreateNewAgent</activityDef>
</ActivitySlotDef>
@@ -109,6 +107,7 @@ <KeyValuePair Key="Prefill" Boolean="false"/>
<KeyValuePair Key="Prefill Version" String="-1"/>
<KeyValuePair Key="Name" String="CreateNewItem"/>
+ <KeyValuePair Key="Version" Integer="0"/>
</Properties>
<activityDef>CreateNewItem</activityDef>
</ActivitySlotDef>
diff --git a/src/main/resources/boot/OD/StateMachine.xsd b/src/main/resources/boot/OD/StateMachine.xsd index d59070c..a7f8c04 100644 --- a/src/main/resources/boot/OD/StateMachine.xsd +++ b/src/main/resources/boot/OD/StateMachine.xsd @@ -1,52 +1,54 @@ <?xml version="1.0" encoding="utf-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
- <xs:element name="StateMachine">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="State" maxOccurs="unbounded">
- <xs:complexType>
- <xs:attribute name="id" type="xs:int" use="required"/>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="finished" type="xs:string"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="Transition" maxOccurs="unbounded">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Outcome">
- <xs:complexType>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="version" type="xs:int" use="required"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="Script">
- <xs:complexType>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="version" type="xs:int" use="required"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="id" type="xs:int" use="required"/>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="origin" type="xs:int" use="required"/>
- <xs:attribute name="target" type="xs:int" use="required"/>
- <xs:attribute name="enablingProperty" type="xs:string"/>
- <xs:attribute name="roleOverride" type="xs:string"/>
- <xs:attribute name="reservation">
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="set"/>
- <xs:enumeration value="clear"/>
- <xs:enumeration value="preserve"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="initialState" type="xs:string"/>
- </xs:complexType>
- </xs:element>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified">
+ <xs:element name="StateMachine">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="State" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute name="id" type="xs:int" use="required" />
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="proceeds" type="xs:boolean" />
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Transition" maxOccurs="unbounded" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Outcome" maxOccurs="1" minOccurs="0">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="version" type="xs:string" use="required" />
+ <xs:attribute name="required" type="xs:boolean" use="optional" />
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Script" maxOccurs="1" minOccurs="0">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="version" type="xs:string" use="required" />
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:int" use="required" />
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="origin" type="xs:int" use="required" />
+ <xs:attribute name="target" type="xs:int" use="required" />
+ <xs:attribute name="enablingProperty" type="xs:string" />
+ <xs:attribute name="roleOverride" type="xs:string" />
+ <xs:attribute name="reservation">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="set" />
+ <xs:enumeration value="clear" />
+ <xs:enumeration value="preserve" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="initialState" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
</xs:schema>
diff --git a/src/main/resources/boot/SM/CompositeActivity.xml b/src/main/resources/boot/SM/CompositeActivity.xml index a713c27..2ed5c4d 100644 --- a/src/main/resources/boot/SM/CompositeActivity.xml +++ b/src/main/resources/boot/SM/CompositeActivity.xml @@ -3,8 +3,8 @@ <State id="1" name="Started"/>
<State id="2" name="Finished" proceeds="true"/>
- <Transition id="0" name="Start" origin="0" terminus="1"/>
- <Transition id="1" name="Complete" origin="1" terminus="2"/>
+ <Transition id="0" name="Start" origin="0" target="1"/>
+ <Transition id="1" name="Complete" origin="1" target="2"/>
</StateMachine>
diff --git a/src/main/resources/boot/SM/Default.xml b/src/main/resources/boot/SM/Default.xml index f074926..893bfe8 100644 --- a/src/main/resources/boot/SM/Default.xml +++ b/src/main/resources/boot/SM/Default.xml @@ -4,19 +4,19 @@ <State id="2" name="Finished" proceeds="true"/>
<State id="3" name="Suspended"/>
- <Transition id="0" name="Done" origin="0" terminus="2">
+ <Transition id="0" name="Done" origin="0" target="2">
<Outcome name="${SchemaType}" version="${SchemaVersion}"/>
<Script name="${ScriptName}" version="${ScriptVersion}"/>
</Transition>
- <Transition id="1" name="Start" origin="0" terminus="1" reservation="set"/>
- <Transition id="2" name="Complete" origin="1" terminus="2" reservation="clear">
+ <Transition id="1" name="Start" origin="0" target="1" reservation="set"/>
+ <Transition id="2" name="Complete" origin="1" target="2" reservation="clear">
<Outcome name="${SchemaType}" version="${SchemaVersion}"/>
<Script name="${ScriptName}" version="${ScriptVersion}"/>
</Transition>
- <Transition id="3" name="Suspend" origin="1" terminus="3">
+ <Transition id="3" name="Suspend" origin="1" target="3">
<Outcome name="Errors" version="0"/>
</Transition>
- <Transition id="4" name="Resume" origin="3" terminus="1" roleOverride="Admin" reservation="preserve"/>
+ <Transition id="4" name="Resume" origin="3" target="1" roleOverride="Admin" reservation="preserve"/>
</StateMachine>
diff --git a/src/main/resources/boot/SM/PredefinedStep.xml b/src/main/resources/boot/SM/PredefinedStep.xml index 0cc418a..f62fd09 100644 --- a/src/main/resources/boot/SM/PredefinedStep.xml +++ b/src/main/resources/boot/SM/PredefinedStep.xml @@ -1,6 +1,6 @@ <StateMachine initialState="0">
<State id="0" name="Available"/>
- <Transition id="0" name="Done" origin="0" terminus="0">
+ <Transition id="0" name="Done" origin="0" target="0">
<Outcome name="PredefinedStepOutcome" version="0"/>
</Transition>
</StateMachine>
diff --git a/src/main/resources/boot/allbootitems.txt b/src/main/resources/boot/allbootitems.txt index 4fdcbdc..194eb61 100644 --- a/src/main/resources/boot/allbootitems.txt +++ b/src/main/resources/boot/allbootitems.txt @@ -1,4 +1,6 @@ -
+SM/Default
+SM/PredefinedStep
+SM/CompositeActivity
OD/CompositeActivityDef
OD/ElementaryActivityDef
OD/Module
@@ -10,9 +12,6 @@ OD/Schema OD/Script
OD/Errors
OD/StateMachine
-SM/Default
-SM/PredefinedStep
-SM/CompositeActivity
EA/AssignNewVersionFromLast
EA/EditActivityDef
EA/EditSchema
diff --git a/src/main/resources/boot/property/SMProp.xml b/src/main/resources/boot/property/SMProp.xml new file mode 100644 index 0000000..8581e74 --- /dev/null +++ b/src/main/resources/boot/property/SMProp.xml @@ -0,0 +1,5 @@ +<AllProperties>
+ <PropertyDescription Name="Name" IsClassIdentifier="false" DefaultValue="" IsMutable="false"/>
+ <PropertyDescription Name="Type" IsClassIdentifier="true" DefaultValue="StateMachine" IsMutable="false"/>
+ <PropertyDescription Name="Module" IsClassIdentifier="false" DefaultValue="" IsMutable="false"/>
+</AllProperties>
diff --git a/src/main/resources/mapFiles/JobListMap.xml b/src/main/resources/mapFiles/JobListMap.xml index 84d40ae..d09f7cc 100644 --- a/src/main/resources/mapFiles/JobListMap.xml +++ b/src/main/resources/mapFiles/JobListMap.xml @@ -18,7 +18,7 @@ <bind-xml name="StepPath" node="attribute"/>
</field>
<field name="transition" type="com.c2kernel.lifecycle.instance.stateMachine.Transition" direct="false" get-method="getTransition" set-method="setTransition">
- <bind-xml name="Transition" node="attribute"/>
+ <bind-xml name="Transition" node="element"/>
</field>
<field name="agentName" type="string" direct="false" get-method="getAgentName" set-method="setAgentName">
<bind-xml name="AgentName" node="attribute"/>
diff --git a/src/main/resources/mapFiles/ModuleMap.xml b/src/main/resources/mapFiles/ModuleMap.xml index 541b393..45f6cbe 100644 --- a/src/main/resources/mapFiles/ModuleMap.xml +++ b/src/main/resources/mapFiles/ModuleMap.xml @@ -17,12 +17,12 @@ <field name="imports" direct="true" type="com.c2kernel.process.module.ModuleImports">
<bind-xml name="Imports" node="element" />
</field>
- <field name="config" collection="arraylist" direct="true" type="com.c2kernel.process.module.ModuleConfig">
+ <field name="config" collection="arraylist" direct="true" type="com.c2kernel.process.module.ModuleConfig">
<bind-xml name="Config" node="element" />
</field>
- <field name="scripts" collection="arraylist" direct="true" type="com.c2kernel.process.module.ModuleScript">
+ <field name="scripts" collection="arraylist" direct="true" type="com.c2kernel.process.module.ModuleScript">
<bind-xml name="Script" node="element" />
- </field>
+ </field>
</class>
<class name="com.c2kernel.process.module.ModuleImports">
<map-to xml="Imports"/>
diff --git a/src/main/resources/mapFiles/StateMachineMap.xml b/src/main/resources/mapFiles/StateMachineMap.xml index 53f24e1..023dfb4 100644 --- a/src/main/resources/mapFiles/StateMachineMap.xml +++ b/src/main/resources/mapFiles/StateMachineMap.xml @@ -3,12 +3,12 @@ <class name="com.c2kernel.lifecycle.instance.stateMachine.StateMachine">
<map-to xml="StateMachine" />
<field name="states" type="com.c2kernel.lifecycle.instance.stateMachine.State"
- collection="arraylist" container="false" direct="false">
+ collection="arraylist" direct="false" get-method="getStates" set-method="setStates">
<bind-xml name="State" node="element" />
</field>
<field name="transitions"
type="com.c2kernel.lifecycle.instance.stateMachine.Transition"
- collection="arraylist" container="false" direct="false">
+ collection="arraylist" direct="false">
<bind-xml name="Transition" node="element" />
</field>
<field name="initialStateCode" type="integer">
@@ -16,6 +16,7 @@ </field>
</class>
<class name="com.c2kernel.lifecycle.instance.stateMachine.State">
+ <map-to xml="State"/>
<field name="id" type="integer" direct="false">
<bind-xml name="id" node="attribute" />
</field>
@@ -23,10 +24,11 @@ <bind-xml name="name" node="attribute" />
</field>
<field name="finished" type="boolean" direct="false">
- <bind-xml name="finishedd" node="attribute" />
+ <bind-xml name="proceeds" node="attribute" />
</field>
</class>
<class name="com.c2kernel.lifecycle.instance.stateMachine.Transition">
+ <map-to xml="Transition"/>
<field name="id" type="integer" direct="false">
<bind-xml name="id" node="attribute" />
</field>
@@ -48,18 +50,15 @@ <field name="reservation" type="string" direct="false">
<bind-xml name="reservation" node="attribute" />
</field>
- <field name="outcome"
- type="com.c2kernel.lifecycle.instance.stateMachine.TransitionOutcome"
- direct="false" container="false">
+ <field name="outcome" type="com.c2kernel.lifecycle.instance.stateMachine.TransitionOutcome" direct="false">
<bind-xml name="Outcome" node="element" />
</field>
- <field name="script"
- type="com.c2kernel.lifecycle.instance.stateMachine.TransitionScript"
- direct="false" container="false">
+ <field name="script" type="com.c2kernel.lifecycle.instance.stateMachine.TransitionScript" direct="false">
<bind-xml name="Script" node="element" />
</field>
</class>
<class name="com.c2kernel.lifecycle.instance.stateMachine.TransitionOutcome">
+ <map-to xml="Outcome"/>
<field name="schemaName" type="string" direct="false">
<bind-xml name="name" node="attribute" />
</field>
@@ -71,6 +70,7 @@ </field>
</class>
<class name="com.c2kernel.lifecycle.instance.stateMachine.TransitionScript">
+ <map-to xml="Script"/>
<field name="scriptName" type="string" direct="false">
<bind-xml name="name" node="attribute" />
</field>
|
