Friday, August 17, 2018

Eclipse: JAR v/s Runnable JAR

Both the types standard and runnable contains the Manifest file and java class files. The difference is in the content of Manifest file.

The Manifest file for runnable jar has an entry for main class:
Main-Class: com.kpmg.rohit.appraisalStrory.StoryTeller
That means runnable jar specifically specifies the entry point of jar. 

So if you just want to bundle your project in a library to be used by any application, any type of jar will suffice. But, say, you want to execute by command line, the difference will be clear

So, I have two jars for same project, one exported as runnable and other as standard jar





Let me try to run both of them via command prompt:












The runnable jar is executed but standard jar throws an error, because java does not the entry point to this jar.

We can explicitly specify the class with main method to execute the standard jar as well
That is it, hope you get it.


Friday, June 1, 2018

OIM: Query to get the request data

The following queries will serve as a good starting point to fetch the request data in OIM:

1. To get the request form data

select * from REQUEST_BENEFICIARY_ENTITYDATA where rbed_rbe_key IN
(select RBE_KEY from REQUEST_BENEFICIARY_ENTITIES WHERE AND RBE_REQUEST_KEY = '<RequestId>' ) ORDER BY RBED_RBE_KEY DESC;


2. To get child table data

select * from REQUEST_BENEFICIARY_ENTITYDATA where RBED_PARENT_KEY = '<RBED_>' AND RBED_PARENT_KEY IS NOT NULL;

RBED_PARENT_KEY is returned from the first query.


1.       

Friday, May 25, 2018

Thursday, May 24, 2018

OIM-SOA: Populating wftask table with custom attributes

Many a times, for reporting or other purposes, we need to populate the data the wftask table(directly mapped to human task in composite) with some custom data.
This custom data can be data from the payload or any other data that is present in the composite.

Updating the wftask table with the composite data can avoid writing bpel apis and a query suffices in this case.

How to do it, is probability what you are interested in. This is done by a simple assignment in the human task.
  1. Expand your human task in the composite. You should see a construct like 'taskName_AssignTAskAttributes'


    2. This is where you need to assign the variables. You can do it in design editor, or can copy the following lines in BPEL file.
<copy> 
      <from variable="inputVariable" part="payload" 
        query="/client:process/client:EntityKey"/> 
      <to variable="initiateTaskInput" part="payload" 
       query="/taskservice:initiateTask/task:task/task:customAttributes/task:customAttributeString1"/> 
</copy> 
<copy> 
  <from variable="inputVariable" part="payload" 
   query="/client:process/client:BeneficiaryLogin"/> 
  <to variable="initiateTaskInput" part="payload" 
   query="/taskservice:initiateTask/task:task/task:customAttributes/task:customAttributeString2"/> 
</copy>

You might want to edit the data in from and to depending on your exact requirement.

3. Now, once you deploy and test the composite. You will see the two columns 'customAttributeString1' and 'customAttributeString2' populated in your wftask table.




Wednesday, May 16, 2018

Friday, May 11, 2018

Tuesday, May 8, 2018

Java: Comma Separated String to List

    ArrayList<String> convertCommaSprtdStrToList(String commaSprtdStr) {
        ArrayList<String> list = new ArrayList<String>();
       
        if(commaSprtdStr == null || commaSprtdStr.isEmpty())
            return list;
       
        String[] strArr = commaSprtdStr.split(",");
       
        if(commaSprtdStr != null && !commaSprtdStr.isEmpty()) {
            for(String str : strArr) {
                list.add(str.trim());
            }
        }
       
        return list;
    }