OIM API To Updating Access Policy Form Data


package com.provision;

import java.util.HashMap;
import java.util.Map;

import com.connection.Platform;

import Thor.API.tcResultSet;
import Thor.API.Exceptions.tcAPIException;
import Thor.API.Exceptions.tcColumnNotFoundException;
import Thor.API.Exceptions.tcFormNotFoundException;
import Thor.API.Exceptions.tcInvalidValueException;
import Thor.API.Exceptions.tcNotAtomicProcessException;
import Thor.API.Exceptions.tcProcessNotFoundException;
import Thor.API.Exceptions.tcRequiredDataMissingException;
import Thor.API.Operations.tcFormInstanceOperationsIntf;

public class UpdatingAccessPolicyFormData {

 public static void main(String[] args) throws tcAPIException, tcNotAtomicProcessException, tcFormNotFoundException, tcProcessNotFoundException, tcInvalidValueException, tcRequiredDataMissingException{
  
  
   tcFormInstanceOperationsIntf formInstanceIntf = Platform.getService(tcFormInstanceOperationsIntf.class);   
   
   long processInstanceKey= 793L;
     tcResultSet trs = formInstanceIntf.getProcessFormData(processInstanceKey);
     int count=trs.getRowCount();
     for(int i=0;i<count;i++){
                     trs.goToRow(i);
      
             String columnNames[] = trs.getColumnNames();
             for (String string : columnNames) 
             {
                 try {
                     System.out.println(string + " - " + trs.getStringValue(string));
                 } catch (tcAPIException | tcColumnNotFoundException e)
                {
                     e.printStackTrace();
                 }
             }
     }
     
     // Updating the For Column.
     String adColumnName="UD_ADUSER_ZIP";
     Map updateData=new HashMap();
     updateData.put(adColumnName, "1234");
     formInstanceIntf.setProcessFormData(processInstanceKey, updateData);
 }
 
}

No comments:

Post a Comment

About OIM

Oracle Identity Management enables organizations to effectively manage the end - to - end life - cycle of user ide...

Popular Posts