spacer
cornerspacercorner
Reply
Valued Contributor
Greg
Posts: 179
Registered: 05-19-2010
0 Kudos

v9 BO manual operations

Hello

 

I have some strange problem. I want to create form using grid to show data only temporary.

I have some dummy table in database, and BO created in context of this dummy table.

 

On form load, I want to add some rows to this BO - what is working perfect.

On form exit, I want to clear table, becouse I don't want to have this data in DB.

Unfortunatly, Metastorm is commiting this BO to DB before this event, and I have this rows in my table in DB:smileysad:

 

Is any workaround for this?

Below you have some example of my problem.

Using form on stage, works perfect, but using this form on action, and allow user to commit this action, is equal with inserwing rows to DB.

 

Let me know what I'm doing wrong.

 

Regards

Esteemed Contributor
Jerome҉
Posts: 744
Registered: 05-18-2010
0 Kudos

Re: v9 BO manual operations

Forgive me if I'm missing something, but it does look like a rather long way to do something which may be simple.

 

Firstly I would use a temprorary table if I could. I am not sure the Designer handles temprorary tables, however. I have had some issues, but with TT filled by stored procs.

 

Secondly I would insert the data on loading the form, and delete the data on saving the form. You would get the data left in the table if the form is opened readonly, and if not saved, but we have managed that in other areas by adding the inserted dat and doing a cleanup of data over a day old every time a form is opened. If good indexes are used, there is no noticable performance hit.

Valued Contributor
Greg
Posts: 179
Registered: 05-19-2010
0 Kudos

Re: v9 BO manual operations

Jerome

 

All you said is true, but in my opinion more complex in my case.

Becouse I want to show data temporarly read by .NET API from some external system. I will have this data in ADO datatable object. This mechanism will be also quite nice, if you will want to work with webservices.

 

This approch is in my opinion more simple than need of insert every row into table, clear data on commit and clean up some old data from folder forms.

In folder form scenario, my solytion is clear - becouse you will never have data in database.

My problem is with action form, where data is commited to db, but it should't. I'm not sure why. Here we have example, of zero information about event sequence :smileysad:

Esteemed Contributor
Jerome҉
Posts: 744
Registered: 05-18-2010
0 Kudos

Re: v9 BO manual operations

Thinking about this, I can see what you are trying to do, yes.

 

I haver noticed that you can fill fields in a Editable Business Object like this where the initial parameters are invalid, and the data is 'thrown away'. Consider two 'Process Business Objects' attached to a form and using the Folder Id as a parameter. Only one is valid, and the other will be 'empty' but you can assign values to the varables. These are not commited when the form saves.

 

I suspect you could do something similar with your BO by just specifiying a parameter on load, and maing sure it is never 'valid' The rows added, I believe, will still exist for the life of the form.

 

I have not tried this with a table, however, so I can only suggest at this point.

Valued Contributor
Greg
Posts: 179
Registered: 05-19-2010
0 Kudos

Re: v9 BO manual operations

Jerome

Example i've attached to my first post is exactly what you said. BO has 1=-1 condition, so it's always empty on form load. But on form commit, I have some new row added from code. I'm trying to clear datatable on commit form, but it is not working. Data is written do DB :smileysad:

line spacer line
spacerFollow Metastorm on:
spacer Twitter YouTube Blog iTunes LinkedIn Metastorm Community Central, MC2
spacer Copyright © 2011 OpenText Corporation. All Rights Reserved.spacer About Metastormspacer Privacyspacer Legalspacer Site Mapspacer RSSspacer Contact Us
Microsoft Gold Certified Partner
Powered by Windows Azure
line spacer line