Showing posts with label accelerator. Show all posts
Showing posts with label accelerator. Show all posts

Tuesday, November 19, 2013

WebCenter Imaging in a Nutshell

Hello all, 

Imaging and process management is a strong focus in today's enterprise. Oracle provides a number of products that provide a solid toolbox for exactly this reason. This article will review a number of products, define some terms, and provide some process flow examples showing how the different products related and couple to each other. 

Overview

Starting with an overview, please keep in mind that there are two similar terms in this world: Oracle WebCenter Imaging (a.k.a., IPM, WebCenter Imaging, Oracle WebCenter Content: Imaging, WCI, etc) and "the image process" or the "imaging solution".

Oracle WebCenter Content: Imaging (formerly known as “Oracle Imaging and Process Management” or Oracle IPM) is Oracle Corporation's product that combines document management and business process management suite and is marketed as a component of the Oracle Fusion Middleware portfolio of products. 

The overall Oracle imaging solution is a combination of multiple technologies like WebCenter Imaging, Capture and Forms Recognition. Overall it provides enterprise-class imaging platform for end-to-end management of document images within transactional business processes. It's a solution that provides comprehensive content management and business process management capabilities - from document capture and recognition, to imaging and workflow - which communicates with Oracle's business applications and built on the Oracle Fusion Middleware infrastructure.

WebCenter Imaging: This provides security, annotations, searching, and is the current primary user interface for processing work items in the imaging solution.  

SOA: This provides business process management capabilities including human tasks, workflow management, service integration, and all other standard SOA features. A number of 'jumpstart' processes are available to help accelerate the integration of business applications, such as an accounts payable invoice processing solution for E-Business Suite applications to facilitate processing large volumes of invoices.

Capture: This is known as WebCenter Capture. It expedites the capture process of paper invoice to electronic documents. It facilitates high volume scanning using desktop and web interface. It easily gets gel with various scanners and allows flexible indexing options.

Forms Recognition: This is known as WebCenter Forms Recognition. This works on learning-based intelligent document recognition mechanism. This can recognize, categorize and extract information from variety of documents. It uses patterns and not locations, to efficiently locate, extract, and link data. This can also validate the data from database. It minimizes the need for human intervention by automating data extraction.

The below diagram explains the handshake and data exchange happening in different components of the imaging solution: 

The process initiates from WebCenter Capture (formerly known as ODC). The process can take 2 paths to send the data to WebCenter Imaging (WCI). Each path has its own significance and importance, one is called as KFI (Key from Image) and another one WFR (WebCenter Forms Recognition). Both of these flows involve different approach of pushing the image in WCI and level of detailing in case of data.

KFI (Key From Image) Flow


This approach is used for committing the image directly to WCI server with bare minimum metadata. This is simplest and quickest way to push the image in WCI. As shown in above diagram it takes route of KFI-1 and KFI-2 to reach to WCI.

KFI-1: This covers the below activities with in WebCenter Capture (WCC)

1.       Document is scanned using scan profile
2.       Image is indexed using indexing profile.
3.       It is committed using index profile itself.
4.       Based on the commit profile it will invoke the WCI’s web service and will pass the metadata and document image over SOAP protocol. This is configured with in commit profile.

KFI-2: This depicts the activities which happen within WCI once the web service received the metadata and document image. As these are internally handled, there is not much documentation available on this. This being internal part of WCI, this will not fail. I believe in case of failure we should be able to raise an SR and get the issue resolved.

WFR (WebCenter Forms Recognition) Flow


This is automated approach where the data is extracted from image using series of operations like Optical character Recognition (OCR), Classification, Extraction and Export. This creates the 3 files (Tiff, XML and TXT) which are fed to the WCI input agent. The WCI input agent directory is a standard ingestion method for adding content to WebCenter Imaging. These steps are described in detail below.

WFR-1: This covers the communication between WCC and WFR.

1.       WCC commits the batch using respective commit profile.
2.       It creates the TIFF file in the export directory configured in the commit profile.
3.       The data is passed using file name of TIFF. Generally file name contains different values in the file name separated by “_” (underscore). Mostly it has values like URN, priority, organization, etc.

You can add additional information in file name. However you need to do script changes in WFR to read the data and process it. 

WFR-2: This covers the communication between WFR and WCI input agent. By this time WFR is done its job and data is extracted.

1.       WFR does the processing like OCR, classification, extraction, export and pulls the data from image. It created 3 files in the output directory configured in the WFR export location.
1.1.    TIFF: this contains the document image. It may be a multipage. This is the same file that has been given as an input to WFR by WCC.
1.2.    XML: this contains the data extracted from the document image. The xml elements are controlled from INI file and scripts in WFR.
1.3.    TXT: this contains the metadata that will be filled in WCI application.
2.       All these 3 files will be exported in WCI’s Input agent directory.
3.       WCI has a listener pointed to this folder which wills pick-up the seeding file defined in mask under inputs entity in WCI.

WFR-3: This covers the details which happen once the files are added in Input agent and inputs gets activated.

1.       In WCI admin section under “Manage Inputs” we must have defined the masks. These masks are generally pointing to seeding file. In our case it is TXT file.
2.       Based on the input mask, Input agent will pick-up only the seeding file (in our case it is TXT). This file will have the metadata which will be mapped with application fields. The XML and TIFF files are referred from seeding file (i.e. TXT).

WFR-4: This covers the details happened between inputs and WCI application

1.       TIFF file is pushed in UCM and the unique WCI URL is created using configuration made in WCI schema. This URL becomes a web viewable URL to show image in AXF paradigm. In this stage Doc ID is created which is used as a unique key for accessing the document.
2.       Based on the mapping data will be read from TXT file and new record is created in the WCI application.
3.       The XML file is used as a supporting content which is passed while invoking the BPEL instance. 

Communication between Imaging & WebCenter Content


This communication is common for KFI and WFR flow both. The imaging application has 2 types of connections, one of them is WebCenter Content server. Below events happen using Content server connection.

1.       It passes below entities to content server
1.1.    TIFF images along with the metadata which has been received as imaging application fields. While doing this the web URL. This URL is a combination of multiple parameters which are defined in configuration table present in WCI schema. Content server creates an unique Document ID based on the prefix configured and auto-increment number. While creating the web-url, WCI also adds the application ID as the prefix.
1.2.    Only in case of WFR flow is invoked, it passes the supporting content which is XML file content. For KFI this will not happen.
2.       The document ID generated in Content server is also saved in the Imaging application. This is a unique reference number for the document.

Communication between Imaging & SOA server


This is based on the workflow configuration made in WCI. This integration is the same regardless of KFI or WFR . This works like a trigger, as soon as new entry is made in the imaging application, this is triggered. Below events happens using SOA server connection.

1.       Once new entry is made in the imaging application, prior to this data has been already pushed to Content server & related data is also available in the imaging application, this uses the workflow configuration.
1.1.    Workflow configuration has details like SOA server connection, composite name, its revision, mapping of the fields.
1.2.    Using above details it invokes composite web service exposed by SOA server.
1.3.    Using parameter mapping it creates the input SOAP XML. Few important fields like document ID, document URI are also passed. These values are used in future communication.
1.4.    This SOAP XML will also have the supporting contents present in XML file sent to imaging in WFR flow.
2.       Once the SOA composite is invoked from imaging, there is no further action lined up in imaging. There are no events that happen in imaging which pull or push the data to any other entities. However metadata is updated in imaging application using value of document ID by BPEL.

Operations in SOA server


In the WCI environment, the SOA server is used as a process and service integration engine. The process is configured among different composites. The universal entry point is always the first composite invoked from WCI. For the AP Solution, it is Document Routing composite. Based on different conditions respective composites are called. Here we will not discuss each composite in details (that will be covered in later blog). SOA communicates with EBS and pulls/ push the data in its EBS database through a number of service integrations and EBS stored procedures. All these composites are part of the AP Solution Accelerator which comes as a starter kit (not supported by Oracle support) with WCI. This can be acquired by Oracle channel partners only, it is not freely available for download.

In case of KFI flow below composites are involved.
1.       The first composite in all cases is “Document Routing”.
2.       From there it calls “Invoice Processing”.
3.       In invoice processing, there are multiple actions which lead to different composites. In KFI this is one of the main controlling composite. Once the instance is complete in this, it will end the instance.
3.1.    The simplest will be if user clicks on “Complete Invoice” actions, it would end the instance. However prior to this the check is made if invoice image is attached to EBS invoice or not. This is done based on Invoice_ID value.
3.2.    Other common action is “Invoice Approval”, this will invoke Invoice approval composite. This composite is simply processes the outcome and sends back the response to calling composite. 
4.       In this flow the invoice image from WCI is linked with invoice of EBS manually. The process involves below steps.
4.1.    Login to EBS and open invoice entry screen
4.2.    Using zoom button click on “Process invoices” option
4.3.    This will open the WCI’s invoice processing task list.
4.4.    In popup, select the invoice image
4.5.    Looking at the WCI image do the data entry in EBS invoice entry screen and save the invoice in EBS.
4.6.    Once it is saved, it will call web service of WCI and send the invoice id from EBS.
4.7.    This will get updated in the image open in WCI popup. This way the link will be created. 

In case of WFR flow below composites are involved.
1.       The first composite in all cases is “Document Routing”.
2.       From here it calls “Invoice Import” composite.
3.       This composite is responsible for many important tasks
3.1.    This does basic validations like Org_id. In case this is incorrect it will directly sent it Invoice processing without ingesting any data in EBS
3.2.    It will check the type of invoice.
3.2.1. If it is PO then it will go to next step
3.2.2. If it is non-PO then it will call account distribution and allow user to do the coding.
3.3.    Then it will invoke Invoice validation and import composite. This composite will do the detailed validations and will add the invoice data in Open interface table of EBS. Later on from there it will be sent to Invoice master table using concurrent job. This composite will send status of validation back to Invoice Import.
3.4.    Based on the validation status it will do further activities.
3.4.1. If the status is N then it will invoke invoice processing
3.4.2. If the status is Y then it will wait for EBS response and then proceed to next step
3.5.    The EBS response will be processed in “Post Invoice Import” composite.

In this flow most of the time link between Invoice image of WCI and invoice of EBS is made in invoice import itself. In case it fails due to validation or rejection from concurrent job then user has to follow the KFI process to setup the link manually.


Summary


In this post, the basics of the Oracle imaging solution were defined. We covered the key products as well as some of the options of the AP Solution Accelerator. 

At this point, you should be able to recognize how Oracle has constructed a product suite which acts as an excellent toolkit for creating any secure, reliable, business process you can conceptualize!

Thanks all!

Special thanks to Vikrant Korde for authoring this post!

Monday, March 4, 2013

Oracle IPM: Customizing AXF Task Details page – Add new actions: Invoke Outcome


This blog guides you to add functionality to the existing composites. There are 3 different type of actions configurable with Oracle provided AP Solution Accelerator.

  • Invoke “outcome” of human task
  • Do validations, like Transaction id is blank.
  • Allow user to pick user/ Group from list.

The below description focuses on “invoke outcome”. Remaining type of actions and its details will follow on next blogs.

For each solution namespace (can be analogous to BPEL composite, most of the times) that you create, there is an AXF Tasklist page (url has “cmd=Start<SOLN_NAMESPACE>&sol=<SOLN_NAMESPACE>” – assuming that you have already made the database entries for Start<SOLUTION_NAMESPACE>. If not, do not worry, there will soon be another article explaining how to do that) where the end user is provided with the option to take any of the actions that you have configured in your BPEL Human Task. The AXF task list page for a particular Solution Namespace and Command Namespace provides you with all the instances of invoices currently under a particular view.



View Task opens the AXF Task Details page, which has some actions in the left side bar.



In case you want more flexibility with these actions, you need to do some data manipulations in the AXF Database, using the DEV_IPM schema.

Let us first look at the tables in this story:

     1.      AXF_ACTION_MENU


In this table, the entry for Solution_Namespace is made.
Menu_ID is auto incremented using a sequence (AXF_ACTION_MENU_SEQ).
Rest all the entries are to be done as they are for other rows.

     2.       AXF_ACTIONS


This table maps the actions displayed on the UI. For each action displayed on the UI, there is a corresponding COMMAND_NAMESPACE entry here in this table.

Action_ID is again auto incremented using the sequence AXF_ACTIONS_SEQ.
Display_Text is the label you want to give your action on the UI.
Menu_Order acts as a rendering switch – 0 means visible and other values means not rendered.
Menu_ID is the same as the one in the AXF_ACTION_MENU table, for the Solution_Namespace.

     3.       AXF_COMMANDS


In this table a command class is configured for your Solution Namespace and Command Namespace. Usually, it depends upon what your action actually does. For example, oracle.imaging.axf.commands.bpel.CompleteTaskCommand is used when the action signifies completion of a flow or a sub flow. oracle.imaging.axf.commands.bpel.OpenTaskCommand is used when a new flow is initiated. Here, for a new action, you will need the following entries:

SOLUTION_NAMESPACE
COMMAND_CLASS
COMMAND_NAMESPACE
<Your_Solution_Namespace>
oracle.imaging.axf.commands.bpel.AutotaskCommand
AutoOpenTask
<Your_Solution_Namespace>
oracle.imaging.axf.commands.bpel.ReleaseTaskCommand
CancelTask
<Your_Solution_Namespace>
oracle.imaging.axf.commands.bpel.CompleteTaskCommand
<Command Namespace you entered in AXF_ACTIONS>    
<Your_Solution_Namespace>
oracle.imaging.axf.commands.bpel.OpenTaskCommand
OpenTask
<Your_Solution_Namespace>
oracle.imaging.axf.commands.bpel.ReleaseTaskCommand
SkipTask




     4.       AXF_SOLUTIONS


AXF_SOLUTIONS consists of a SOLUTION_CONTEXT entry, which is usually the same for all the Solution Namespaces, namely, ejb.AxfCommandMediator#oracle.imaging.axf.service.AxfCommandMediatorRemote.

     5.       AXF_SOLUTION_PARAMETERS




This perhaps is the most important table because is maps the outcomes of various actions for consumption by either your BPEL process or by AXF internally. Let’s have a closer look at the values that need to be entered here, and what they represent.

For each Command Namespace (i.e. the action you want to add to the UI), there will be 3 entries, which will have the following values:



On the AXF Worklist page, there is an Auto Task button, clicking which open up all tasks in the list in serial order for appropriate actions to be taken by the user. The CMD_AUTOTASK_OFF parameter key’s value will redirect AXF view to the default starting point of your AXF flow in the case when the Auto Task function is not available to the user.

CMD_AUTOTASK_ON points to AutoOpenTask, which is nothing but another Command Namespace created as a part of the Start<Solution_Namespace> entries. The details for AutoOpenTask are as follows:



If you are creating a new composite and don’t have the Start<SolutionNamespace> entries in place, then you will have to do that first.

OUTCOME maps to the value which your BPEL flow is expecting as a return value from the Human Task in this case.

PS: Please note that you are not supposed to create the entries for AutoOpenTask as a part of this exercise. It is a separate topic, and will be addressed in another post.

    6.       AXF_SOLUTION_ATTRIBUTES


In this table, there are 3 entries that are required. There is a snapshot of the actual data below:

SOLUTION_NAMESPACE
PARAMETER_KEY
PARAMETER_VALUE
< SolutionNamespace>
BPEL_CONNECTION
SOA Server
< SolutionNamespace>
CONNECTION_PROVIDER
oracle.imaging.axf.servicemodules.bpel.workflow.AxfWorkflowServiceModule
< SolutionNamespace>
USE_AUTOTASK_LOCKING
FALSE

The keys CONNECTION_PROVIDER and USE_AUTOTASK_LOCKING are given the standard values, as in the snapshot. BPEL_CONNECTION is the name of the connection that is created for the SOA Server in IPM UI.

Once the entries are made using values that we are supposed to enter in various tables as described above, there is one final step that remains to be done for the changes to reflect on the AXF Task details page.

Open the IPM Drivers UI (http://<your_server_ip>:16000/imaging/faces/Driver.jspx). The page that looks like this:


Enter the Solution Namespace, Command Namespace (Remember, the Start<SolutionNamespace> command namespace. And yes, it is a Command Namespace, though it is never shown as an action on the Task details page!!!) and the user name.

Click on Execute Request.
Click on Clear Configuration Cache.
Click on Reset DMS Metrics.
Click on Execute Response. This shall open your AXF Tasklist page in a new tab, and you should be able to see the newly added action on the details page.

Thanks all for reading!