Composite Service - BPEL Annotation Guidelines

This section describes what you should know about Integration Repository annotations for Composite Services - BPEL.

Annotating Composite Services - BPEL

Annotations for Composite Services - BPEL - Syntax

The annotations for composite services - BPEL are:

/*#
	  * This is a bpel file for creating invoice.
	  * @rep:scope public
	  * @rep:displayname Create Invoice
	  * @rep:lifecycle active
	  * @rep:product inv
	  * @rep:compatibility S
	  * @rep:interface oracle.apps.inv.CreateInvoice
	  * @rep:category BUSINESS_ENTITY INVOICE_CREATION
	  */

Refer to General Guidelines for Annotations in Integration Repository for details of element definitions.

Required Annotations

Follow the links below to view syntax and usage of each annotation.

Optional Annotations

Template

You can use the following template when annotating composite - BPEL files:

.
.
.
 /*#
  * <Put your long bpel process description here
  * it can span multiple lines>
  * @rep:scope <scope>
  * @rep:displayname <display name>
  * @rep:lifecycle <lifecycle>
  * @rep:product <product or pseudoproduct short code>
  * @rep:compatibility <compatibility code>
  * @rep:interface <oracle.apps.[product_code].[bpel_process_name]>
  * @rep:category BUSINESS_ENTITY <entity name>
  */
.
.
.

Example

Here is an example of an annotated composite - BPEL file:

//////////////////////////////////////////////////////////////
Oracle JDeveloper BPEL Designer 
  
  Created: Tue Oct 30 17:10:13 IST 2007
  Author:  jdole
  Purpose: Synchronous BPEL Process
 /*#
  * This is a bpel file for creating invoice.
  * @rep:scope public
  * @rep:displayname Create Invoice
  * @rep:lifecycle active
  * @rep:product PO 
  * @rep:compatibility S
  * @rep:interface oracle.apps.po.CreateInvoice
  * @rep:category BUSINESS_ENTITY INVOICE 
  */
  
//////////////////////////////////////////////////////////////

-->
<process name="CreateInvoice">
			targetNamespace="http://xmlns.oracle.com/CreateInvoice"
   		xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
  			xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
         xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
         xmlns:ns4="http://xmlns.oracle.com/pcbpel/adapter/file/ReadPayload/"
         xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         xmlns:ns5="http://xmlns.oracle.com/bpel/workflow/xpath"
         xmlns:client="http://xmlns.oracle.com/CreateInvoice"
         xmlns:ns6="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
         xmlns:ora="http://schemas.oracle.com/xpath/extension"
         xmlns:ns1="http://xmlns.oracle.com/soaprovider/plsql/AR_INVOICE_API_PUB_2108/CREATE_SINGLE_INVOICE_1037895/"
         xmlns:ns3="http://xmlns.oracle.com/soaprovider/plsql/AR_INVOICE_API_PUB_2108/APPS/BPEL_CREATE_SINGLE_INVOICE_1037895/AR_INVOICE_API_PUB-24CREATE_INV/"
         xmlns:ns2="http://xmlns.oracle.com/pcbpel/adapter/appscontext/"
         xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
			xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">

  <!--
/////////////////////////////////////////////////////////////////////
PARTNERLINKS                                                      
      List of services participating in this BPEL process  
/////////////////////////////////////////////////////////////////////
-->
<partnerLinks>
	<!--
		The 'client' role represents the requester of this service. It is 
      used for callback. The location and correlation information associated
      with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="client" partnerLinkType="client:CreateInvoice"
                 myRole="CreateInvoiceProvider"/>
    <partnerLink name="CREATE_SINGLE_INVOICE_1037895"
                 partnerRole="CREATE_SINGLE_INVOICE_1037895_ptt_Role"
                 partnerLinkType="ns1:CREATE_SINGLE_INVOICE_1037895_ptt_PL"/>
    <partnerLink name="ReadPayload" partnerRole="SynchRead_role"
                 partnerLinkType="ns4:SynchRead_plt"/>
</partnerLinks>
<!--
/////////////////////////////////////////////////////////////////////
VARIABLES                                                        
      List of messages and XML documents used within this BPEL process  
/////////////////////////////////////////////////////////////////////
-->
<variables>
<!--Reference to the message passed as input during initiation-->
	 <variable name="inputVariable"
              messageType="client:CreateInvoiceRequestMessage"/>
<!--Reference to the message that will be returned to the requester-->
    <variable name="outputVariable"
              messageType="client:CreateInvoiceResponseMessage"/>
    <variable name="Invoke_1_CREATE_SINGLE_INVOICE_1037895_InputVariable"
              messageType="ns1:Request"/>
    <variable name="Invoke_1_CREATE_SINGLE_INVOICE_1037895_OutputVariable"
              messageType="ns1:Response"/>
    <variable name="Invoke_2_SynchRead_InputVariable"
              messageType="ns4:Empty_msg"/>
    <variable name="Invoke_2_SynchRead_OutputVariable"
              messageType="ns4:InputParameters_msg"/>
</variables>
<!--
/////////////////////////////////////////////////////////////////////
ORCHESTRATION LOGIC                                               
     Set of activities coordinating the flow of messages across the    
     services integrated within this business process 
/////////////////////////////////////////////////////////////////////
-->
<sequence name="main">
    <!--Receive input from requestor. (Note: This maps to operation defined in CreateInvoice.wsdl)-->
	 <receive name="receiveInput" partnerLink="client"
             portType="client:CreateInvoice" operation="process"
             variable="inputVariable" createInstance="yes"/>
    <!--Generate reply to synchronous request-->
    <assign name="SetHeader">
      <copy>
        <from expression="''operations'">
        <to variable="Invoke_1_CREATE_SINGLE_INVOICE_1037895_InputVariable"
            part="header"
            query="/ns1:SOAHeader/ns2:ProcedureHeaderType/ns2:Username"/>
      </copy>
      <copy>
        <from expression="''Receivables, Vision Operations (USA)'">
        <to variable="Invoke_1_CREATE_SINGLE_INVOICE_1037895_InputVariable"
            part="header"
            query="/ns1:SOAHeader/ns2:ProcedureHeaderType/ns2:Responsibility"/>
      </copy>
      <copy>
        <from expression="''204'">
        <to variable="Invoke_1_CREATE_SINGLE_INVOICE_1037895_InputVariable"
            part="header"
            query="/ns1:SOAHeader/ns2:ProcedureHeaderType/ns2:ORG_ID"/>
      </copy>
      <copy>
        <from expression="''Receivables, Vision Operations (USA)'">
        <to variable="Invoke_1_CREATE_SINGLE_INVOICE_1037895_InputVariable"
            part="header"
            query="/ns1:SOAHeader/ns1:SecurityHeader/ns1:ResponsibilityName"/>
      </copy>
   </assign>
   <invoke name="InvokeReadPayload" partnerLink="ReadPayload"
            portType="ns4:SynchRead_ptt" operation="SynchRead"
            inputVariable="Invoke_2_SynchRead_InputVariable"
            outputVariable="Invoke_2_SynchRead_OutputVariable"/>
   <assign name="SetPayload">
      <copy>
        <from variable="Invoke_2_SynchRead_OutputVariable"
              part="InputParameters" query="/ns3:InputParameters"/>
        Invoke_1_CREATE_SINGLE_INVOICE_1037895_InputVariable"
        part="body" query="/ns1:SOARequest/ns3:InputParameters"/>
      </copy>
   </assign>
   <assign name="SetDate">
      <copy>
        <from expression="xp20:current-date()">
        <to to variable="Invoke_1_CREATE_SINGLE_INVOICE_1037895_InputVariable"
            part="body"
            query="/ns1:SOARequest/ns3:InputParameters/ns3:P_TRX_HEADER_TBL/ns3:P_TRX_HEADER_TBL_ITEM/ns3:TRX_DATE"/>
      </copy>
   </assign>
   <invoke name="Invoke_1" partnerLink="CREATE_SINGLE_INVOICE_1037895"
            portType="ns1:CREATE_SINGLE_INVOICE_1037895_ptt"
            operation="CREATE_SINGLE_INVOICE_1037895"
            inputVariable="Invoke_1_CREATE_SINGLE_INVOICE_1037895_InputVariable"
            outputVariable="Invoke_1_CREATE_SINGLE_INVOICE_1037895_OutputVariable"/>
   <assign name="AssignResult">
      <copy>
        <from variable="Invoke_1_CREATE_SINGLE_INVOICE_1037895_OutputVariable"
              part="body"
              query="/ns1:SOAResponse/ns3:OutputParameters/ns3:X_MSG_DATA"/>
        <to variable="outputVariable" part="payload"
            query="/client:CreateInvoiceProcessResponse/client:result"/>
      </copy>
   </assign>
   <reply name="replyOutput" partnerLink="client"
           portType="client:CreateInvoice" operation="process"
           variable="outputVariable"/>
 </sequence>
</process>