Kofax project and batch class - kofax

Kofax Capture Version 9
I have an existing Project and Batch class that works, built previously by Kofax engineer.
What I need to do is change the script in the project to use a new DB connection. This seemed simple enough.
Using project builder I copied the existing project, altered the script and saved the project. Using Capture Administration I copied the existing batch class and then used Synchronize Kofax Transformation Project and pointed to the new project. All this seemed to work without error.
However the script being executed is the original not my altered one, any guidance would be great.

Make sure you are creating a new batch after publishing your change. The batch class class update function works in very limited scenarios, so I don't generally recommend it.
There are many ways that a database connection might be handled in script. Usually I would expect that a function at the project script level handles the connection and is called from any sub class, but you might want to check any sub classes to make sure they aren't using locally defined connection strings.
Even if you are making a connection in script (which you've now changed), you might also be using product features that use databases. Open Project Settings and check the Databases tab.
If there are relational databases listed, simply change as needed.
If you are actually using "Remote Fuzzy" databases then these might be using Kofax Search and Matching Server which connects to a relational database to build the fuzzy db. In this case you would need to use KSMS Admin to change the connection on the KSMS server.
If you are using "Local Fuzzy" databases then the info is based on the content of a text file. You might have some external process (possibly Markview) that dumps this text file from a database.

Related

Jhipster Elasticsearch org.elasticsearch.indices.IndexMissingException

I am trying out jhipster and learning the technology stack.
Environment:
Database:
Orcale (both prod and dev)
Elasticsearch
Windows
I created a new jhipster project and copied some external generated entities into the domain folder.
Then wrote a parser that generates the [Entity].json file in the .jhipster folder.
I ran the entity subgenerator using this json file which asks me to overwrite the existing entity file(which I copied from external project).
I select no and then the generator generates the CRUD html/js files.
When I run the application, it can save/edit data correctly.
But when I search, I get IndexMissingException.
I checked the target folder and found that target/elasticsearch/data does not contain any index for this entity.
I am not very familiar with elasticsearch and would like to know if there is any workaround for this IndexMissingException
There are a few ways to solve this.
You can simply delete your target folder while the application isn't running, then rerun it. This will regenerate the indexes for all of your entities, but because Elasticsearch is essentially a data store, you will lose all data from it so it is not appropriate for a production environment.
I have created a Yeoman generator that will generate a service to reinsert all data from your main datastore into your elasticsearch indexes. This can help resolve the data issue from the first solution. It will also programmatically delete and recreate your indexes, so it can be used to solve your problem directly.
You can use the Create Index API while the server is running. This is important for a production environment where the data in your index is important to keep.

How can I bundle my database file into my app, ready for a side load install?

I am creating a Windows 10 Universal App which uses a local SQLite Database.
In order for the app to use the database file It must be placed in:
C:\Users\<Username>\AppData\Local\Packages\<Name of Package>\Local State
Now I understand this is the 'local' file structure for the application. However I have a pre-made database that the app needs to interact with and therefore should be bundled as part of the app on install.
Is there a method of including my database in a usable fashion when distributing my application via a side-load install?
Furthermore, This problem is of paramount importance as This 'C:\' Directory will not exist when pushing my application to the mobile phone or other Windows 10 (not a desktop) device.
You cannot package the database directly as read-write data (local state). If you only ever need to read from the database, you can just include it in your project and read it from Package.Current.InstalledLocation.
If you need to write to the database, but it contains some initial values you want to ship with your app, then you still need to include the database in your project, but then copy it from the InstalledLocation to ApplicationData.Current.LocalFolder if it doesn't exist when your app starts up.
You can all ways export your existing data base as SQL script and save it in your project assets.
On the first run of your application you can create the Sqlite file in your LocalFolder, and run the script with CREATE and INSERT queries.

How do I Create a Movable Type 5 Development Environment?

I want to create a development environment running Movable Type 5.
To create a separate development environment, it is necessary to copy and paste to reflect production.
How would I go about building a good environment?
There are many ways to build a development environment, and an experienced Movable Type developer would need to know more about your goals in order to make a good recommendation.
All of the following guidance assumes that Movable Type has been installed and is ready to run
on the development server.
Here are a few basic tips:
Although some of the key configuration details for a Movable Type instance are kept in mt-config.cgi, there are website-level and blog-level settings that are of equal importance that are kept in the underlying database.
Since most Movable Type 5 instances use MySQL as the database backend, it's possible to dump the entire contents of the Movable Type database using the mysqldump utility or a more visual tool like the Export function of phpMyAdmin. This produces a large text file with MySQL CREATE TABLE and INSERT statements.
Once the database is dumped to a file, the file can be moved to another server, modified, and reconstituted. One of the tasks we commonly perform at that point is to go through the database using an editor, the UNIX sed command, or some similar process, and perform global searches and replacements for the URLs and file system paths that are embedded in the database dump.
This is necessary in many cases because your production website may be http://www.mysite.com/, but your development environment may be http://dev.mysite.com/ or even http://localhost/. Similarly, the file system paths in production may be /var/www/mysite/htdocs/... while development may be /opt/local/apache2/htdocs/mysite/....
Once changes of this nature are made and the modified file is saved, the database is reconstituted on the development server by using a UNIX shell command like:
cat mysite.sql | mysql -u mt_user -p mt_password
Or by importing the database into another copy of phpMyAdmin.
Once all of this is done, the mt-config.cgi file from production needs to be copied into the Movable Type working directory and rewritten so that several important elements are changed:
CGIPath
StaticWebPath
Database
DBUser
DBPassword
DBHost
These Movable Type Configuration Directives are discussed in the online documentation.
All of the non-database assets have to be copied from production to development. Things like files containing jpeg, png, and gif images, files that have been placed in the production file system either manually, or using the Asset Manager. There may be other files that need to be copied from production, depending on how you use Movable Type.
Once all of this is done, and you are able to login to the Movable Type development server successfully, you will probably want to the websites and blogs to ensure that all of the content has been copied into development.
I hope these instructions are somewhat helpful to people needing to setup a development environment. I would be happy to get comments or edits if anyone thinks I left out anything significant.
By saying that you need a development environment for Movable Type, what exactly do you need to develop?
If you are developing a plugin? or theme? a website? content?
It is possible to assign a different mt-config.cgi file to each virtual server, and working on different database, for the same installation.
If you are developing a plugin, you will want to use the PluginSwitch directive so the developed plugin won't be loaded on the real website.
http://www.movabletype.org/documentation/installation/managing-multiple-instances-of.html
Eslar, you may like to consider also this documentation resource:
http://www.movabletype.org/documentation/mt41/rsync.html
Alternatively, you may like to consider:
http://www.cis.upenn.edu/~bcpierce/unison/
If you go with the 'rsync' solution described in the movable type documentation, you may like to check also these configuration directives mentioned there:
http://www.movabletype.org/documentation/appendices/config-directives/rsyncoptions.html
http://www.movabletype.org/documentation/appendices/config-directives/synctarget.html

Some default objects of core data entities

Here I have some entities in core data, for example, "Account",
and I wish that, when user enter my app for the first time, there is some thing in Account,
to make it more clear, maybe I should say I want to give some default managed-objects for an entity so that they will be there when the app is just installed.
How can I achieve this?
Thanks a lot!
I have a similar requirement for an app I'm working on. I am using a sqlite persistence store for my data, so I basically want to pre-populate that table with the data for my default entities.
To do this, I have created a separate project in my Xcode workspace that shares the same data model with my app. In this separate project I write the code I need to insert entities into the table, and to store the file in a well-known place on my Mac.
Then, I copy the sqlite file that my initializer app has created into the resources directory for my "real" app. As part of the startup for that app, I wrote a small bit of code that copies the default DB from the resources to my app's documents folder if a copy doesn't already exist there.
The end result is this: I can run my initializer app to populate the default data as I need to. I then copy the file into my real app, so when the app is first run there is a default copy of that DB ready to go.

How to update a database programmatically, so that the updated one is included when publishing?

I'm copying and updating data from another database to mine (programmatically), this works fine when debugging. It also remembers it between debugging sessions. However, when I publish the program, the original database is empty.
How do I make sure the updated one is included?
This is an SQLCE database by the way.
When you are debugging the compiler will copy your SqlCe database to the bin\debug folder and that's the one you will be using when your program is running.
So when you copy data while debugging it will not end up in the database that is a part of your project but in the one in the debug folder!
Using the following tool could help. This will allow you to script the data that's in your database to a sql script so you can run it in your publish environment.

Resources