Question on BeanInfo XML for Custom Tasks

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
5 posts Page 1 of 1

mvgharre

Posts: 2
Joined: Fri Jul 25, 2014 4:59 am

Post by mvgharre » Tue Jul 29, 2014 4:37 am
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 .

Support_Rick

Support Specialist
Posts: 592
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Thu Jul 31, 2014 10:56 am
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>
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696

mvgharre

Posts: 2
Joined: Fri Jul 25, 2014 4:59 am

Post by mvgharre » Fri Aug 01, 2014 7:42 am
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 .

Support_Jon

Support Specialist
Posts: 62
Joined: Thu Jul 19, 2012 9:15 am
Location: Ashland, NE

Post by Support_Jon » Tue Aug 05, 2014 10:00 am
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 all
getProject().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.

Jonathan

Posts: 18
Joined: Wed Jan 02, 2013 5:27 am
Location: Mapledurham, UK

Post by Jonathan » Wed Aug 06, 2014 10:19 am
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().
5 posts Page 1 of 1