Step 2: Load the Parameters

The Workflow Transaction Open Interface can be used for different types of transactions. Parameters are required or optional depending upon the type of transaction you are importing.

To populate the Workflow Transaction Open Interface tables:

  1. Define a PL/SQL procedure, function, or anonymous block to call the following procedure:

  2. See the following sections for the list of parameters used for each type of transaction (or event):

The following is an example of an anonymous PL/SQL block used to insert rows into the interface table for transactions for decisions steps for requests. Note that some optional parameters are not used.

Example: set serveroutput on;
set verify off;
define p_created_username = '&1';
define p_request_number = '&2';
define p_workflow_step_seq = '&3';
define p_visible_result_value = '&4';
declare
      x_message_type number;
      x_message_name VARCHAR2;
      x_message VARCHAR2(1000);
begin
   kwfl_txn_int.insert_row
      (p_event => 'APPROVAL_VOTE',
      p_group_id => left blank,
      p_created_username => '&p_created_username',
      p_source => left blank,
      p_request_number => '&p_request_number',
      p_package_number => left blank,
      p_package_line_seq => left blank,
      Workflow Transaction Open Interface 125
      p_workflow_step_name => left blank,
      p_workflow_step_seq => '&p_workflow_step_seq',
      p_visible_result_value => '&p_visible_result_value',
      p_user_comments => left blank,
      p_delegated_to_username => left blank,
      p_schedule_date => left blank,
      p_to_workflow_step_name => left blank,
      p_to_workflow_step_seq => left blank,
      o_message_type => x_message_type,
      o_message_name => x_message_name,
      o_message => x_message);
   if (x_message_type != KNTA_Constant.SUCCESS) then
      dbms_output.put_line(x_message_name);
      dbms_output.put_line(x_message);
      end if;
end;
/

If the previous code is located in a file called run_interface.sql, the following command would be used (from the command line) to run the code.

sqlplus <username>/<password> @run_interface.sql 'jsmith' '12345' '1' 'Approved'

where <username> and <password> represent the user ID and password for the appropriate PPM database