17 Workflows

This is a public interface for Workflow-related operations, including creating, modifying, and removing Workflows.

This chapter contains the following section:

Create and Modify Workflows

This section contains the following topics:

Create a Workflow

Use this API to create a Workflow definition or instance.

Name

CDR_PUB_DF_WORKFLOW.CreateWorkFlow

Signature

PROCEDURE CREATEWORKFLOW( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_SOURCECDRNAMING  IN OUT    CDR_NAMING_VERSION_OBJ_TYPE, 
  PI_CREATEOBJECT  IN    VARCHAR2, 
  PI_INSTANCE_SUBTYPE_ID  IN    CDR_NAMINGS.OBJECT_SUBTYPE_ID%TYPE, 
  PI_DEFCLASSIFICATIONCOLL  IN    CDR_CLASSIFICATIONS_COLL, 
  PI_INSTCLASSIFICATIONCOLL  IN    CDR_CLASSIFICATIONS_COLL 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PIO_SOURCECDRNAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes.

    For OBJECT_TYPE_RC enter $OBJTYPES$WORKFLOW if you are creating a definition only; $OBJTYPES$WORKFLOWREF if you are creating an instance of an existing definition; and also if you are creating a new definition and an instance of it.

  • PI_CREATEOBJECT (Mandatory) Enter DEFN to create a definition only; INST to create an instance of an existing definition; or BOTH to create a new definition and an instance of it.

    Valid parameters are: Definition—DEFN, instance—INST, both —BOTH.

  • PI_INSTANCE_SUBTYPE_ID (Optional) If you are creating a new instance, enter the ID for the subtype you want to give the instance.

    If you are creating a definition only, do not enter a value for this parameter.

  • PI_DEFCLASSIFICATIONCOLL (Optional) By default the new definition is classified according to the subtype you assigned it in the CDR_NAMING_VERSION_OBJ_TYPE.

    If you want to override the default classifications for one or more classification levels, use this parameter. This is a collection of CDR_CLA_OBJ_TYPEs, which have 5 attributes, including CLA_LEVEL_ID and CLASSIFICATION_ID.

    If you want the definition to inherit its classifications for a particular level from its parent, enter the classification level ID and, for the CLASSIFICATION_ID, enter 0 (zero). If you want to explicitly assign one or more terms for a particular level, initialize a CDR_CLA_OBJ_TYPE for each term, entering the classification level ID and, for the CLASSIFICATION_ID, the term ID. The PAR_ attributes are not relevant to Workflow definitions. Do not enter any values for them.

  • PI_INSTCLASSIFICATIONCOLL (Optional) By default the new instance is classified according to the subtype you assigned it in the PI_INSTANCE_SUBTYPE_ID.

    If you want to override the default classifications for one or more classification levels, use this parameter. This is a collection of CDR_CLA_OBJ_TYPEs, which have 5 attributes, including CLA_LEVEL_ID and CLASSIFICATION_ID.

    If you want the instance to inherit its classifications for a particular level from its parent Work Area, enter the classification level ID and, for the CLASSIFICATION_ID, enter 0 (zero).

    If you want to explicitly assign one or more terms for a particular level, initialize a CDR_CLA_OBJ_TYPE for each term, entering the classification level ID and, for the CLASSIFICATION_ID, the term ID. The PAR_ attributes are not relevant to Workflows. Do not enter any values for them. If you are not creating a new instance, do not enter values here.

Check Out a Workflow Definition

Use this API to check out a Workflow definition.

Name

CDR_PUB_DF_WORKFLOW.CheckOutWorkFlow

Signature

PROCEDURE CHECKOUTWORKFLOW( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_CDRWORKFLOW  IN OUT    CDR_BASE_OBJ_TYPE, 
  PI_COMMENT  IN    VARCHAR2, 
  PI_ISINSTONLY  IN    VARCHAR2, 
  PI_OPTYPE  IN    VARCHAR2 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PIO_CDRWORKFLOW [Mandatory] This is a parameter of table type CDR_BASE_OBJ_TYPE. Enter values to identify the Workflow definition that you want to check in.

    The following attributes are mandatory: COMPANY_ID, OBJECT_ID, OBJECT_VER, NAMESPACE_OBJ_ID, NAMESPACE_OBJ_VER, OBJECT_VERSION_NUMBER. Initialize these attributes in CDR_BASE_OBJ_TYPE.

  • PI_COMMENT [Optional] Enter the reason for checking out the Workflow definition.
  • PI_ISINSTONLY (Mandatory) Enter $YESNO$NO. (The $YESNO$YES setting is used internally only.)
  • PI_OPTYPE (Mandatory) Enter NULL for this parameter.

Create a Workflow Transition

Use this API to create a Workflow transition. A Workflow transition connects two Workflow activities.

Name

CDR_PUB_DF_WORKFLOW.CreateWfTransition

Signature

PROCEDURE CREATEWFTRANSITION( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_SOURCECDRNAMING  IN OUT    CDR_NAMING_VERSION_OBJ_TYPE, 
  PI_CDRWFTRANSITION  IN OUT    CDR_WMG_TRANS_OBJ_TYPE 
);

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PIO_SOURCECDRNAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes.

    For OBJECT_TYPE_RC enter $OBJTYPES$WORKFLOW if you are creating a definition only; $OBJTYPES$WORKFLOWREF if you are creating an instance of an existing definition; and also if you are creating a new definition and an instance of it.

  • PI_CDRWFTRANSITION The Object ID and Version of the two Workflow activities being connected through this transition should be populated in the CDR_WMG_TRANS_OBJ_TYPE.

    In the CONDITION_RC attribute, specify the activity condition based on which the workflow transitions to the other specified activity.

    The possible values are $WFTRANSITIONS$NONE, $WFTRANSITIONS$SUCCESS, $WFTRANSITIONS$ERROR,$WFTRANSITIONS$WARNING

Create a Workflow Structure Instance

Use this API to create a Workflow Structure. These are the Workflow structures: And, Or, Start, End_Success, End_Warning, End_Error, and Fork.

Name

CDR_PUB_DF_WORKFLOW.CreateWfStructref

Signature

PROCEDURE CREATEWFSTRUCTREF( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_SOURCECDRNAMING  IN OUT    CDR_NAMING_VERSION_OBJ_TYPE 
);

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PIO_SOURCECDRNAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes.

For OBJECT_TYPE_RC enter $OBJTYPES$WORKFLOW if you are creating a definition only; $OBJTYPES$WORKFLOWREF if you are creating an instance of an existing definition; and also if you are creating a new definition and an instance of it.

Modify a Workflow

Name

CDR_PUB_DF_WORKFLOW.ModifyWorkFlow

Signature

PROCEDURE MODIFYWORKFLOW( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_SOURCECDRNAMING  IN OUT    CDR_NAMING_VERSION_OBJ_TYPE 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

PIO_SOURCECDRNAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes.

For OBJECT_TYPE_RC enter $OBJTYPES$WORKFLOW if you are creating a definition only; $OBJTYPES$WORKFLOWREF if you are creating an instance of an existing definition; and also if you are creating a new definition and an instance of it.

Modify a Workflow

Use this API to reorder workflow transitions.

Name

CDR_PUB_DF_WORKFLOW.ReorderWfTransitions

Signature

PROCEDURE REORDERWFTRANSITIONS( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PI_REORDEROBJCOLL  IN    CDR_REORDER_OBJ_COLL 
); 

Parameters

This API has standard parameters (see "Standard Parameters") and the following parameter:

PI_REORDEROBJCOLL Collection of the columns to be re-ordered.

Check In a Workflow Definition

Use this API to check in a Workflow definition object.

Name

CDR_PUB_DF_WORKFLOW.CheckInWorkFlowDef

Signature

PROCEDURE CHECKINWORKFLOWDEF( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_CDRWORKFLOW  IN OUT    CDR_BASE_OBJ_TYPE, 
  PI_COMMENT  IN    VARCHAR2 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PIO_CDRWORKFLOW This parameter refers to the workflow definition to be checked in.

    Initialize in cdr_base_obj_type, the basic naming details (COMPANY_ID,OBJ_ID,OBJ_VER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER, OBJECT_VERSION_NUMBER) of the workflow to be checked in.

  • PI_COMMENT Comment to be associated with the check in operation

Remove a Transition

Use this API to remove one or more Workflow transitions.

Name

CDR_PUB_DF_WORKFLOW.RemoveWfTransition

Signature

PROCEDURE REMOVEWFTRANSITION( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PI_CDRCHILDOBJS  IN    CDR_BASE_OBJ_COLL 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PI_CDRCHILDOBJS (Mandatory) This is a collection of CDR_BASE_OBJ_TYPEs.

For each Workflow transition that you want to remove, initialize a CDR_BASE_OBJ_TYPE and then extend the collection.

The following attributes are required for each Workflow transition: COMPANY_ID, OBJ_ID, OBJ_VER, NAMESPACE_OBJ_ID, NAMESPACE_OBJ_VER, OBJECT_VERSION_NUMBER.

Remove a Workflow Activity

Use this API to remove one or more Workflow activities. Workflow activities include all executable objects: Load Sets, Programs, Data Marts, and Report Sets; and also Workflow structures: And, Or, Start, End_Success, End_Warning, End_Error, and Fork.

Name

CDR_PUB_DF_WORKFLOW.RemoveObjectsFromWorkflow

Signature

PROCEDURE REMOVEOBJECTSFROMWORKFLOW( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PI_CDRCHILDOBJS  IN    CDR_BASE_OBJ_COLL 
);

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PI_CDRCHILDOBJS (Mandatory) This is a collection of CDR_BASE_OBJ_TYPEs.

For each Workflow activity that you want to remove, initialize a CDR_BASE_OBJ_TYPE and then extend the collection.

The following attributes are required for each Workflow activity: COMPANY_ID, OBJ_ID, OBJ_VER, NAMESPACE_OBJ_ID, NAMESPACE_OBJ_VER, OBJECT_VERSION_NUMBER.

Remove a Workflow Instance

Use this API to remove a Workflow instance object.

Name

CDR_PUB_DF_WORKFLOW.Remove

Signature

PROCEDURE REMOVE( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PI_BASEOBJCOLL  IN OUT    CDR_BASE_OBJ_COLL 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PI_BASEOBJCOLL This refers to collection of workflow instances to be removed.

Remove a Workflow Definition

Use this API to remove one or more Workflow definitions.

Name

CDR_PUB_DF_WORKFLOW.RemoveWorkFlow

Signature

PROCEDURE REMOVEWORKFLOW( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_CDRWORKFLOW  IN OUT    CDR_BASE_OBJ_TYPE 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PIO_CDRWORKFLOW (Mandatory) This is a parameter of CDR_BASE_OBJ_TYPEs.

For each Workflow that you want to remove, initialize a CDR_BASE_OBJ_TYPE.

The following attributes are required: COMPANY_ID, OBJ_ID, OBJ_VER, NAMESPACE_OBJ_ID, NAMESPACE_OBJ_VER, OBJECT_VERSION_NUMBER of the workflow to be removed should be initialized in cdr_base_obj_type.