Friday, 29 November 2013

Java Data Structure Examples

http://www.tutorialspoint.com/java/java_data_structures.htm

The data structures provided by the Java utility package are very powerful and perform a wide range of functions. These data structures consist of the following interface and classes:
  • Enumeration
  • BitSet
  • Vector
  • Stack
  • Dictionary
  • Hashtable
  • Properties

Thursday, 28 November 2013

Using Lookups in OAF

Fetching values from Lookup


//returns lookup description
  public String getLookupDescription(String paramString1, String paramString2)
  {
    HashMap localHashMap = getLookupData(paramString1, paramString2);
    if (null != localHashMap) {
      return (String)localHashMap.get("DESCRIPTION");
    }
    return "";
  }

//returns lookup meaning
 public String getLookupMeaning(String paramString1, String paramString2)
 {
   HashMap localHashMap = getLookupData(paramString1, paramString2);
   if (null != localHashMap) {
     return (String)localHashMap.get("MEANING");
   }
   return "";
 }


//returns HashMap for meaning and Description

   public HashMap getLookupData(String paramString1, String paramString2)
   {
     if ((null == paramString1) || (null == paramString2)) {
       return null;
     }
     ViewObject localViewObject1 = findViewObject("LookupDataVO");
     if (null != localViewObject1) {
       localViewObject1.remove();
     }
     OADBTransactionImpl localOADBTransactionImpl = (OADBTransactionImpl)getOADBTransaction();
     String str1 = localOADBTransactionImpl.getCurrentLanguage();

     String str2 = "select meaning, description from fnd_lookup_values where lookup_type = :1 and lookup_code = :2 and language = :3 ";

   ViewObject localViewObject2 = createViewObjectFromQueryStmt("LookupDataVO", str2);
   localViewObject2.setWhereClauseParam(0, paramString1);
   localViewObject2.setWhereClauseParam(1, paramString2);
   localViewObject2.setWhereClauseParam(2, str1);

   Row localRow = localViewObject2.first();
   HashMap localHashMap = new HashMap();

   if (null != localRow)
   {
     localHashMap.put("MEANING", (String)localRow.getAttribute("MEANING"));
     localHashMap.put("DESCRIPTION", (String)localRow.getAttribute("DESCRIPTION"));
   }
   else
   {
     localHashMap.put("MEANING", "");
     localHashMap.put("DESCRIPTION", "");
   }
   localViewObject2.remove();
   return localHashMap;
 }

Wednesday, 27 November 2013

wf_engine.completeactivity

CREATE PROCEDURE xx_continue_activity (
   errbuf            IN OUT NOCOPY   VARCHAR2,
   errcode           IN OUT NOCOPY   INTEGER,
   p_itemtype        IN              VARCHAR2,
   p_activity_name   IN              VARCHAR2
)
AS
   v_errorname      VARCHAR2 (30);
   v_errormsg       VARCHAR2 (2000);
   v_errorstack     VARCHAR2 (32000);
   invalid_action   EXCEPTION;
   PRAGMA EXCEPTION_INIT (invalid_action, -20002);

   CURSOR c1
   IS
      SELECT item_key
        FROM wf_item_activity_statuses
       WHERE item_type = p_itemtype
         AND activity_status = 'NOTIFIED'
         AND process_activity IN (
                SELECT MAX (instance_id)
                  FROM wf_process_activities
                 WHERE activity_item_type = p_itemtype
                   AND activity_name = p_activity_name);
--AND item_key = 1228692;
BEGIN
   FOR c1_rec IN c1
   LOOP
      BEGIN
         fnd_file.put_line (fnd_file.output,
                            'EXECUTING FOR ITEM-KEY: ' || c1_rec.item_key
                           );
         wf_engine.completeactivity (itemtype      => p_itemtype,
                                     itemkey       => c1_rec.item_key,
                                     activity      => p_activity_name,
                                     --'xx_INSUFF_RESPON_BLOCK',
                                     RESULT        => wf_engine.eng_null
                                    );
         COMMIT;
      EXCEPTION
         WHEN invalid_action
         THEN
            wf_core.get_error (v_errorname, v_errormsg, v_errorstack);
            fnd_file.put_line (fnd_file.LOG, 'ITEM-KEY: ' || c1_rec.item_key);
            fnd_file.put_line (fnd_file.LOG, 'ERROR NAME: ' || v_errorname);
            fnd_file.put_line (fnd_file.LOG, 'ERROR MESSAGE: ' || v_errormsg);
            fnd_file.put_line (fnd_file.LOG, 'ERROR STACK: ' || v_errorstack);
      END;
   END LOOP;
END xx_continue_activity;

Thursday, 19 September 2013

Apache Bounce

Use below commands 

2) cd $ADMIN_SCRIPTS_HOME
3) adapcctl.sh stop
4) adoacorectl.sh stop
5) adapcctl.sh start
6) adoacorectl.sh start

Friday, 17 May 2013

WF: Notification Reassign Mode


WF: Notification Reassign Mode

The WF: Notification Reassign Mode profile option determines the forwarding functionality that is available to employees. If you set the WF: Notification Reassign Mode profile option to Reassign, employees see the Reassign button on the notification. Clicking Reassign lets employees choose between transferring or delegating that notification. 

If you set the WF: Notification Reassign Mode profile option to Delegate, employees will see the Delegate button. When employees click Delegate and enter an employee name, the notification is delegated to the employee whose name is entered.

When a notification is delegated to employees the notification is forwarded to the delegated employee, but the original recipient of the notification remains the owner. 

If you set this option to Transfer, employees will see the Transfer button. When employees click Transfer and enter an employee name the notification is transferred to the whose name is entered. 

When a notification is transferred, the notification is forwarded and the new recipient becomes the owner of the notification.

Note: Assign the WF: Notification Reassign Mode profile option to the workflow responsibility.

Thursday, 25 April 2013

Oracle Workflow - Standard Concurrent Manager Activities


Oracle Workflow - Standard Concurrent Manager Activities

Oracle workflow provides some standard activities for invoking concurrent programs from workflow. The follow gives a sneak peak into the features related to this.


  • Execute Concurrent Program Activity -> Calls FND_WF_STANDARD.EXECUTECONCPROGRAM
    • It submits an Oracle Applications concurrent program from your workflow process and waits for it to complete
  • Submit Concurrent Program Activity -> Calls FND_WF_STANDARD.SUBMITCONCPROGRAM
    • It submits an Oracle Applications concurrent program from your workflow process, but does not wait for it to execute or complete.
  • Wait for Concurrent Program Activity -> Calls FND_WF_STANDARD.WAITFORCONCPROGRAM
    • If you submit a concurrent program from your workflow process, you can use the Wait for Concurrent Program activity as a means of blocking the process from further execution until the concurrent program completes.


Wednesday, 24 April 2013

Oracle Alert


Oracle Alert

1. What are the event alerts?
Triggered off when a particular event occurs in the Database.
Event can be Insert or Update.

2. What are Alert Action Level?
There are two levels of actions that can be performed
Detail Action and Summary Action.

3. What is a Summary Threshold?
Oracle Alerts automatically determine whether to perform a detail action or Summary action based on the number of exceptions in the database.

4. What are the different actions that can be performed in Alerts?
• Message Actions
• Concurrent Program Actions
• Operating Script Actions
• SQL Statement Script Actions

5. What are the steps involved in Creating Periodic alerts?
• Write a select statement
• Verify and Run the SQL
• Specify Alert Inputs
• Define Alert Outputs
• Create Periodic alert actions
• Define Periodic alert message actions
• Create a periodic alert action set
• Check your periodic alert.

6. What is the Distribution List in Alerts?
A Pre-defined set of electronic mail ids and printer Instructions that you can use on message actions instead of re-entering all the recipient names each time.

7. What are the Advance features available in alerts?
• Distribution List
• Periodic sets
• Summary Thresholds
• Action Set Checks

8. What are the four implicit Inputs in Alerts?
Mailid, rowid, org_id, date_last_checked