well, I was reviewing but I'm still have the same problem than before.
It's related with the sgExpression element, child of process definition. Due that you only support one sgExpression, process definitions that for example have <set> ...</set><sequence>...</sequence>
only can have one sgExpression and then I can have several expressions, the problem only arise in the first level.
So my suggestion is that the element process-definition/sgExpression should be unbounded (1..OO) in order to avoid that kind of problem.
The other thing is that in the process definition you can also create a workitem "on the fly", meaning that you could use set, in order to set fields, smap, map, list, etc. The actual schema doesn't support that, even the engine does.
Regarding the sgDefinition, I don't see why is necessary having duplicated. Anyway if you are looking to have the posibility to have before and after the sgExpression section, maybe you should use a choice instead a sequence, because in the choice
So, let me send the file and tell me if you disagree ....
>From tomorrow I will be one week out of work, I'm travelling to Cuba, so probably I will be not available ....
regards, Romina
2005/11/9, John Mettraux <[EMAIL PROTECTED]>:
Hi Romina,
I've just uploaded a new schema (http://www.openwfe.org/flowdef_r1.6.1.xsd) for process definitions, trying to address your concerns about it ( http://sourceforge.net/tracker/index.php?func=detail&aid=1337115&group_id=54621&atid=474244).
Could you please tell me if it meets your needs ?
Thanks in advance,
--
john.mettraux @ openwfe.org -///- http://www.openwfe.org
--
Saludos, Romina
<?xml version="1.0"?> <!-- edited with XMLSpy v2006 U (http://www.altova.com) by rtorres (rtorres) --> <!--
flowdef_r1.6.1.xsd http://www.openwfe.org/flowdef_r1.6.1.xsd $Id: flowdef_r1.6.1.xsd,v 1.3 2005/10/30 21:33:59 jmettraux Exp $ to be used with OpenWFE 1.6.1 at least --> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <!-- substitution groups --> <xsd:element name="sgDefinition"/> <xsd:element name="sgExpression"> <xsd:annotation> <xsd:documentation>romina comments: it should be unbounded</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="sgConditional"/> <!-- "process-definition" or "define" --> <xsd:element name="process-definition" type="tDefine" substitutionGroup="sgDefinition"/> <xsd:element name="define" type="tDefine" substitutionGroup="sgDefinition"/> <xsd:complexType name="tDefine"> <xsd:sequence> <!-- description of the flow --> <xsd:element name="description" minOccurs="0" maxOccurs="unbounded"> <xsd:complexType> <xsd:simpleContent> <xsd:extension base="xsd:string"> <xsd:attribute name="language" type="xsd:string" default="default"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> </xsd:element> <!-- subprocess definitions and filters (before) --> <xsd:element ref="sgDefinition" minOccurs="0" maxOccurs="unbounded"/> <!-- body of the flow --> <xsd:element ref="sgExpression" maxOccurs="unbounded"/> <!-- subprocess definitions and filters (after) --> <xsd:element ref="sgDefinition" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required"/> <xsd:attribute name="revision" type="xsd:string"/> <!-- xsd:attributes of 'process-definition' --> </xsd:complexType> <!-- filters --> <xsd:element name="filter-definition" substitutionGroup="sgDefinition"> <xsd:complexType> <xsd:sequence> <xsd:element name="field" minOccurs="0" maxOccurs="unbounded"> <xsd:complexType> <xsd:attribute name="regex" type="xsd:string" use="required"/> <xsd:attribute name="permissions" type="xsd:string" use="required"/> </xsd:complexType> </xsd:element> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required"/> <xsd:attribute name="type" type="xsd:string" use="required"/> <xsd:attribute name="add" type="xsd:boolean" use="required"/> <xsd:attribute name="remove" type="xsd:boolean" use="required"/> </xsd:complexType> </xsd:element> <!-- EXPRESSIONS --> <xsd:element name="sequence" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:sequence> <xsd:element ref="sgExpression" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="concurrence" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:sequence> <xsd:element ref="sgExpression" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="sync" type="xsd:string"/> <xsd:attribute name="count" type="xsd:string"/> <xsd:attribute name="merge" type="syncMerge"/> <xsd:attribute name="merge-type" type="syncMergeType"/> <xsd:attribute name="remaining" type="syncRemaining"/> <!--<xsd:attribute name="count" type="xsd:nonNegativeInteger" />--> </xsd:complexType> </xsd:element> <xsd:element name="iterator" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:sequence> <xsd:element ref="sgExpression" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="on-value" type="xsd:string"/> <xsd:attribute name="on-field-value" type="xsd:string"/> <xsd:attribute name="on-variable-value" type="xsd:string"/> <xsd:attribute name="to-field" type="xsd:string"/> <xsd:attribute name="to-variable" type="xsd:string"/> <xsd:attribute name="valueSeparator" type="xsd:string" default=", *"/> </xsd:complexType> </xsd:element> <xsd:element name="concurrent-iterator" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:sequence> <xsd:element ref="sgExpression" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="on-value" type="xsd:string"/> <xsd:attribute name="on-field-value" type="xsd:string"/> <xsd:attribute name="on-variable-value" type="xsd:string"/> <xsd:attribute name="to-field" type="xsd:string"/> <xsd:attribute name="to-variable" type="xsd:string"/> <xsd:attribute name="valueSeparator" type="xsd:string" default=", *"/> <xsd:attribute name="sync" type="xsd:string"/> <xsd:attribute name="count" type="xsd:string"/> <xsd:attribute name="merge" type="syncMerge"/> <xsd:attribute name="merge-type" type="syncMergeType"/> <xsd:attribute name="remaining" type="syncRemaining"/> <!-- also a sync for the concurrent-iterator --> <!--<xsd:attribute name="count" type="xsd:nonNegativeInteger" />--> </xsd:complexType> </xsd:element> <xsd:element name="participant" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:attribute name="ref" type="xsd:string" use="required"/> <xsd:attribute name="field-ref" type="xsd:string"/> <xsd:attribute name="variable-ref" type="xsd:string"/> <xsd:attribute name="default-ref" type="xsd:string"/> <xsd:attribute name="filter" type="xsd:string"/> <xsd:attribute name="timeout" type="xsd:string"/> <xsd:attribute name="description" type="xsd:string"/> <xsd:attribute name="forget" type="xsd:boolean"/> </xsd:complexType> </xsd:element> <xsd:element name="set" substitutionGroup="sgExpression"> <xsd:annotation> <xsd:documentation>romina comments: added the workitem schema</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="smap" type="smapType"/> </xsd:sequence> <xsd:attribute name="field" type="xsd:string"/> <xsd:attribute name="variable" type="xsd:string"/> <xsd:attribute name="value" type="xsd:string"/> <xsd:attribute name="field-value" type="xsd:string"/> <xsd:attribute name="variable-value" type="xsd:string"/> <xsd:attribute name="function-value" type="xsd:string"/> <xsd:attribute name="override" type="xsd:boolean" default="true"/> <xsd:attribute name="type" type="xsd:string"/> </xsd:complexType> </xsd:element> <xsd:complexType name="valueType"> <xsd:choice> <xsd:element name="string" type="xsd:string"/> <xsd:element name="integer" type="xsd:integer"/> <xsd:element name="long" type="xsd:long"/> <xsd:element name="boolean" type="xsd:boolean"/> <xsd:element name="double" type="xsd:double"/> <xsd:element name="list" type="listValueType"/> <xsd:element name="smap" type="smapType"/> <xsd:element name="map" type="mapType"/> </xsd:choice> </xsd:complexType> <xsd:complexType name="listValueType"> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:element name="string" type="xsd:string"/> <xsd:element name="integer" type="xsd:integer"/> <xsd:element name="long" type="xsd:long"/> <xsd:element name="boolean" type="xsd:boolean"/> <xsd:element name="double" type="xsd:double"/> <xsd:element name="list" type="listValueType"/> <xsd:element name="smap" type="smapType"/> <xsd:element name="map" type="mapType"/> </xsd:choice> </xsd:complexType> <xsd:complexType name="smapType"> <xsd:sequence> <xsd:element name="entry" type="entrySmapType" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="keySmapType"> <xsd:sequence> <xsd:element name="string" type="xsd:string"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="entrySmapType"> <xsd:sequence> <xsd:element name="key" type="keySmapType"/> <xsd:element name="value" type="valueType"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="mapType"> <xsd:sequence> <xsd:element name="entry" type="entryMapType" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="entryMapType"> <xsd:sequence> <xsd:element name="key" type="valueType"/> <xsd:element name="value" type="valueType"/> </xsd:sequence> </xsd:complexType> <xsd:element name="unset" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:attribute name="field" type="xsd:string"/> <xsd:attribute name="variable" type="xsd:string"/> </xsd:complexType> </xsd:element> <xsd:element name="include" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:attribute name="url" type="xsd:string"/> </xsd:complexType> </xsd:element> <xsd:element name="sleep" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:attribute name="for" type="xsd:string"/> <xsd:attribute name="until" type="xsd:string"/> </xsd:complexType> </xsd:element> <xsd:element name="save" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:attribute name="to-variable" type="xsd:string"/> </xsd:complexType> </xsd:element> <xsd:element name="restore" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:attribute name="from-variable" type="xsd:string"/> <xsd:attribute name="merge-lead" type="xsd:string"/> <xsd:attribute name="to-field" type="xsd:string"/> </xsd:complexType> </xsd:element> <xsd:element name="inc" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:attribute name="field" type="xsd:string"/> <xsd:attribute name="variable" type="xsd:string"/> <xsd:attribute name="value" type="xsd:string"/> <xsd:attribute name="field-value" type="xsd:string"/> <xsd:attribute name="variable-value" type="xsd:string"/> </xsd:complexType> </xsd:element> <xsd:element name="subprocess" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:sequence> <xsd:element name="set" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="ref" type="xsd:string"/> <xsd:attribute name="field-ref" type="xsd:string"/> <xsd:attribute name="variable-ref" type="xsd:string"/> <xsd:attribute name="forget" type="xsd:boolean"/> </xsd:complexType> </xsd:element> <xsd:element name="if" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:sequence> <!-- the conditional --> <xsd:element ref="sgConditional" minOccurs="0"/> <!-- 'then' and perhaps 'else' --> <xsd:element ref="sgExpression" maxOccurs="2"/> </xsd:sequence> <xsd:attribute name="test" type="xsd:string"/> <!-- if test is set, then there should be no conditional --> </xsd:complexType> </xsd:element> <xsd:element name="when" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:sequence> <!-- the conditional --> <xsd:element ref="sgConditional"/> <!-- 'then' and no 'else' --> <xsd:element ref="sgExpression"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="cron" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:sequence> <xsd:element ref="sgExpression"/> </xsd:sequence> <xsd:attribute name="tab" type="xsd:string" use="required"/> <xsd:attribute name="level" type="cronLevelType"/> </xsd:complexType> </xsd:element> <xsd:simpleType name="cronLevelType"> <xsd:restriction base="xsd:string"> <xsd:enumeration value=""/> <xsd:enumeration value="/"/> <xsd:enumeration value="//"/> </xsd:restriction> </xsd:simpleType> <xsd:element name="log" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:attribute name="message" type="xsd:string"/> <xsd:attribute name="level" type="logLevelType"/> <xsd:attribute name="engine-level" type="xsd:boolean"/> </xsd:complexType> </xsd:element> <xsd:simpleType name="logLevelType"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="debug"/> <xsd:enumeration value="info"/> <xsd:enumeration value="warn"/> </xsd:restriction> </xsd:simpleType> <xsd:element name="do" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:sequence> <xsd:element ref="sgExpression"/> </xsd:sequence> <xsd:attribute name="name" type="xsd:string"/> </xsd:complexType> </xsd:element> <xsd:element name="undo" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:attribute name="ref" type="xsd:string"/> </xsd:complexType> </xsd:element> <xsd:element name="redo" substitutionGroup="sgExpression"> <xsd:complexType> <xsd:attribute name="ref" type="xsd:string"/> </xsd:complexType> </xsd:element> <!-- <xsd:element name="break" substitutionGroup="sgExpression" > <xsd:complexType> <xsd:attribute name="ref" type="xsd:string" /> </xsd:complexType> </xsd:element> --> <!-- conditionals --> <xsd:element name="not" substitutionGroup="sgConditional"> <xsd:complexType> <xsd:sequence> <xsd:element ref="sgConditional"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="and" substitutionGroup="sgConditional"> <xsd:complexType> <xsd:sequence> <xsd:element ref="sgConditional" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="or" substitutionGroup="sgConditional"> <xsd:complexType> <xsd:sequence> <xsd:element ref="sgConditional" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="equals" substitutionGroup="sgConditional"> <xsd:complexType> <xsd:attribute name="value" type="xsd:string"/> <xsd:attribute name="field-value" type="xsd:string"/> <xsd:attribute name="variable-value" type="xsd:string"/> <xsd:attribute name="other-value" type="xsd:string"/> <xsd:attribute name="other-field-value" type="xsd:string"/> <xsd:attribute name="other-variable-value" type="xsd:string"/> </xsd:complexType> </xsd:element> <xsd:element name="greater-than" substitutionGroup="sgConditional"> <xsd:complexType> <xsd:attribute name="value" type="xsd:string"/> <xsd:attribute name="field-value" type="xsd:string"/> <xsd:attribute name="variable-value" type="xsd:string"/> <xsd:attribute name="other-value" type="xsd:string"/> <xsd:attribute name="other-field-value" type="xsd:string"/> <xsd:attribute name="other-variable-value" type="xsd:string"/> <xsd:attribute name="equals" type="xsd:string"/> </xsd:complexType> </xsd:element> <xsd:element name="lesser-than" substitutionGroup="sgConditional"> <xsd:complexType> <xsd:attribute name="value" type="xsd:string"/> <xsd:attribute name="field-value" type="xsd:string"/> <xsd:attribute name="variable-value" type="xsd:string"/> <xsd:attribute name="other-value" type="xsd:string"/> <xsd:attribute name="other-field-value" type="xsd:string"/> <xsd:attribute name="other-variable-value" type="xsd:string"/> <xsd:attribute name="equals" type="xsd:string"/> </xsd:complexType> </xsd:element> <xsd:element name="undefined" substitutionGroup="sgConditional"> <xsd:complexType> <xsd:attribute name="value" type="xsd:string"/> <xsd:attribute name="field-value" type="xsd:string"/> <xsd:attribute name="variable-value" type="xsd:string"/> </xsd:complexType> </xsd:element> <!-- sync stuff --> <!-- <xsd:simpleType name="syncExpressionType"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="first-wins" /> <xsd:enumeration value="last-wins" /> <xsd:enumeration value="highest-wins" /> <xsd:enumeration value="first-merge" /> <xsd:enumeration value="last-merge" /> <xsd:enumeration value="deferred-choice" /> </xsd:restriction> </xsd:simpleType> --> <xsd:simpleType name="syncMerge"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="first"/> <xsd:enumeration value="last"/> <xsd:enumeration value="highest"/> <xsd:enumeration value="lowest"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="syncMergeType"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="mix"/> <xsd:enumeration value="override"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="syncRemaining"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="cancel"/> <xsd:enumeration value="forget"/> </xsd:restriction> </xsd:simpleType> </xsd:schema>
