Extending Supply Chain Management using Process Cloud Service.

Introduction

Oracle Process Cloud Service (PCS), a Platform-as-a-Service offering, enables human workflow capabilities on the cloud with easy-to-use composer and work space. PCS allows authoring of processes using business-analyst friendly BPMN notation over swim-lanes. PCS eliminates the burden of building and maintaining on-premise business process management platforms and allows enterprises to easily transition to the cloud.

 

Key features of Process Cloud Service include:

  • Invoke workflows through Web forms, SOAP service and REST service.
  • Invoke external SOAP and REST/JSON services.
  • Invoke external services synchronously or asynchronously.
  • Import existing BPMN based workflows.

With the rapid adoption of Oracle SaaS applications, PCS comes in handy as an option to extend SaaS with human-task workflows. Here are some scenarios where PCS is a strong candidate:

  • Although most Oracle SaaS offering support workflow mechanisms natively, PCS provides a consistent workflow mechanism when multiple SaaS products are involved
  • Workflow capabilities needed to rapidly integrate processes across on-premise and Cloud applications.
  • Orchestration use cases with heavy use of human tasks.

For the purpose of this blog, let’s look at extending Supply Chain Management Cloud with a workflow in PCS to capture, review and submit sales orders. The principles explained in this blog apply to other Oracle SaaS services as well.

Sample Workflow

In this scenario, users in an enterprise submit orders to a PCS workflow. PCS then sends the orders to Supply Chain Management cloud’s Distributed Order Orchestration (DOO) web services.  The status of SCM Cloud Sales Order is retrieved for user’s review before the workflow ends.  This sample demonstrates the capabilities of PCS with basic functions of PCS and SCM Cloud.  It could be extended for advanced use cases. Figure 1 shows the high-level workflow.

Figure 1

Worflow overkview

 

Environment requirements for the sample

Below are requirements to enable the sample workflow between PCS and SCM Cloud.

Process Cloud Service

  • Check Access to PCS composer and sample workflows. .
  • Check for Network connectivity between PCS and SCM verified. This shouldn’t be an issue when using SCM Cloud. However if you are using the Oracle Fusion SCM On-premise version then it is necessary to check this connectivity and make any necessary network changes

Supply Chain Management Cloud (R11)

  • Confirm Access to SCM Cloud with implementation privileges provisioned.
  • Obtain the URL for the Order Management Order Capture service endpoint.
  • Ensure that Relevant functional setup is complete for Source systems and item relationships.
  • Ensure that job to collect order reference data is enabled and running.

SCM Cloud Order Management module should be implemented in order for the order capture services function properly. For more information on configuring  Order Management, refer to the white papers listed at the bottom of this post. These documents might require access to Oracle support portal.

 

SCM Cloud order management services

For the sample, a test instance of Oracle Supply Chain Management Cloud Release 11 was used. Order capture service accepts orders from upstream capture systems through ProcessOrderRequest calls. It also provides details of an order through GetOrderDetails call. XML payloads for both services were captured from sample workflow and  provided below and, for sake of brevity, detailed instructions on Order Management configuration is left to support documentation.

As of Release 11, SCM Cloud only exposes SOA services for Order capture. SOA service endpoint for R11 is not listed in the catalog. The endpoint is

https://<hostname>:<port>/soa-infra/services/default/DooDecompReceiveOrderExternalComposite/ReceiveOrderRequestService. Append “?WSDL” to end the endpoint to retrieve the WSDL.

 

Sample payload for ProcessOrderRequest:

<?xml version = '1.0' encoding = 'UTF-8'?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
   <env:Header>
      <wsa:To>https://eczc-test.scm.em2.oraclecloud.com:443/soa-infra/services/default/DooDecompReceiveOrderExternalComposite/ReceiveOrderRequestService</wsa:To>
      <wsa:Action>ProcessOrderRequestSync</wsa:Action>
      <wsa:MessageID>urn:eebb5147-2840-11e6-9a89-08002741191a</wsa:MessageID>
      <wsa:RelatesTo>urn:eebb5147-2840-11e6-9a89-08002741191a</wsa:RelatesTo>
      <wsa:ReplyTo>
         <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
         <wsa:ReferenceParameters>
            <orasoa:EndpointAddress xmlns:orasoa="http://xmlns.oracle.com/soa">http://localhost:7003/soa-infra/services/testing/SalesOrderProcess!595*soa_8366f568-20d7-4a6a-ad68-58effa7a29e3/SCMWebService%23SCMSalesOrderProcess/Services.Externals.SCMWebService.reference</orasoa:EndpointAddress>
            <orasoa:PortType xmlns:ptns="http://xmlns.oracle.com/apps/scm/doo/decomposition/receiveTransform/receiveSalesOrder/DooDecompReceiveOrderExternalComposite" xmlns:orasoa="http://xmlns.oracle.com/soa">ptns:ReceiveOrderRequestServiceCallback</orasoa:PortType>
            <instra:tracking.ecid xmlns:instra="http://xmlns.oracle.com/sca/tracking/1.0">297bed2c-1dde-4850-8a34-cf2da58d19ca-0001398a</instra:tracking.ecid>
            <instra:tracking.conversationId xmlns:instra="http://xmlns.oracle.com/sca/tracking/1.0">urn:eebb5147-2840-11e6-9a89-08002741191a</instra:tracking.conversationId>
            <instra:tracking.FlowEventId xmlns:instra="http://xmlns.oracle.com/sca/tracking/1.0">40879</instra:tracking.FlowEventId>
            <instra:tracking.FlowId xmlns:instra="http://xmlns.oracle.com/sca/tracking/1.0">40047</instra:tracking.FlowId>
            <instra:tracking.CorrelationFlowId xmlns:instra="http://xmlns.oracle.com/sca/tracking/1.0">0000LKDtQPbFw000jzwkno1NJbIb0000LQ</instra:tracking.CorrelationFlowId>
         </wsa:ReferenceParameters>
      </wsa:ReplyTo>
      <wsa:FaultTo>
         <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
         <wsa:ReferenceParameters>
            <orasoa:EndpointAddress xmlns:orasoa="http://xmlns.oracle.com/soa">http://localhost:7003/soa-infra/services/testing/SalesOrderProcess!595*soa_8366f568-20d7-4a6a-ad68-58effa7a29e3/SCMWebService%23SCMSalesOrderProcess/Services.Externals.SCMWebService.reference</orasoa:EndpointAddress>
            <orasoa:PortType xmlns:ptns="http://xmlns.oracle.com/apps/scm/doo/decomposition/receiveTransform/receiveSalesOrder/DooDecompReceiveOrderExternalComposite" xmlns:orasoa="http://xmlns.oracle.com/soa">ptns:ReceiveOrderRequestServiceCallback</orasoa:PortType>
         </wsa:ReferenceParameters>
      </wsa:FaultTo>
   </env:Header>
   <env:Body>
      <process xmlns="http://xmlns.oracle.com/apps/scm/doo/decomposition/receiveTransform/receiveSalesOrder/DooDecompReceiveOrderExternalComposite">
         <OrchestrationOrderRequest>
            <SourceTransactionIdentifier xmlns="http://xmlns.oracle.com/apps/scm/doo/decomposition/receiveTransform/receiveSalesOrder/model/">1154551RBWM</SourceTransactionIdentifier>
            <SourceTransactionSystem xmlns="http://xmlns.oracle.com/apps/scm/doo/decomposition/receiveTransform/receiveSalesOrder/model/">OPS</SourceTransactionSystem>
            <SourceTransactionNumber xmlns="http://xmlns.oracle.com/apps/scm/doo/decomposition/receiveTransform/receiveSalesOrder/model/">1154551RBWM</SourceTransactionNumber>
            <BuyingPartyName xmlns="http://xmlns.oracle.com/apps/scm/doo/decomposition/receiveTransform/receiveSalesOrder/model/">Computer Service and Rentals</BuyingPartyName>
            <TransactionalCurrencyCode xmlns="http://xmlns.oracle.com/apps/scm/doo/decomposition/receiveTransform/receiveSalesOrder/model/">USD</TransactionalCurrencyCode>
            <TransactionOn xmlns="http://xmlns.oracle.com/apps/scm/doo/decomposition/receiveTransform/receiveSalesOrder/model/">2016-06-01T14:36:42.649-07:00</TransactionOn>
            <RequestingBusinessUnitIdentifier xmlns="http://xmlns.oracle.com/apps/scm/doo/decomposition/receiveTransform/receiveSalesOrder/model/">300000001548368</RequestingBusinessUnitIdentifier>
            <PartialShipAllowedFlag xmlns="http://xmlns.oracle.com/apps/scm/doo/decomposition/receiveTransform/receiveSalesOrder/model/">false</PartialShipAllowedFlag>
            <OrchestrationOrderRequestLine xmlns:ns2="http://xmlns.oracle.com/apps/scm/doo/decomposition/receiveTransform/receiveSalesOrder/model/" xmlns="http://xmlns.oracle.com/apps/scm/doo/decomposition/receiveTransform/receiveSalesOrder/model/">
               <ns2:SourceTransactionLineIdentifier>1</ns2:SourceTransactionLineIdentifier>
               <ns2:SourceTransactionScheduleIdentifier>1</ns2:SourceTransactionScheduleIdentifier>
               <ns2:SourceTransactionLineNumber>1</ns2:SourceTransactionLineNumber>
               <ns2:SourceTransactionScheduleNumber>1</ns2:SourceTransactionScheduleNumber>
               <ns2:ProductNumber>AS54888</ns2:ProductNumber>
               <ns2:OrderedQuantity>1</ns2:OrderedQuantity>
               <ns2:OrderedUOMCode>zzx</ns2:OrderedUOMCode>
               <ns2:OrderedUOM>EA</ns2:OrderedUOM>
               <ns2:RequestingBusinessUnitIdentifier>300000001293806</ns2:RequestingBusinessUnitIdentifier>
               <ns2:ParentLineReference/>
               <ns2:RootParentLineReference/>
               <ns2:ShippingInstructions>BM Ship Instructions- Ship it in a day</ns2:ShippingInstructions>
               <ns2:PackingInstructions/>
               <ns2:RequestedShipDate>2016-12-26T00:00:00</ns2:RequestedShipDate>
               <ns2:PaymentTerms/>
               <ns2:TransactionCategoryCode>ORDER</ns2:TransactionCategoryCode>
               <ns2:BillToCustomerName>Computer Service and Rentals</ns2:BillToCustomerName>
               <ns2:BillToAccountSiteUseIdentifier>300000001469016</ns2:BillToAccountSiteUseIdentifier>
               <ns2:BillToCustomerIdentifier>300000001469002</ns2:BillToCustomerIdentifier>
               <ns2:PartialShipAllowedFlag>false</ns2:PartialShipAllowedFlag>
               <ns2:UnitListPrice>100.0</ns2:UnitListPrice>
               <ns2:UnitSellingPrice>100.0</ns2:UnitSellingPrice>
               <ns2:ContractEndDate>2018-12-13</ns2:ContractEndDate>
               <ns2:ExtendedAmount>100.0</ns2:ExtendedAmount>
               <ns2:TaxExempt>S</ns2:TaxExempt>
               <ns2:ShipSetName>{{SHIPSET}}</ns2:ShipSetName>
               <ns2:OrigSysDocumentReference>ORIGSYS</ns2:OrigSysDocumentReference>
               <ns2:OrigSysDocumentLineReference>ORIGSYSLINE</ns2:OrigSysDocumentLineReference>
               <ns2:LineCharge>
                  <ns2:ChargeDefinitionCode>QP_SALE_PRICE</ns2:ChargeDefinitionCode>
                  <ns2:ChargeSubtypeCode>ORA_PRICE</ns2:ChargeSubtypeCode>
                  <ns2:PriceTypeCode>ONE_TIME</ns2:PriceTypeCode>
                  <ns2:PricedQuantity>1</ns2:PricedQuantity>
                  <ns2:PrimaryFlag>true</ns2:PrimaryFlag>
                  <ns2:ApplyTo>PRICE</ns2:ApplyTo>
                  <ns2:RollupFlag>false</ns2:RollupFlag>
                  <ns2:SourceChargeIdentifier>SC2</ns2:SourceChargeIdentifier>
                  <ns2:ChargeTypeCode>ORA_SALE</ns2:ChargeTypeCode>
                  <ns2:ChargeCurrencyCode>USD</ns2:ChargeCurrencyCode>
                  <ns2:SequenceNumber>2</ns2:SequenceNumber>
                  <ns2:PricePeriodicityCode/>
                  <ns2:GsaUnitPrice/>
                  <ns2:ChargeComponent>
                     <ns2:ChargeCurrencyCode>USD</ns2:ChargeCurrencyCode>
                     <ns2:HeaderCurrencyCode>USD</ns2:HeaderCurrencyCode>
                     <ns2:HeaderCurrencyExtendedAmount>150.0</ns2:HeaderCurrencyExtendedAmount>
                     <ns2:PriceElementCode>QP_LIST_PRICE</ns2:PriceElementCode>
                     <ns2:SequenceNumber>1</ns2:SequenceNumber>
                     <ns2:PriceElementUsageCode>LIST_PRICE</ns2:PriceElementUsageCode>
                     <ns2:ChargeCurrencyUnitPrice>150.0</ns2:ChargeCurrencyUnitPrice>
                     <ns2:HeaderCurrencyUnitPrice>150.0</ns2:HeaderCurrencyUnitPrice>
                     <ns2:RollupFlag>false</ns2:RollupFlag>
                     <ns2:SourceParentChargeComponentId/>
                     <ns2:SourceChargeIdentifier>SC2</ns2:SourceChargeIdentifier>
                     <ns2:SourceChargeComponentIdentifier>SCC3</ns2:SourceChargeComponentIdentifier>
                     <ns2:ChargeCurrencyExtendedAmount>150.0</ns2:ChargeCurrencyExtendedAmount>
                  </ns2:ChargeComponent>
                  <ns2:ChargeComponent>
                     <ns2:ChargeCurrencyCode>USD</ns2:ChargeCurrencyCode>
                     <ns2:HeaderCurrencyCode>USD</ns2:HeaderCurrencyCode>
                     <ns2:HeaderCurrencyExtendedAmount>150.0</ns2:HeaderCurrencyExtendedAmount>
                     <ns2:PriceElementCode>QP_NET_PRICE</ns2:PriceElementCode>
                     <ns2:SequenceNumber>3</ns2:SequenceNumber>
                     <ns2:PriceElementUsageCode>NET_PRICE</ns2:PriceElementUsageCode>
                     <ns2:ChargeCurrencyUnitPrice>150.0</ns2:ChargeCurrencyUnitPrice>
                     <ns2:HeaderCurrencyUnitPrice>150.0</ns2:HeaderCurrencyUnitPrice>
                     <ns2:RollupFlag>false</ns2:RollupFlag>
                     <ns2:SourceParentChargeComponentId/>
                     <ns2:SourceChargeIdentifier>SC2</ns2:SourceChargeIdentifier>
                     <ns2:SourceChargeComponentIdentifier>SCC1</ns2:SourceChargeComponentIdentifier>
                     <ns2:ChargeCurrencyExtendedAmount>150.0</ns2:ChargeCurrencyExtendedAmount>
                  </ns2:ChargeComponent>
               </ns2:LineCharge>
            </OrchestrationOrderRequestLine>
         </OrchestrationOrderRequest>
      </process>
   </env:Body>
</env:Envelope>

Sample payload for GetOrderDetails:

<?xml version = '1.0' encoding = 'UTF-8'?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
   <env:Header>
      <wsa:To>https://eczc-test.scm.em2.oraclecloud.com:443/soa-infra/services/default/DooDecompReceiveOrderExternalComposite/ReceiveOrderRequestService</wsa:To>
      <wsa:Action>GetOrderDetailsSync</wsa:Action>
      <wsa:MessageID>urn:109ed9ec-2841-11e6-9a89-08002741191a</wsa:MessageID>
      <wsa:RelatesTo>urn:eebb5147-2840-11e6-9a89-08002741191a</wsa:RelatesTo>
      <wsa:ReplyTo>
         <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
         <wsa:ReferenceParameters>
            <orasoa:EndpointAddress xmlns:orasoa="http://xmlns.oracle.com/soa">http://localhost:7003/soa-infra/services/testing/SalesOrderProcess!595*soa_8366f568-20d7-4a6a-ad68-58effa7a29e3/SCMWebService%23SCMSalesOrderProcess/Services.Externals.SCMWebService.reference</orasoa:EndpointAddress>
            <instra:tracking.ecid xmlns:instra="http://xmlns.oracle.com/sca/tracking/1.0">297bed2c-1dde-4850-8a34-cf2da58d19ca-0001398a</instra:tracking.ecid>
            <instra:tracking.conversationId xmlns:instra="http://xmlns.oracle.com/sca/tracking/1.0">urn:eebb5147-2840-11e6-9a89-08002741191a</instra:tracking.conversationId>
            <instra:tracking.FlowEventId xmlns:instra="http://xmlns.oracle.com/sca/tracking/1.0">40886</instra:tracking.FlowEventId>
            <instra:tracking.FlowId xmlns:instra="http://xmlns.oracle.com/sca/tracking/1.0">40047</instra:tracking.FlowId>
            <instra:tracking.CorrelationFlowId xmlns:instra="http://xmlns.oracle.com/sca/tracking/1.0">0000LKDtQPbFw000jzwkno1NJbIb0000LQ</instra:tracking.CorrelationFlowId>
         </wsa:ReferenceParameters>
      </wsa:ReplyTo>
      <wsa:FaultTo>
         <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
         <wsa:ReferenceParameters>
            <orasoa:EndpointAddress xmlns:orasoa="http://xmlns.oracle.com/soa">http://localhost:7003/soa-infra/services/testing/SalesOrderProcess!595*soa_8366f568-20d7-4a6a-ad68-58effa7a29e3/SCMWebService%23SCMSalesOrderProcess/Services.Externals.SCMWebService.reference</orasoa:EndpointAddress>
         </wsa:ReferenceParameters>
      </wsa:FaultTo>
   </env:Header>
   <env:Body>
      <GetOrderDetailsProcessRequest xmlns="http://xmlns.oracle.com/apps/scm/doo/decomposition/orderDetailServices/DooDecompOrderDetailSvcComposite">
         <SourceOrderInput xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dood="http://xmlns.oracle.com/apps/scm/doo/decomposition/orderDetailServices/DooDecompOrderDetailSvcComposite" xmlns:mod="http://xmlns.oracle.com/apps/scm/doo/decomposition/orderDetailServices/model/">
            <mod:SourceOrderSystem>OPS</mod:SourceOrderSystem>
            <mod:SalesOrderNumber>1154660RBWM</mod:SalesOrderNumber>
         </SourceOrderInput>
      </GetOrderDetailsProcessRequest>
   </env:Body>
</env:Envelope>

PCS workflow in detail

The sample PCS workflow has submission and approval human tasks, associated web forms, a basic gateway rule, a REST web service call to dynamically populate drop-down list and two SOAP web service calls to Order Management services.  Order management service in this case is secured with HTTP basic authentication and accessible only over TLS. Figure 2 shows the swim lane representation of the workflow with self-describing flow elements names. We’ll focus on SCM Cloud specific aspects of the process flow. Process Cloud Service provides several pre-built samples and pattern templates, both of which could be used for quick development of a flow.

Figure 2

processflow



Adding a connector to SCM Cloud web service

In order to use web services to be used in a process, a web service connector  WSDL and associated schema files must be added to the PCS project in composer. Figure 3 shows how to create a connector. Once a connector is created, it is available for implementation in a Service flow element. As part of the connector setup, composer allows security to be configured with options such as HTTP basic authentication or WS-Security username token. Note that these settings can be changed in customization page when the flow is deployed.

Figure 3

WebServiceConnector

 

Associating Data between PCS flow elements

As the PCS flow transitions between flow elements, data input to the element and data output from the element need to be associated to suitable data objects. Data objects could be based on pre-built types such as int or String, or based on a one of the types defined in imported XML schema files. XML schema types should be imported under “Business Objects” section of the composer.  Figure 4 shows data association to capture input for order capture service. As shown, some elements are captured from a web form submitted by a user and many others are hard-coded for this sample flow.

Figure 4

dataassociation

 

 Building web forms from pre-defined business types.

Human tasks in PCS are represented by Web form-based UI. Web forms could be built quickly from pre-defined data types, such as XML complex types. Web form elements inherit the data constraints defined in the complex type. Once a form is generated, fields could be re-arranged to improve the UI.  Figure 5 shows a web form generated based on output of GetOrderDetails web service call, with details returned by SCM Cloud.

Figure 5

OrderDetailsStatus

 

Customizing process during deployment

Process cloud service supports deployments from composer to a test environment and then to a production or subsequent test environments. During the deployment, environment specific information such as endpoints and credentials could be updated.  All web service connectors used by the project are available to be configured. Figure 6 shows customization page for test deployment.

Figure 6

DeploymentCustomization

 
























Conclusion

Process Cloud Service offers a quick and reliable way to author and deploy work flows that could orchestrate human tasks and system interactions using industry standard notations and protocols. This is very useful to integrate and extend SaaS applications from Oracle and other vendors. PCS allows enterprise to leverage in-house expertise in process development without the hassles of building and maintaining the platform or having to master process flow implementation techniques in multiple SaaS products. This article covered a specific use case where PCS captures orders through rules and approval tasks in PCS and sends the order to SCM Cloud’s order capture service, and, finally, obtains order status and other details from SCM Cloud.

 

References

Using Web Services with Oracle Fusion Order Management Cloud (Doc ID 2051 640.1)

Integrating Non-Fusion Fulfillment System With Oracle Fusion Order Management Cloud (Doc ID 2123078.1)

Manage Source Systems for Order Management Cloud

Add Your Comment