Component-level mapping

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

richard_t
Ebase User
Posts: 5
Joined: Fri Jun 05, 2009 1:31 pm

Component-level mapping

#1

Postby richard_t » Fri Jun 05, 2009 4:21 pm

Hello – this is my first post, so please be gentle :-D

Basically the problem I’ve got is that I can’t get component-level resource mapping going.

We are using eBase 3.3, no service pack, build 15122006, Apache Tomcat/5.0.18 1.4.2_06 (Server java) 1.4.2_07 (Client java)

We are writing some forms that will sit inside Frontline’s Lagan application, and it communicates with Lagan’s web services. We have a number of forms to complete, but they all have a common section, containing the contacts name, address, phone number, etc. We’ve created a global component with these common fields on. The person’s identifier is passed through to the form as a parameter which is stored in the component as a hidden field.

The component has a business view which includes a web service resource that calls into Lagan to get the persons information, given their ID. We’ve mapped the fields at a component level between the web service resource and the fields on the component. We’ve then created a global script to update, call, and fetch the information from the web service:

update FL_RETRIEVE_INDIVIDUAL (CASENHDCCASE);
call FL_RETRIEVE_INDIVIDUAL;
fetch FL_RETRIEVE_INDIVIDUAL (CASENHDCCASE);

We’ve created a test form, and linked the component onto the form. We’ve *not* set the forms business view at this point. We’ve then called my global script from my “before loading”. Trying the form, we get a "call FL_RETRIEVE_INDIVIDUAL has been issued but no business view exists for form MY_TEST” error. So we changed my script to:

update FL_RETRIEVE_INDIVIDUAL (CASENHDCCASE);
call FL_RETRIEVE_INDIVIDUAL;
fetch FL_RETRIEVE_INDIVIDUAL (CASENHDCCASE);

But then we get the error “call FL_RETRIEVE_INDIVIDUAL (CASENHDCCASE) has been issued but no business view exists for form MY_TEST”. So we give in, and set the form’s business view to be the same as that for the component. we then get the error “Error parsing expression (CASENHDCCASE)”. So we revert the script back to what we had at first. This time we get an error from our web service, stating that the person’s ID hadn’t been passed.

If we then modify the form’s mappings to match those of the component (taking into account the component’s prefix), and change the script to:

update FL_RETRIEVE_INDIVIDUAL;
call FL_RETRIEVE_INDIVIDUAL;
fetch FL_RETRIEVE_INDIVIDUAL;

it all works as expected. The problem is we’d really like all of the mapping hidden within the component. We have some complex stuff to do that will involve lots of mapped fields that we’d rather not have to map for every form, just once in the component. We have a similar problem once the user has completed the form, the form is converted into a PDF and then a common XML file is generated, again using just the fields from the component – we’d like this to be tied to the component as well; at the moment we could only get it to work via mapping at form level.

Is this possible? And if so how!
0 x

User avatar
Joost
Ebase User
Posts: 49
Joined: Fri Sep 14, 2007 6:14 pm
Location: The Netherlands

Re: Component-level mapping

#2

Postby Joost » Mon Jun 08, 2009 6:35 am

richard_t wrote:called my global script from my “before loading”.
I'm not sure, but it sounds to me you are calling the global script from the form. If so, you should use an event in the component.

If you did, perhaps you can try the latest trial version and see if an update would help.
0 x

ehmd
Ebase User
Posts: 53
Joined: Thu Sep 13, 2007 9:02 am
Contact:

#3

Postby ehmd » Mon Jun 08, 2009 10:59 am

Richard,

I have extensive experience of Lagan Frontline Web Services and integration with Ebase and more importantly the issues you are going to hit, even if you get you resource mappings correct.

First of all you will hit numerous problems accessing Lagan Frontline web services with Ebase version 3.3.0 / 3.3.1 and I would strongly recommend you use Ebase 3.4.0 with the latest service pack applied before you go any further with this.

Using Ebase 3.3.0 / 3.3.1 Web Service resources to update Lagan Frontline has the potential to cause data to be 'unexpectedly overwriten / deleted' on your Lagan system. This is due to a combination of Ebase Web Service functionality, introduced on 3.4.0 but not available in 3.3.x, ( ie Empty Elements / Elements not passed to Lagan ) plus numerous bugs in the Lagan Frontline Web Service.

Simply importing the WSDL from a Lagan Web Service call, will not always generate the Ebase Web Service resource in a usable format. You often need to do a lot of manual manipulation of the imported Ebase Web Service resource.
e.g. fields are imported as a table resource but you would not normally require them to be used a tables - ie ObjectReference and ObjectType.
This is particularly true of the Create / Retrieve / Update Individual and Organisation web service calls.

We do not use the standard Ebase Web Service resources to access Lagan Frontline web services. We use Custom Resources written in-house to call Lagan Web Services. These were written, pre Ebase Web Service functionality being available.
I have re-visited using standard Ebase Web Service resources at various points and some calls will work now using standard Ebase Web Service resources. However you are likely to hit problems with Create / Retrieve / Update commands on Individuals / Organisations / Cases using standard Ebase resources.

Which version of Lagan Fronline are you using ? e.g. 6.1.1.027
Do you use any UserDefined fields on Lagan ?
Do you use any Generic Big / Generic Small tables within Lagan ?

The 3 questions above may also affect a number of issues that impact on you.



Regards,



Mark
0 x

richard_t
Ebase User
Posts: 5
Joined: Fri Jun 05, 2009 1:31 pm

#4

Postby richard_t » Mon Jun 08, 2009 8:10 pm

First off thanks both to Joost and Mark.

Yes I'm calling the global script from the form - I'll have a play with events, to see if that works. More reading 8)
[Edit: I Think there are no events for components in the version I'm using, unless I've missed them :(]

This applies to both answers, but I'm basically stuck with this version of eBase as our clients use that version, and aren't going to upgrade anytime soon - it's not my call.

I noticed the web service WSDL import and so I'm now importing all of the fields by hand. Seems to be working well that way.

Again I'm stuck at Lagan 6.0.1 - but they are upgrading to 6.0.2 soon. Yes we are using UserDefined fields on both the Individual and Organisation - not on Cases. No Generic Big or Generic Small tables.

I think I'll only need retrieve Individual and Organisation, Create Case, and possiblly retrieve Case. They are supposed to be "simple" forms.

(Oh what have I let myself in for!)
0 x

User avatar
Joost
Ebase User
Posts: 49
Joined: Fri Sep 14, 2007 6:14 pm
Location: The Netherlands

#5

Postby Joost » Tue Jun 09, 2009 5:36 am

richard_t wrote:I Think there are no events for components
Perhaps no form or page events, but field events do exist. You could use a before field event on the first field in the component. This will not work with a field-only component though. In that case you could try to have the fields on a page and hide them, but I'm not sure if the before field event gets triggered. In this case a control-field might be an option.
0 x

richard_t
Ebase User
Posts: 5
Joined: Fri Jun 05, 2009 1:31 pm

#6

Postby richard_t » Tue Jun 09, 2009 8:57 am

Joost wrote:
richard_t wrote:I Think there are no events for components
Perhaps no form or page events, but field events do exist. You could use a before field event on the first field in the component. This will not work with a field-only component though. In that case you could try to have the fields on a page and hide them, but I'm not sure if the before field event gets triggered. In this case a control-field might be an option.
Genius! Thanks that worked a treat.

edit: I see from the documentation that using an after on a field in the component won't work to do my lagan updates and XML writing. hmmm.

Still, thanks a lot
0 x


Who is online

Users browsing this forum: No registered users and 123 guests