DBA Data[Home] [Help]

APPS.AZW_PROC SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 36

  PROCEDURE update_hierarchy_status(p_item_type    IN VARCHAR2,
                                    p_process_name IN VARCHAR2,
                                    p_context_id   IN VARCHAR2);
Line: 54

  	  SELECT azg1.group_id
          INTO   v_parent_gr_id
          FROM   az_groups azg1, az_groups azg2
          WHERE  azg2.group_id = p_parent_id
	  AND	 azg1.process_type = azg2.process_type
	  AND	 azg1.process_type = g_current_mode
          AND    azg1.group_id = azg2.hierarchy_parent_id;
Line: 76

     fnd_message.set_token('AZW_ERROR_STMT','select group_id from az_groups');
Line: 129

    SELECT count(*)
    INTO v_cnt
    FROM  az_processes ap
    WHERE    ap.item_type = proc.item_type
    AND    ap.process_name = proc.process_name
    AND    ap.context_id = p_ctx_id;
Line: 150

        fnd_message.set_token('AZW_ERROR_STMT','select count(*) from az_processes');
Line: 397

	     SELECT parent_id
	     INTO v_process_parent_id
	     FROM az_processes
		 WHERE item_type    = v_process_item_type
		 AND   process_name = v_process_name
		 AND   context_id   = v_process_ctxt_id;
Line: 409

	     fnd_message.set_token('AZW_ERROR_STMT','select parent_id from az_processes');
Line: 421

	     SELECT color_code
	     INTO   v_group_color
	     FROM   az_groups
	     WHERE  group_id = v_process_parent_id
		 AND    process_type = g_current_mode;
Line: 435

	     fnd_message.set_token('AZW_ERROR_STMT','select color_code from az_groups');
Line: 495

      SELECT waav.text_default
      INTO   v_ctxt_type
      FROM   wf_activity_attributes_vl waav
      WHERE  waav.activity_item_type = p_item_type
      AND    waav.activity_name      = p_process_name
      AND    waav.name               = 'AZW_IA_CTXTYP'
      AND    waav.activity_version =
             (SELECT MAX(activity_version)
              FROM   wf_activity_attributes_vl
              WHERE  activity_item_type = p_item_type
              AND    activity_name      = p_process_name
              AND    name               = 'AZW_IA_CTXTYP');
Line: 517

     fnd_message.set_token('AZW_ERROR_STMT','select text_default from wf_activity_attributes_vl');
Line: 538

     SELECT sql_statement
     INTO   sqlstatement
     FROM   az_contexts_sql
     WHERE  context = ctx_type
     AND    purpose = 'GET_NAME';
Line: 588

	      SELECT   name INTO v_ctxt_name
	      FROM     per_business_groups
	      WHERE    date_from < SYSDATE
	      AND      (date_to IS NULL
	      OR        date_to > SYSDATE)
	      AND      organization_id = ctx_id;
Line: 600

	     fnd_message.set_token('AZW_ERROR_STMT','select name from per_business_groups');
Line: 606

	      SELECT   organization_name INTO v_ctxt_name
	      FROM     org_organization_definitions
	      WHERE    user_definition_enable_date < SYSDATE
	      AND      (disable_date IS NULL
	      OR        disable_date > SYSDATE)
	      AND      organization_id = ctx_id;
Line: 618

	     fnd_message.set_token('AZW_ERROR_STMT','select name from org_organization_definitions');
Line: 624

	      SELECT   name INTO v_ctxt_name
	      FROM     hr_operating_units
	      WHERE    organization_id = ctx_id
	      AND       date_from < SYSDATE
	      AND      (date_to IS NULL
	      OR        date_to > SYSDATE);
Line: 636

	     fnd_message.set_token('AZW_ERROR_STMT','select name from hr_operating_units');
Line: 642

	      SELECT   name INTO v_ctxt_name
	      FROM     gl_sets_of_books
	      WHERE    set_of_books_id = ctx_id;
Line: 651

	     fnd_message.set_token('AZW_ERROR_STMT','select name from gl_sets_of_books');
Line: 664

	     fnd_message.set_token('AZW_ERROR_STMT','select name from sy_orgn_mst');
Line: 701

      SELECT   application_name
      INTO     v_application_name
      FROM     fnd_application_vl
      WHERE    application_id = appl_id;
Line: 721

     	fnd_message.set_token('AZW_ERROR_STMT','select application_name from fnd_application_vl');
Line: 739

      SELECT   meaning
      INTO     v_meaning
      FROM     fnd_lookups
      WHERE    lookup_type = 'AZ_PROCESS_GROUPS'
      AND      lookup_code = code;
Line: 759

     	fnd_message.set_token('AZW_ERROR_STMT','select meaning from fnd_lookups');
Line: 776

            select distinct language_code, nls_language
            into v_language_code, v_language
            from fnd_languages
            where NLS_LANGUAGE =
              SUBSTR(USERENV('LANGUAGE'), 1, INSTR(USERENV('LANGUAGE'), '_')-1);
Line: 790

                fnd_message.set_token('AZW_ERROR_STMT','select language_code ..
from fnd_languages');
Line: 796

	    SELECT      substr(text, 1, 8)
	    INTO        v_days
	    FROM        wf_resources
	    WHERE       language = v_language_code
	    AND         type     = 'WFTKN'
	    AND         name     = 'DAYS';
Line: 808

	     fnd_message.set_token('AZW_ERROR_STMT','select into v_days');
Line: 813

	    SELECT      substr(text, 1, 8)
	    INTO        v_done
	    FROM        wf_resources
	    WHERE       language = v_language_code
	    AND         type     = 'WFTKN'
	    AND         name     = 'WFMON_DONE';
Line: 825

	     fnd_message.set_token('AZW_ERROR_STMT','select into v_done');
Line: 830

	    SELECT      substr(text, 1, 8)
	    INTO        v_skip
	    FROM        wf_resources
	    WHERE       language = v_language_code
	    AND         type     = 'WFTKN'
	    AND         name     = 'WFMON_SKIP';
Line: 842

	     fnd_message.set_token('AZW_ERROR_STMT','select into v_skip');
Line: 859

      SELECT   organization_id, name
      FROM     per_business_groups
      WHERE    date_from < SYSDATE
      AND      (date_to IS NULL
      OR        date_to > SYSDATE)
      ORDER BY organization_id;
Line: 867

      SELECT   organization_id, organization_name
      FROM     org_organization_definitions
      WHERE    user_definition_enable_date < SYSDATE
      AND      (disable_date IS NULL
      OR        disable_date > SYSDATE)
      ORDER BY organization_id;
Line: 875

      SELECT   organization_id, name
      FROM     hr_operating_units
      WHERE    date_from < SYSDATE
      AND      (date_to IS NULL
      OR        date_to > SYSDATE)
      ORDER BY organization_id;
Line: 883

      SELECT   set_of_books_id, name
      FROM     gl_sets_of_books
      ORDER BY set_of_books_id;
Line: 980

		SELECT sql_statement
      		INTO   sqlstatement
      		FROM   az_contexts_sql
		WHERE  context = ctx_type
     		AND    purpose = 'POPULATE';
Line: 1059

      SELECT  distinct azpf.item_type, azpf.process_name, azpf.parent_id,
              azpf.context_type, azpf.display_order, azpf.process_type
      FROM     az_product_flows azpf, fnd_product_installations fpi
      WHERE   azpf.application_id = fpi.application_id
      AND     fpi.status = 'I';
Line: 1097

  PROCEDURE insert_az_processes(proc IN process_rec_t,ctxts IN context_tbl_t) IS

  BEGIN

    FOR j IN 1..ctxts.COUNT LOOP

      IF process_not_found(proc, ctxts(j).context_id) THEN
	   BEGIN
	        INSERT INTO az_processes(item_type, process_name, context_id,
                                 display_order, complete_flag,
                                 context_type, context_name, comments,parent_id,
				 status_code, process_type)
       		VALUES (proc.item_type, proc.process_name,
               		 ctxts(j).context_id, proc.display_order, 'N', proc.context_type,
                	 ctxts(j).context_name, NULL, proc.parent_id,
			 'N', proc.process_type);
Line: 1123

		fnd_message.set_token('AZW_ERROR_PROC','azw_proc.insert_az_processes(param1, param2)');
Line: 1124

		fnd_message.set_token('AZW_ERROR_STMT','insert into az_processes');
Line: 1130

		UPDATE az_processes
		SET    context_name = ctxts(j).context_name
		WHERE  item_type = proc.item_type
		AND    process_name = proc.process_name
		AND    context_id = ctxts(j).context_id
		AND    context_name <>  ctxts(j).context_name;
Line: 1141

		fnd_message.set_token('AZW_ERROR_PROC','azw_proc.insert_az_processes(param1, param2)');
Line: 1142

		fnd_message.set_token('AZW_ERROR_STMT','update az_processes');
Line: 1156

	fnd_message.set_token('AZW_ERROR_PROC','azw_proc.insert_az_processes(param1, param2)');
Line: 1160

  END insert_az_processes;
Line: 1172

  PROCEDURE insert_az_processes(proc IN process_rec_t) IS

  BEGIN

    IF process_not_found(proc, -1) THEN
	BEGIN
	      INSERT INTO az_processes (item_type, process_name, context_id,
			display_order, complete_flag,
			context_type, context_name, comments, parent_id,
			status_code, process_type)
	      VALUES (proc.item_type, proc.process_name, -1, proc.display_order, 'N',
		      'NONE', NULL, NULL, proc.parent_id,
			'N', proc.process_type);
Line: 1190

		fnd_message.set_token('AZW_ERROR_PROC','azw_proc.insert_az_processes(param1)');
Line: 1191

		fnd_message.set_token('AZW_ERROR_STMT','insert into az_processes');
Line: 1210

	fnd_message.set_token('AZW_ERROR_PROC','azw_proc.insert_az_processes(param1)');
Line: 1214

  END insert_az_processes;
Line: 1235

         insert_az_processes(processes(i), bg_ctx);
Line: 1237

         insert_az_processes(processes(i), io_ctx);
Line: 1239

         insert_az_processes(processes(i), ou_ctx);
Line: 1241

         insert_az_processes(processes(i), sob_ctx);
Line: 1243

         insert_az_processes(processes(i), opmcom_ctx);
Line: 1245

         insert_az_processes(processes(i), opmorg_ctx);
Line: 1247

         insert_az_processes(processes(i));
Line: 1278

     SELECT sql_statement
     INTO   sqlstatement
     FROM   az_contexts_sql
     WHERE  context = ctx_type
     AND    purpose = 'DELETE';
Line: 1323

      SELECT  ap.item_type, ap.process_name, ap.context_id
      FROM    az_processes ap,
              per_business_groups pbg
      WHERE   ap.context_type = 'BG'
      AND     ap.process_type = g_current_mode
      AND     ap.context_id > -1
      AND     ap.context_id = pbg.organization_id
      AND     (pbg.date_to IS NOT NULL
      AND      pbg.date_from IS NOT NULL
      AND      (pbg.date_from > SYSDATE
      OR        pbg.date_to < SYSDATE));
Line: 1336

      SELECT  ap.item_type, ap.process_name, ap.context_id
      FROM    az_processes ap,
              org_organization_definitions ood
      WHERE   ap.context_type = 'IO'
      AND     ap.process_type = g_current_mode
      AND     ap.context_id > -1
      AND     ap.context_id = ood.organization_id
      AND     (ood.user_definition_enable_date IS NOT NULL
      AND      ood.disable_date IS NOT NULL
      AND      (ood.user_definition_enable_date > SYSDATE
      OR        ood.disable_date < SYSDATE));
Line: 1349

      SELECT  ap.item_type, ap.process_name, ap.context_id
      FROM    az_processes ap,
              hr_operating_units hou
      WHERE   ap.context_type = 'OU'
      AND     ap.process_type = g_current_mode
      AND     ap.context_id > -1
      AND     ap.context_id = hou.organization_id
      AND     (hou.date_from IS NOT NULL
      AND      hou.date_to IS NOT NULL
      AND      (hou.date_from > SYSDATE
      OR        hou.date_to < SYSDATE));
Line: 1364

      DELETE from az_processes
      WHERE  context_type = 'BG'
      AND    context_id not in
             ( select distinct organization_id
               from per_business_groups);
Line: 1370

      DELETE from az_processes
      WHERE  context_type = 'IO'
      AND    context_id not in
             ( select distinct organization_id
               from org_organization_definitions);
Line: 1376

      DELETE from az_processes
      WHERE  context_type = 'OU'
      AND    context_id not in
             ( select distinct organization_id
               from hr_operating_units);
Line: 1387

	    SELECT COUNT(*)
	    INTO  cnt
	    FROM  az_processes;
Line: 1396

	    fnd_message.set_token('AZW_ERROR_STMT','select count(*) from az_processes');
Line: 1403

		DELETE from az_processes ap
		WHERE  ap.item_type = invalid_process.item_type
		AND    ap.process_name = invalid_process.process_name
		AND    ap.context_id = invalid_process.context_id;
Line: 1428

		DELETE from az_processes ap
		WHERE  ap.item_type = invalid_process.item_type
		AND    ap.process_name = invalid_process.process_name
		AND    ap.context_id = invalid_process.context_id;
Line: 1453

		DELETE from az_processes ap
		WHERE  ap.item_type = invalid_process.item_type
		AND    ap.process_name = invalid_process.process_name
		AND    ap.context_id = invalid_process.context_id;
Line: 1520

	    select distinct language_code, nls_language
	    into v_language_code, v_language
	    from fnd_languages
	    where NLS_LANGUAGE =
	      SUBSTR(USERENV('LANGUAGE'), 1, INSTR(USERENV('LANGUAGE'), '_')-1);
Line: 1531

	    fnd_message.set_token('AZW_ERROR_STMT','select language_code .. from fnd_languages');
Line: 1548

	group_status_tbl.delete;
Line: 1555

    		update_hierarchy_status(group_status_tbl(i).item_type,
					group_status_tbl(i).process_name,
					group_status_tbl(i).context_id);
Line: 1560

	group_status_tbl.delete;
Line: 1567

    		update_hierarchy_status(group_status_tbl(i).item_type,
					group_status_tbl(i).process_name,
					group_status_tbl(i).context_id);
Line: 1593

  PROCEDURE update_process_phase(node_id IN VARCHAR2, value IN NUMBER) IS

    p_type  az_processes.item_type%TYPE;
Line: 1605

    UPDATE az_processes ap
    SET    ap.phase = value
    WHERE  ap.item_type = p_type
    AND    ap.process_name = p_name
    AND    ap.context_id = TO_NUMBER(ctx_id);
Line: 1617

  END update_process_phase;
Line: 1627

  PROCEDURE update_process_comments(node_id IN VARCHAR2, value IN VARCHAR2) IS

    p_type  az_processes.item_type%TYPE;
Line: 1639

	    UPDATE az_processes ap
	    SET    ap.comments     = value
	    WHERE  ap.item_type    = p_type
	    AND    ap.process_name = p_name
	    AND    ap.context_id   = TO_NUMBER(ctx_id);
Line: 1651

    	    fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_process_comments');
Line: 1664

        fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_process_comments');
Line: 1667

  END update_process_comments;
Line: 1679

  PROCEDURE update_groups_status(p_group_id IN VARCHAR2) IS

    v_parent_id  az_groups.group_id%TYPE;
Line: 1687

	    SELECT ag.hierarchy_parent_id
	    INTO   v_parent_id
	    FROM   az_groups ag
	    WHERE  ag.group_id = p_group_id
	    AND    ag.process_type = g_current_mode;
Line: 1699

	     fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_groups_status');
Line: 1700

	     fnd_message.set_token('AZW_ERROR_STMT','select hierarchy_parent_id from az_groups');
Line: 1707

	      SELECT COUNT(*)
	      INTO   v_total_kids
	      FROM   az_groups ag
	      WHERE  ag.hierarchy_parent_id = v_parent_id
	      AND    ag.process_type = g_current_mode;
Line: 1717

	     fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_groups_status');
Line: 1718

	     fnd_message.set_token('AZW_ERROR_STMT','select count(*) into v_total_kids from az_groups');
Line: 1723

	      SELECT COUNT(*)
	      INTO   v_cnt
	      FROM   az_groups ag
	      WHERE  ag.hierarchy_parent_id = v_parent_id
	      AND    ag.process_type = g_current_mode
	      AND    ag.complete_flag <> 'Y';
Line: 1734

	     fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_groups_status');
Line: 1735

	     fnd_message.set_token('AZW_ERROR_STMT','select count(*) into v_cnt from az_groups');
Line: 1741

		UPDATE az_groups
		SET    complete_flag = 'Y'
		WHERE  group_id = v_parent_id
		AND    process_type = g_current_mode;
Line: 1751

	     fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_groups_status');
Line: 1752

	     fnd_message.set_token('AZW_ERROR_STMT','update az_groups set complete_flag = Y');
Line: 1757

		SELECT ag.hierarchy_parent_id
		INTO   v_parent_id
		FROM   az_groups ag
		WHERE  ag.group_id = v_parent_id
		AND    ag.process_type = g_current_mode;
Line: 1767

	     fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_groups_status');
Line: 1768

	     fnd_message.set_token('AZW_ERROR_STMT','select hierarchy_parent_id from az_groups');
Line: 1776

		  UPDATE az_groups
		  SET    complete_flag = 'N'
		  WHERE  group_id = v_parent_id
		  AND    process_type = g_current_mode;
Line: 1786

	        fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_groups_status');
Line: 1787

	        fnd_message.set_token('AZW_ERROR_STMT','update az_groups set complete_flag = N');
Line: 1792

		  SELECT ag.hierarchy_parent_id
		  INTO   v_parent_id
		  FROM   az_groups ag
		  WHERE  ag.group_id = v_parent_id
		  AND    ag.process_type = g_current_mode;
Line: 1802

	         fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_groups_status');
Line: 1803

	     	 fnd_message.set_token('AZW_ERROR_STMT','select hierarchy_parent_id from az_groups');
Line: 1820

	 fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_groups_status');
Line: 1824

  END update_groups_status;
Line: 1834

  PROCEDURE update_hierarchy_status(p_item_type    IN VARCHAR2,
                                    p_process_name IN VARCHAR2,
                                    p_context_id   IN VARCHAR2) IS

    v_group_id az_groups.group_id%TYPE;
Line: 1844

	    SELECT ap.parent_id
	    INTO   v_group_id
	    FROM   az_processes ap
	    WHERE  ap.item_type    = p_item_type
	    AND    ap.process_name = p_process_name
	    AND    ap.process_type = g_current_mode
	    AND    ap.context_id   = p_context_id;
Line: 1858

	     fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_hierarchy_status');
Line: 1859

	     fnd_message.set_token('AZW_ERROR_STMT','select parent_id from az_processes');
Line: 1867

		    SELECT COUNT(*)
		    INTO   v_cnt
		    FROM   az_processes ap
		    WHERE  ap.status_code <> 'C'
		    AND    ap.process_type = g_current_mode
		    AND    ap.parent_id      = v_group_id;
Line: 1878

		     fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_hierarchy_status');
Line: 1879

		     fnd_message.set_token('AZW_ERROR_STMT','select count(*) from az_processes');
Line: 1890

		    UPDATE az_groups ag
		    SET    ag.complete_flag = v_status
		    WHERE  ag.group_id = v_group_id
		    AND    ag.process_type = g_current_mode;
Line: 1900

		     fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_hierarchy_status');
Line: 1901

		     fnd_message.set_token('AZW_ERROR_STMT','update az_groups set complete_flag');
Line: 1905

		    -- update groups complete status, starting with the leaf group id
		    update_groups_status(v_group_id);
Line: 1918

     fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_hierarchy_status');
Line: 1921

  END update_hierarchy_status;
Line: 1930

  PROCEDURE update_process_status(node_id IN VARCHAR2, value IN VARCHAR2) IS

    p_type  az_processes.item_type%TYPE;
Line: 1942

	    SELECT count(*)
	    INTO   v_count
	    FROM   wf_items wfi, wf_item_attribute_values wiav
	    WHERE  wfi.item_type = p_type
	    AND    wfi.root_activity = p_name
	    AND    wiav.item_type = p_type
	    AND    wiav.item_key = wfi.item_key
	    AND    wiav.name = 'AZW_IA_CTXT_ID'
	    AND    wiav.text_value = ctx_id;
Line: 1956

	     fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_process_status');
Line: 1957

	     fnd_message.set_token('AZW_ERROR_STMT','select count(*) into v_count from wf_items,wf_item_attribute_values');
Line: 1963

	     UPDATE az_processes ap
	     SET    ap.status_code   = value
	     WHERE  ap.item_type     = p_type
	     AND    ap.process_name  = p_name
	     AND    ap.context_id    = TO_NUMBER(ctx_id);
Line: 1974

	     fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_process_status');
Line: 1975

	     fnd_message.set_token('AZW_ERROR_STMT','update az_processes set status_code = value');
Line: 1981

	      	UPDATE az_processes ap
	      	SET    ap.status_code   = 'A'
	      	WHERE  ap.item_type     = p_type
	      	AND    ap.process_name  = p_name
	      	AND    ap.context_id    = TO_NUMBER(ctx_id);
Line: 1992

	        fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_process_status');
Line: 1993

	        fnd_message.set_token('AZW_ERROR_STMT','update az_processes set status_code = A');
Line: 1998

	        UPDATE az_processes ap
	        SET    ap.status_code   = 'N'
	        WHERE  ap.item_type     = p_type
	        AND    ap.process_name  = p_name
	        AND    ap.context_id    = TO_NUMBER(ctx_id);
Line: 2008

	        fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_process_status');
Line: 2009

	        fnd_message.set_token('AZW_ERROR_STMT','update az_processes set status_code = N');
Line: 2015

    update_hierarchy_status(p_type, p_name, ctx_id);
Line: 2025

     fnd_message.set_token('AZW_ERROR_PROC','azw_proc.update_process_status');
Line: 2026

     fnd_message.set_token('AZW_ERROR_STMT','select into v_ctx_id');
Line: 2028

  END update_process_status;
Line: 2054

    select AZ_WF_ITEMKEY_S.nextval into itemkey from dual;
Line: 2101

      		AZW_UTIL.UpdateDocUrl(p_itemtype, p_workflow);
Line: 2151

      SELECT    round( months_between(sysdate, wfi.begin_date)* 31),
                wias.activity_status
      FROM      wf_items wfi, wf_process_activities  wpa,
                wf_item_activity_statuses wias
      WHERE     wfi.item_type = p_type
      AND       wfi.root_activity = p_name
      AND       wfi.item_key = p_key
      AND       wias.item_type = wfi.item_type
      AND       wias.item_key = wfi.item_key
      AND       wpa.instance_id = wias.process_activity
      AND       wpa.activity_name = wfi.root_activity
      AND       wpa.process_item_type =p_type
      AND       wpa.process_name = 'ROOT';
Line: 2166

      SELECT    wav.display_name,
                wias.begin_date
      FROM      wf_process_activities wpa, wf_item_activity_statuses wias,
                wf_activities_vl wav
      WHERE     wias.item_type = p_type
      AND       wias.item_key = p_key
      AND       wias.process_activity = wpa.instance_id
      AND       wpa.activity_name = wav.name
      AND       wpa.activity_item_type = wav.item_type
      AND       wpa.process_name <> 'ROOT'
      AND       wpa.activity_name <> 'START'
      AND       wav.begin_date is not NULL
      AND       wav.end_date is NULL
      AND       wav.type = 'NOTICE'
      ORDER BY  wias.begin_date desc;
Line: 2183

      SELECT COUNT(*)
      FROM   wf_item_activity_statuses wias, wf_notification_attributes wna,
             wf_notifications wn
      WHERE  wias.item_type = p_type
      AND    wias.item_key = p_key
      AND    wias.notification_id IS NOT NULL
      AND    wna.notification_id = wias.notification_id
      AND    wn.notification_id = wna.notification_id
      AND    wn.status = 'CLOSED'
      AND    wna.name = 'RESULT'
      AND    wna.text_value LIKE '%DONE%';
Line: 2196

      SELECT COUNT(*)
      FROM   wf_item_activity_statuses wias, wf_notification_attributes wna,
             wf_notifications wn
      WHERE  wias.item_type = p_type
      AND    wias.item_key = p_key
      AND    wias.notification_id is not NULL
      AND    wna.notification_id = wias.notification_id
      AND    wn.notification_id = wna.notification_id
      AND    wn.status = 'CLOSED'
      AND    wna.name = 'RESULT'
      AND    wna.text_value like '%SKIP%';
Line: 2276

      SELECT    wav.display_name,
                wias.begin_date
      FROM      wf_process_activities wpa, wf_item_activity_statuses wias,
                wf_activities_vl wav
      WHERE     wias.item_type = p_type
      AND       wias.item_key = v_new_task_key
      AND       wias.process_activity = wpa.instance_id
      AND       wpa.activity_name = wav.name
      AND       wpa.activity_item_type = wav.item_type
      AND       wpa.process_name <> 'ROOT'
      AND       wpa.activity_name <> 'START'
      AND       wav.type = 'NOTICE'
      AND       wav.end_date is NULL
      AND       wav.begin_date is not NULL
      ORDER BY  wias.begin_date desc;
Line: 2359

	      SELECT 	distinct organization_code, chart_of_accounts_id
	      INTO 	org_code, coa_id
	      FROM   	org_access_view
	      WHERE  	organization_id = ctx_id;
Line: 2370

	     fnd_message.set_token('AZW_ERROR_STMT','select organization_code from org_access_view');
Line: 2377

   /* Now update the status */
    update_process_status(node_id, 'A');
Line: 2522

  SELECT   wias.activity_status
  FROM     wf_items wfi, wf_process_activities  wpa,
           wf_item_activity_statuses wias
  WHERE     wfi.item_type = v_type
  AND       wfi.root_activity = p_name
  AND       wfi.item_key = v_key
  AND       wias.item_type = wfi.item_type
  AND       wias.item_key = wfi.item_key
  AND       wpa.instance_id = wias.process_activity
  AND       wpa.activity_name = wfi.root_activity
  AND       wpa.process_item_type =v_type
  AND       wpa.process_name = 'ROOT';
Line: 2575

            SELECT ap.item_type, ap.process_name, ap.context_id
            FROM   az_processes ap,wf_items wfi, wf_item_attribute_values wiav
            WHERE  wfi.item_type = ap.item_type
            AND    wfi.root_activity = ap.process_name
            AND    wiav.item_type = wfi.item_type
            AND    wiav.item_key = wfi.item_key
            AND    wiav.name = 'AZW_IA_CTXT_ID'
            AND    wiav.text_value = ap.context_id
            AND    ap.complete_flag = 'N';
Line: 2599

	     UPDATE az_processes
	     SET    status_code = 'A'
	     WHERE  item_type = p_item_type
	     AND    process_name = p_process_name
	     AND    context_id  = p_context_id;
Line: 2620

	-- Update all 'Complete' processes

	   UPDATE az_processes
	   SET    status_code = 'C'
	   WHERE  complete_flag = 'Y';
Line: 2631

	     fnd_message.set_token('AZW_ERROR_STMT','update az_processes status code C');
Line: 2636

	-- Update all 'Not Started' Processes

	   UPDATE az_processes
	   SET    status_code = 'N'
	   WHERE  status_code NOT IN ('A', 'C');
Line: 2647

	     fnd_message.set_token('AZW_ERROR_STMT','update az_processes status code N');
Line: 2678

      SELECT distinct wi.item_type, wi.item_key
      FROM   wf_items wi
      WHERE  wi.item_type like 'AZW%'
      AND    wi.end_date is NULL;
Line: 2739

  SELECT COUNT(*) INTO v_count
  FROM   az_tasks_v
  WHERE  item_type = v_type
    AND  root_activity = v_name
    AND  status = 'A';
Line: 2757

     fnd_message.set_token('AZW_ERROR_STMT','SELECT COUNT(*) FROM AZ_TASKS_V');