Sitedetout - Tutoriels informatiques

Batch load content into workflow

Batch load content into workflow

A common request I often hear is for the ability to kick-off criteria based workflows from Batch Loader. Batch Loader lets you check in large amounts of documents at once, but it uses a different service then the standard interface check in. This other service bypasses the check for the criteria workflow, so documents will always immediately release after being loaded. This is done intentionally to avoid mistakenly sending all of your batch loaded documents into a workflow process which would be difficult to correct.

But if you do intentionality want to batch your documents into workflow, there is a way to do that. Just not through the Batch Loader. Instead, you can use IdcCommand which will work in almost the same way and require just a small change to the batch load file.

IdcCommand is a utility on the server that allows you to script out service calls to UCM and execute them on the command line. So nearly everything you can do through the interface, you can do through IdcCommand. So in this case, we’ll script out the check in actions.

If you take a simple batch load file, it will look something like:


Action = insert
dDocTitle=Springfield News
dDocAuthor=sysadmin
dSecurityGroup=Public
dDocType=Document
dInDate=10/25/10 9:58 AM
primaryFile=C:/Files/Springfield/news.doc
<<EOD>>
dDocTitle=Springfield Notes
dDocAuthor=sysadmin
dSecurityGroup=Public
dDocType=Document
dInDate=10/25/10 9:58 AM
primaryFile=C:/Files/Springfield/notes.doc
<<EOD>>

Of course each entry could have additional metadata such as xComments or other custom metadata fields.

To change this into a IdcCommand file that will check in each item, simply add this line to each document entry:


IdcService=CHECKIN_NEW

Which would look like:


IdcService=CHECKIN_NEW
Action = insert
dDocTitle=Springfield News
dDocAuthor=sysadmin
dSecurityGroup=Public
dDocType=Document
dInDate=10/25/10 9:58 AM
primaryFile=C:/Files/Springfield/news.doc
<<EOD>>
IdcService=CHECKIN_NEW
dDocTitle=Springfield Notes
dDocAuthor=sysadmin
dSecurityGroup=Public
dDocType=Document
dInDate=10/25/10 9:58 AM
primaryFile=C:/Files/Springfield/notes.doc
<<EOD>>

By executing the CHECKIN_NEW service, it’s just like using the standard check in form for submitting the document. So it will go through the standard criteria workflow check.

To execute the script, it’s just like calling Batch Loader from the command line. You want to go into the <ucm dir>/bin/ directory and type in:

IdcCommand -f <file name> -u <user> -l <log file> -c <auto | server | standalone>

e.g.

C:\oracle\ucm\bin>IdcCommand -f batch.txt -u sysadmin -l idclog.txt -c server

And that’s it. If your checked in documents match your criteria workflows, they’ll then enter those workflows.

One caveat to note…when IdcCommand successfully checks in a file, it will remove the source document from the file system. If the check in fails for some reason, it will leave the file alone and log the error.

Hat tip to Oracle Consultant William Phelps for this tip.


Laisser un commentaire

Votre adresse e-mail ne sera pas publiée.

Menu Title
Chargement...

Powered by sitedetout.com