Oracle SOA Suite Online Training

Interested in learning Oracle SOA Suite 12c?
Learn from the author of this blog!
A complete and comprehensive course on the #1 platform on SOA - Oracle SOA Suite

Click here to find the complete course details
Click here to check the first session on Oracle SOA Suite 12c

================================================================================================

BPM - UCM Integration : Human Task Attachments(stored in UCM)

This post deals with Human Task attachments stored in UCM

This post applies specifically to Oracle BPM Suite 11g 11.1.1.5 Version before the FeaturePack, which is otherwise called PS4(Pure Vanilla BPM PS4)

UCM Integration with BPM is inbuilt from PS5 onwards(the document tab in the Human Task and some configuration in EM), but till PS4 there is no direct provision to talk to the UCM store. It has to be invoked just as any other web service, get the content and operate on it.

Human Task attachments is such a common scenario, and the attachments are normally fetched from some content repo like UCM.
How do we get the content from UCM and attach it to the Human Task so that the participant that acts on the task will have the attachments in his taskform/Email.

UCM - as such - provides various WebServices to deal with various operations. List of WebServices can be seen in its documentaion

This post deals with the GetFile WebService of UCM(http://docs.oracle.com/cd/E17904_01/doc.1111/e11011/c05_core.htm#BABFDEFH) which, as the name implies, is used to retrieve the content stored in UCM

First, login to the UCM console, and click on ------------, get the WSDL in to the project OR create a reference to it.
This WebService has an operation that takes in 3 parameters. Often, we deal with only one parameter from the list(either the documentId or documentName(in UCM)), with other two as null.
But there is a bug in the WebService where if you pass a payload similar to
<.....>
<docId>1232</docId>
<docName/>
<RevisionSelectionMethod/>
</.....>

the service returns error - inspite of the fact that you've passed the correct docId of the document you want to retrieve.
Workaround for this is to remove the empty tags completely which you cannot directly make in the invoke activity, so use a mediator before the call in which you remove out the not required tags(in the routing rule transformation - by not mapping these two)

A screenshot of the same


Once this is done, the webservice returns a result which is the content of the document, which you need to assign to the attachments part of the execData of the HumanTask.

Hope this gave you an understanding of how to retrieve the documents from UCM (in PS4)

The next post is about dealing with multiple attachments in Human Tasks

No comments:

Post a comment