You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airavata.apache.org by Shameera Rathnayaka <sh...@gmail.com> on 2013/07/21 06:59:04 UTC

Workflow Execution context XSD Optional Elements are not correctly defined

Hi devs,

I noticed that in workflow_execution_context.xsd[1] , some elements have
been mentinoed as optional in documentation tag but it is not define in
element(There should be minOccour=0 ), and some elements have been
mentioned as optional but it is not define. Please see below examples.
e.g:   documentation tag say it is optional but element define as
required(minOccurs="1")

<element name="workflow-instance-id" type="anyURI" minOccurs="1"maxOccurs="1">
                    <annotation>
                        <documentation xml:lang="en"> URI that identifies
                            workflow instance that
                            originated the message. (optional)
                        </documentation>
                    </annotation>
                </element>

documentation tag says it is optional but element define as required(
default value for minOccurs is 1)

<element name="workflow-template-id" type="anyURI">
                    <annotation>
                        <documentation xml:lang="en"> URI that identifies
                            workflow template that was
                            used to create the workflow
                            instance.
                            (optional)
                        </documentation>
                    </annotation>
                </element>

I think this is a bug in XSD. As i am on process of writing a new JSON
schema for this, it would be great if i can know what is optional and what
is required
.
Then I can fix this in both.

[1]
https://svn.apache.org/repos/asf/airavata/trunk/modules/commons/workflow-execution-context/src/main/resources/workflow_execution_context.xsd


T
hanks,
Shameera.


-- 
Best Regards,
Shameera Rathnayaka.

email: shameera AT apache.org , shameerainfo AT gmail.com
Blog : http://shameerarathnayaka.blogspot.com/

Re: Workflow Execution context XSD Optional Elements are not correctly defined

Posted by Shameera Rathnayaka <sh...@gmail.com>.
Hi Suresh,

Then i will remove that optional part from documentation for these two. BTW
there are few other elements which has the same issue. Is it ok if i remove
optional tag from documentation where element doesn't has minOccur="0" ?

Thanks,
Shameera.


On Sun, Jul 21, 2013 at 7:01 PM, Suresh Marru <sm...@apache.org> wrote:

> Hi Shameera,
>
> The documentation is wrong, the option should be removed for both. Both
> template and instance should be minOccurs="1" maxOccurs="1".
>
> Suresh
>
> On Jul 21, 2013, at 12:59 AM, Shameera Rathnayaka <sh...@gmail.com>
> wrote:
>
> > Hi devs,
> >
> > I noticed that in workflow_execution_context.xsd[1] , some elements have
> been mentinoed as optional in documentation tag but it is not define in
> element(There should be minOccour=0 ), and some elements have been
> mentioned as optional but it is not define. Please see below examples.
> > e.g:   documentation tag say it is optional but element define as
> required(minOccurs="1")
> >
> > <element name="workflow-instance-id" type="anyURI" minOccurs="1"
> maxOccurs="1">
> >                     <annotation>
> >                         <documentation xml:lang="en"> URI that identifies
> >                             workflow instance that
> >                             originated the message. (optional)
> >                         </documentation>
> >                     </annotation>
> >                 </element>
> >
> > documentation tag says it is optional but element define as required(
> default value for minOccurs is 1)
> >
> > <element name="workflow-template-id" type="anyURI">
> >                     <annotation>
> >                         <documentation xml:lang="en"> URI that identifies
> >                             workflow template that was
> >                             used to create the workflow
> >                             instance.
> >                             (optional)
> >                         </documentation>
> >                     </annotation>
> >                 </element>
> >
> > I think this is a bug in XSD. As i am on process of writing a new JSON
> schema for this, it would be great if i can know what is optional and what
> is required . Then I can fix this in both.
> >
> > [1]
> https://svn.apache.org/repos/asf/airavata/trunk/modules/commons/workflow-execution-context/src/main/resources/workflow_execution_context.xsd
> >
> >
> > Thanks,
> > Shameera.
> >
> > --
> > Best Regards,
> > Shameera Rathnayaka.
> >
> > email: shameera AT apache.org , shameerainfo AT gmail.com
> > Blog : http://shameerarathnayaka.blogspot.com/
>
>


-- 
Best Regards,
Shameera Rathnayaka.

email: shameera AT apache.org , shameerainfo AT gmail.com
Blog : http://shameerarathnayaka.blogspot.com/

Re: Workflow Execution context XSD Optional Elements are not correctly defined

Posted by Suresh Marru <sm...@apache.org>.
Hi Shameera,

The documentation is wrong, the option should be removed for both. Both template and instance should be minOccurs="1" maxOccurs="1".

Suresh

On Jul 21, 2013, at 12:59 AM, Shameera Rathnayaka <sh...@gmail.com> wrote:

> Hi devs, 
> 
> I noticed that in workflow_execution_context.xsd[1] , some elements have been mentinoed as optional in documentation tag but it is not define in element(There should be minOccour=0 ), and some elements have been mentioned as optional but it is not define. Please see below examples.  
> e.g:   documentation tag say it is optional but element define as required(minOccurs="1")
> 
> <element name="workflow-instance-id" type="anyURI" minOccurs="1" maxOccurs="1">
>                     <annotation>
>                         <documentation xml:lang="en"> URI that identifies
>                             workflow instance that
>                             originated the message. (optional)
>                         </documentation>
>                     </annotation>
>                 </element>
> 
> documentation tag says it is optional but element define as required( default value for minOccurs is 1) 
> 
> <element name="workflow-template-id" type="anyURI">
>                     <annotation>
>                         <documentation xml:lang="en"> URI that identifies
>                             workflow template that was
>                             used to create the workflow
>                             instance.
>                             (optional)
>                         </documentation>
>                     </annotation>
>                 </element>
> 
> I think this is a bug in XSD. As i am on process of writing a new JSON schema for this, it would be great if i can know what is optional and what is required . Then I can fix this in both. 
> 
> [1] https://svn.apache.org/repos/asf/airavata/trunk/modules/commons/workflow-execution-context/src/main/resources/workflow_execution_context.xsd
> 
> 
> Thanks, 
> Shameera.
> 
> -- 
> Best Regards,
> Shameera Rathnayaka.
> 
> email: shameera AT apache.org , shameerainfo AT gmail.com
> Blog : http://shameerarathnayaka.blogspot.com/