Monday, December 12, 2011

PLSQL block for Publication process

If there is any issue entering parameters for Concurrent program or if you want to automate your publishing process, go for following plsql block:

DECLARE
  P_API_VERSION NUMBER;
  P_PUBLICATION_ID NUMBER;
  P_USER_ID NUMBER;
  P_RESP_ID NUMBER;
  P_APPL_ID NUMBER;
  X_RUN_ID NUMBER;
  X_STATUS NUMBER;
BEGIN
  P_API_VERSION := 1.0;
  P_PUBLICATION_ID := 64689;
  P_USER_ID := 1001530;  --EBUSINESS
  P_RESP_ID := 22687;  --Oracle Configurator Administrator
  P_APPL_ID := 708; --Configurator

  CZ_MODELOPERATIONS_PUB.PUBLISH_MODEL(
    P_API_VERSION => P_API_VERSION,
    P_PUBLICATION_ID => P_PUBLICATION_ID,
    P_USER_ID => P_USER_ID,
    P_RESP_ID => P_RESP_ID,
    P_APPL_ID => P_APPL_ID,
    X_RUN_ID => X_RUN_ID,
    X_STATUS => X_STATUS
  );
  DBMS_OUTPUT.PUT_LINE('X_RUN_ID = ' || X_RUN_ID);
  DBMS_OUTPUT.PUT_LINE('X_STATUS = ' || X_STATUS);
END;

Ensure you enable dbms output to check the return status.
Successful submission would return 0 as x_status.
You can also check in Configurator Developer  >  Publication tab for this publication, it should show as Complete.

P.S. All Configurator process APIs are listed in Implementation Guide of Configurator.
Change user_id, resp_id, appl_id as per your requirement.
For errors, refer cz_db_logs table.

3 comments:


  1. For businesses looking to enhance their product offerings, exploring innovative printing techniques can make a significant difference. Many companies are now turning to local dtf printing to achieve high-quality, vibrant designs on a variety of surfaces. This method not only ensures durability but also provides cost-effective solutions for short-run and custom orders. By utilizing services like local dtf printing, brands can stand out in a competitive market and meet customer demands efficiently.

    ReplyDelete