Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » Optional fields in GLA
Optional fields in GLA [message #83919] Thu, 21 September 2006 20:51 Go to next message
No real name is currently offline No real nameFriend
Messages: 121
Registered: July 2009
Senior Member
Hi,
I am using the GLA perspective in tptp 4.2 to develop a GLA rule-based
adapter. If a given field is present, I wish to produce a corresponding
extendedDataElement. If it is not present in a record the
extendedDataElement should not be created at all.

What do I need to do to prevent empty things like this:

<extendedDataElements>
<children name="result">
</children>
</extendedDataElements>

I am playing around with "Required by parent" and "Child choice", but
not getting what I want (ie, no extendedDataElements when given source
field is not present).

Thanks,
chris
Re: Optional fields in GLA [message #83953 is a reply to message #83919] Fri, 22 September 2006 11:27 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 121
Registered: July 2009
Senior Member
Hi,
In the meantime, I set 'name' attribute of the extendedDataElement to
"Required by parent", remove the default value, and define a
substitution rule for this 'name' attribute. If the rule does not match
the given pattern, name is 'empty; and the containing
extendedDataElement is not created.

This works - I wonder, however, if this is the best way to do it.

Thanks, chris




Chris Giblin wrote:
> Hi,
> I am using the GLA perspective in tptp 4.2 to develop a GLA rule-based
> adapter. If a given field is present, I wish to produce a corresponding
> extendedDataElement. If it is not present in a record the
> extendedDataElement should not be created at all.
>
> What do I need to do to prevent empty things like this:
>
> <extendedDataElements>
> <children name="result">
> </children>
> </extendedDataElements>
>
> I am playing around with "Required by parent" and "Child choice", but
> not getting what I want (ie, no extendedDataElements when given source
> field is not present).
>
> Thanks,
> chris
>
Re: Optional fields in GLA [message #83967 is a reply to message #83953] Fri, 22 September 2006 13:54 Go to previous message
Eclipse UserFriend
Originally posted by: cindyjin.ca.ibm.com

Hi Chris:

I think use "Required by parent " attribute is a correct way to do it.
You can check the Required by parent check box of 'name','type' or
'value' attribute, then create substitution rule to set an invalid value
to that attribute when the given field in record is not present. You can
check Common Base Event format specification
http://www.eclipse.org/tptp/platform/documents/resources/cbe 101spec/CommonBaseEvent_SituationData_V1.0.1.pdf,
to see what are valid values for these attributes.

Bests
Cindy

Chris Giblin wrote:
> Hi,
> In the meantime, I set 'name' attribute of the extendedDataElement to
> "Required by parent", remove the default value, and define a
> substitution rule for this 'name' attribute. If the rule does not match
> the given pattern, name is 'empty; and the containing
> extendedDataElement is not created.
>
> This works - I wonder, however, if this is the best way to do it.
>
> Thanks, chris
>
>
>
>
> Chris Giblin wrote:
>> Hi,
>> I am using the GLA perspective in tptp 4.2 to develop a GLA rule-based
>> adapter. If a given field is present, I wish to produce a
>> corresponding extendedDataElement. If it is not present in a record
>> the extendedDataElement should not be created at all.
>>
>> What do I need to do to prevent empty things like this:
>>
>> <extendedDataElements>
>> <children name="result">
>> </children>
>> </extendedDataElements>
>>
>> I am playing around with "Required by parent" and "Child choice", but
>> not getting what I want (ie, no extendedDataElements when given source
>> field is not present).
>>
>> Thanks,
>> chris
>>
Previous Topic:TPTP 4.2.0 installation using update mgr. fails
Next Topic:Exception generated on OS X
Goto Forum:
  


Current Time: Sat Apr 27 02:32:22 GMT 2024

Powered by FUDForum. Page generated in 0.02924 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top