Skip to content

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.
  • mvgharre Offline
  • Posts: 2
  • Joined: Fri Jul 25, 2014 4:59 am

Question on BeanInfo XML for Custom Tasks

Post 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 .
  • Support_Rick Offline
  • Support Specialist
  • Posts: 590
  • Joined: Tue Jul 17, 2012 2:12 pm
  • Location: Phoenix, AZ
  • Contact:

Re: Custom Task Developer Guide

Post 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>
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
  • mvgharre Offline
  • Posts: 2
  • Joined: Fri Jul 25, 2014 4:59 am

Re: Custom Task Developer Guide

Post 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 .
  • Support_Jon Offline
  • Support Specialist
  • Posts: 62
  • Joined: Thu Jul 19, 2012 9:15 am
  • Location: Ashland, NE
  • Contact:

Re: Custom Task Developer Guide

Post 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 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 Offline
  • Posts: 18
  • Joined: Wed Jan 02, 2013 5:27 am
  • Location: Mapledurham, UK
  • Contact:

Re: Question on BeanInfo XML for Custom Tasks

Post 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().
Post Reply