Page 1 of 1
Question on BeanInfo XML for Custom Tasks
Posted: Tue Jul 29, 2014 4:37 am
by mvgharre
Hi All ,
I have Build a Custom Code in java and was able to successfully install in GAD , after following all the process as per the Custom Task Guide .
But I am facing an issue with BeanInfo XML
The Fields I am using to pass variables into my program isnt accepting Dynamic Variables.
Its only accepting hardcoded variables . And I feel its because the Field type localOrNetworkFile .
Please suggest Alternate Field names which can be used instead of " localOrNetworkFile" so that the text box can accept Dynamic variables .
Re: Custom Task Developer Guide
Posted: Thu Jul 31, 2014 10:56 am
by Support_Rick
A text field example:
Code: Select all<property name="user">
<label>${label.user}</label>
<required>false</required>
<fieldType>textField</fieldType>
<cols>15</cols>
</property>
A Text Area example:
Code: Select all<property name="jndiProperties">
<label>${label.jndiProperties}</label>
<required>false</required>
<fieldType>textArea</fieldType>
<cols>50</cols>
<rows>3</rows>
</property>
Re: Custom Task Developer Guide
Posted: Fri Aug 01, 2014 7:42 am
by mvgharre
We are still facing an issue with Bean Info xml .
Even though I have tired various options after extracting the ga_beaninfo.jar and checked out various xml files .
The issue still persists , i e After we try and pass a <fieldType>textField</fieldType> , the variables value doesn't get passed instead the hardcore value of the variable gets passed . The code works for hard coded values but not for variables declared in project
Example
${directoryPathToUploadFrom}= "/d05/gad4/POC/userdata/lib";
The values should be passed in the code , instead the ${directoryPathToUploadFrom} is getting passed and the code fails .
Please let us know how we can fix this issue so that the text box accepts variables , Rather than just hard coded values in a Custom task .
Re: Custom Task Developer Guide
Posted: Tue Aug 05, 2014 10:00 am
by Support_Jon
Without seeing some of your code, I can only guess as to the cause. I'm guessing you are not expanding your project variables which will 'resolve' them.
For example:
Code: Select allgetProject().expandVariables(submittedValue);
If this doesn't point you in the right direction, it might be worth setting up a call with you to assist you further.
Re: Question on BeanInfo XML for Custom Tasks
Posted: Wed Aug 06, 2014 10:19 am
by Jonathan
From what I can see Jon is correct, You are not expanding the variable.
In the document there is a function called internalValidate() if you look at the code there it shows you how to use expandVariables().