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.

Comments:

Kyle, This is a very interesting read. Thanks for posting this. Do you know of anyway to get a content item to enter workflow after it has come out of Archiver? Thanks Andrew

Posted by Andrew Blackman on November 04, 2010 at 04:21 AM CDT #

Hey Andrew, No. Unfortunately in that case you're still stuck with it bypassing criteria workflows. Thanks -Kyle

Posted by kyle.hatlestad on November 05, 2010 at 03:55 AM CDT #

note that you can add key-value pair: doFileCopy=1 to checkin a copy of the source document. So... no caveat :)

Posted by Fabian Scherpenzeel on January 18, 2011 at 02:18 AM CST #

Kyle,
How come I can hide/disable the default checkin_new_form. I have created few profiles and want only those as menu item under checkInNew Menu. Thanks in advance for your passionate support. Raju

Posted by guest on August 06, 2011 at 12:11 AM CDT #

Hey Raju,

Take a look at my recent post on the subject at http://blogs.oracle.com/kyle/entry/hiding_the_standard_check_in

Thanks,
-Kyle

Posted by Kyle Hatlestad on August 10, 2011 at 07:50 AM CDT #

Hi Kyle, how is this secure when you don't even need to enter a password? It doesn't prevent you from using someone else's user name or even sysadmin. In fact, it works even if you don't provide a user name! Is there a way to enforce passwords?

Posted by guest on August 18, 2011 at 04:44 AM CDT #

It's secure by the fact that you can only run IdcCommand on the server itself or on a client that is allowed through the IP Security Filter config. So it's up to the system administrators to allow the appropriate users to have access run it.

Posted by Kyle Hatlestad on August 26, 2011 at 06:20 AM CDT #

Hi Kyle, is it possible to create directory structure while running the IDC command? I do not want all the files to get loaded in a single directory.

Posted by guest on April 09, 2012 at 01:23 AM CDT #

Hi Kyle,
I have to checkin 1 million (approx) scanned documents in WebCenter Content and I am planning to use Batch Loader feature of WebCenter Content.
Is there any limitation with Batch Loader in terms of volume, performance, or any best practise guidelines available for using Batch Loader utility.
Thanks in Advance !!
~ Piyush

Posted by guest on May 31, 2012 at 01:12 AM CDT #

Hi, i'm trying insert de dID with batch loader, if is posibility ?

Posted by guest on April 16, 2013 at 01:35 PM CDT #

I'm not sure why you'd want to pass in dID with batch loader, but afraid that's not possible. dID is an internal auto-generated ID for each item. You can think of it as it's true primary key for a content item and must be assigned by the system itself.

Thanks,
-Kyle

Posted by Kyle Hatlestad on April 17, 2013 at 10:31 AM CDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Kyle Hatlestad is a Solution Architect in the WebCenter Architecture group (A-Team) who works with WebCenter Content and other products in the WebCenter & Fusion Middleware portfolios. The WebCenter A-Team blog can be found at: https://blogs.oracle.com/ ateam_webcenter/

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today