ServiceGroup - service-group.xsd

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ServiceGroup - service-group.xsd

Andrew Zeneski
Service group model is changing. Previous:

<service-group>
        <group name="name">
                <service name="serviceToRun"/>
        </group>
</service-group>

new:

<service-group>
        <group name="name">
                <invoke name="serviceToRun"/>
        </group>
</service-group>

All files in apache-ofbiz which reference the old way will be changed  
when the implementation is complete. This is a heads up for those  
with custom apps, you will need to replace "service" with "invoke".

In addition, the new implementation will allow embedding group  
definition right inside the service definition. What a pain in the  
rear is it to have to edit two files just to call a group of services  
in order. The files will remain (at least for now) with the added  
support to embed your group defs inside a service.

<service name="foo" engine="group">
        <group>
                <invoke="service1"/>
                <invoke="service2"/>
        </group>
</service>

Andrew Zeneski
[hidden email]




smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ServiceGroup - service-group.xsd

David E Jones-2

Andrew,

With this change it would be great to follow the pattern used  
elsewhere so that the parsing code still accepts the old element  
name, which will obviously only work for the group definitions in the  
service-group file as the "service" element name would conflict in  
the services XML files.

-David


On Jan 5, 2007, at 10:16 AM, Andrew Zeneski wrote:

> Service group model is changing. Previous:
>
> <service-group>
> <group name="name">
> <service name="serviceToRun"/>
> </group>
> </service-group>
>
> new:
>
> <service-group>
> <group name="name">
> <invoke name="serviceToRun"/>
> </group>
> </service-group>
>
> All files in apache-ofbiz which reference the old way will be  
> changed when the implementation is complete. This is a heads up for  
> those with custom apps, you will need to replace "service" with  
> "invoke".
>
> In addition, the new implementation will allow embedding group  
> definition right inside the service definition. What a pain in the  
> rear is it to have to edit two files just to call a group of  
> services in order. The files will remain (at least for now) with  
> the added support to embed your group defs inside a service.
>
> <service name="foo" engine="group">
> <group>
> <invoke="service1"/>
> <invoke="service2"/>
> </group>
> </service>
>
> Andrew Zeneski
> [hidden email]
>
>
>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ServiceGroup - service-group.xsd

Andrew Zeneski
I didn't want to change the name, the only reason for this was the  
conflict w/ the element 'service' in services.xsd. Do you know a way  
to make the element in service-groups.xsd not propagate when the xsd  
is included in services.xsd?

Regardless, the code which parses this also accepts the 'service' tag  
and write a warning message. It appears that it works even though the  
XSD doesn't allow it so I think this follows the same pattern you  
described.

Andrew

On Jan 5, 2007, at 1:31 PM, David E Jones wrote:

>
> Andrew,
>
> With this change it would be great to follow the pattern used  
> elsewhere so that the parsing code still accepts the old element  
> name, which will obviously only work for the group definitions in  
> the service-group file as the "service" element name would conflict  
> in the services XML files.
>
> -David
>
>
> On Jan 5, 2007, at 10:16 AM, Andrew Zeneski wrote:
>
>> Service group model is changing. Previous:
>>
>> <service-group>
>> <group name="name">
>> <service name="serviceToRun"/>
>> </group>
>> </service-group>
>>
>> new:
>>
>> <service-group>
>> <group name="name">
>> <invoke name="serviceToRun"/>
>> </group>
>> </service-group>
>>
>> All files in apache-ofbiz which reference the old way will be  
>> changed when the implementation is complete. This is a heads up  
>> for those with custom apps, you will need to replace "service"  
>> with "invoke".
>>
>> In addition, the new implementation will allow embedding group  
>> definition right inside the service definition. What a pain in the  
>> rear is it to have to edit two files just to call a group of  
>> services in order. The files will remain (at least for now) with  
>> the added support to embed your group defs inside a service.
>>
>> <service name="foo" engine="group">
>> <group>
>> <invoke="service1"/>
>> <invoke="service2"/>
>> </group>
>> </service>
>>
>> Andrew Zeneski
>> [hidden email]
>>
>>
>>
>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ServiceGroup - service-group.xsd

David E Jones-2

On Jan 5, 2007, at 11:49 AM, Andrew Zeneski wrote:

> I didn't want to change the name, the only reason for this was the  
> conflict w/ the element 'service' in services.xsd. Do you know a  
> way to make the element in service-groups.xsd not propagate when  
> the xsd is included in services.xsd?

Yes, I figured this was what you ran into.

> Regardless, the code which parses this also accepts the 'service'  
> tag and write a warning message. It appears that it works even  
> though the XSD doesn't allow it so I think this follows the same  
> pattern you described.

Yes, you'll get validation errors for this but it will still work.  
Technically you probably don't even need the warning message in your  
code.

-David


> Andrew
>
> On Jan 5, 2007, at 1:31 PM, David E Jones wrote:
>
>>
>> Andrew,
>>
>> With this change it would be great to follow the pattern used  
>> elsewhere so that the parsing code still accepts the old element  
>> name, which will obviously only work for the group definitions in  
>> the service-group file as the "service" element name would  
>> conflict in the services XML files.
>>
>> -David
>>
>>
>> On Jan 5, 2007, at 10:16 AM, Andrew Zeneski wrote:
>>
>>> Service group model is changing. Previous:
>>>
>>> <service-group>
>>> <group name="name">
>>> <service name="serviceToRun"/>
>>> </group>
>>> </service-group>
>>>
>>> new:
>>>
>>> <service-group>
>>> <group name="name">
>>> <invoke name="serviceToRun"/>
>>> </group>
>>> </service-group>
>>>
>>> All files in apache-ofbiz which reference the old way will be  
>>> changed when the implementation is complete. This is a heads up  
>>> for those with custom apps, you will need to replace "service"  
>>> with "invoke".
>>>
>>> In addition, the new implementation will allow embedding group  
>>> definition right inside the service definition. What a pain in  
>>> the rear is it to have to edit two files just to call a group of  
>>> services in order. The files will remain (at least for now) with  
>>> the added support to embed your group defs inside a service.
>>>
>>> <service name="foo" engine="group">
>>> <group>
>>> <invoke="service1"/>
>>> <invoke="service2"/>
>>> </group>
>>> </service>
>>>
>>> Andrew Zeneski
>>> [hidden email]
>>>
>>>
>>>
>>
>


smime.p7s (3K) Download Attachment