AwareIM contains the ability to import data using a .csv file. However this approach is sometimes a little bit annoying.
This because the .csv has to follow several rules so that AwareIM can recognise everything. For example you need to have a headline in the form BusinessObject.Attribute which most systems (at least those I know about) can’t create without interaction. But if the data comes from another databse which AwareIM can read then there’s (IMHO) a better approach.
The following solution has been tested (and used successfully) against another MySQL database but I don’t see any reason why this shouldn’t work with the other supported DBMS like MS-SQL, Derby or any other ODBC DB.
- Create the Business Object with all required attributes in AwareIM where you want to store your data after importing. Lets call this BODestination
- Create a new Business Object (lets call it BOexternal) and choose “Database: existing external” from the Persistence Drop Down. The button [Settings] now brings you to a window where you can specify the desired database connection. From this table you’ll be importing the data.
- Once you have established the connection you can hit [Discover attributes] and the fields from your database table should be published as attributes of your BOexternal.
- Now create a Process that executes:
FIND ALL BOexternal UPDATE BOexternal
This process doesn’t make any changes to your data but allows the following rule to be executed. - Attach a rule to BOexternal
CREATE BODestination WITH
BODestination.Attribute1=BOexternal.Attribut1
BODestination.Attribute2=BOexternal.Attribut2
and so on.
That’s it. Now start the process from Step 4 and all your data will be moved from BOexternal to BODestination
If you should use this approach then please don’t try this on any valuable productive data but use a backup copy !
I am not responsible for any data loss or damage that might occur !
