Skip to content

Cloud Blogs

Author – Madhusudhan Rao

Menu
  • Cloud How to Series
  • Cloud-Blogs by Madhusudhan Rao
    • ADF
      • ADF based Android Apps
      • ADF CRUD Cascaded LOVs
      • ADF CRUD Operation
      • ADF for Dummies
      • ADF for Financial Services Software Development
    • Analytics & Visualization
      • Business Intelligence
      • Oracle BI & DV Cloud Service
      • setting up Oracle Analytics Cloud Instance and Data Visualization Techniques
    • App Servers & DevOps
      • How to deploy NodeJS Application on Oracle Application Container Cloud Service
      • Oracle Application Container Cloud Service
      • Oracle Java Cloud Service
    • Architecture
      • 01 Enterprise Business
      • 02 Content framework
      • 03 Enterprise Continuum
      • 04 Maturity Models
      • 05-Architecture Governance
      • 06-Preliminary Phase
      • 07-Architecture Vision
      • 08-Business Architecture
      • 09-Info Sys Architecture
      • 10-Tech Architecture
      • 11 Opportunities & Solns
      • 12-Migration Planning
      • 14 Implementation Governance
      • 15 Change Management
      • 16-Requirement Management
      • 17 Reference Models
      • Cloud Architecture Concepts
        • 01 Architecture Concepts – Regulatory Compliance, Security monitoring and Storage protocols
        • 02 Architecture – Network Concepts and Bare Metal
        • 03 Enterprise Solution Architecture – Best Practices
        • 04 Cloud Architecture Concepts
      • Value Selling Techniques
    • OCI Admin Blogs
      • Create Oracle Cloud Infrastructure Instance
      • ElasticSearch & Kibana – Must for All Search Engine Development
      • How to Create Oracle Bare metal Compute Instance
      • Measuring Latency and TraceRoute Details with Oracle Edge Services
      • OCI Oracle cloud infrastructure – Setting up a NAT Instances for Public Internet Access from a Private Subnet
      • Oracle Cloud Infrastructure – OCI Creating buckets and object storage – setting up self expiry URLs
      • Oracle Cloud Infrastructure OCI – Create Instance ,Attach Block Volume , Open Ports, Setup Firewall rules
      • Python Basics
      • setting up Apache Tomcat on Oracle Cloud Infrastructure OCI
      • setting up CloudFlare DNS & HAProxy on Oracle Cloud Infrastructure for High Availability
      • Setting up Django Python Web Environment on Oracle Cloud
      • setting up File Storage on OCI and uploading files through Filezilla FTP
      • Setting up GPU-enabled Narupa server on Oracle Bare Metal Cloud for Virtual Reality Clients
      • setting up LAMP Stack , PHP 5.6, PhpMyAdmin , FTP and Mail Server on OCI
      • setting up Load Balancer on Oracle Cloud Infrastructure
      • setting up MongoDB Enterprise version Instance on Oracle Cloud Infrastructure Baremetal
      • setting up MongoDB on Oracle Cloud Infrastructure Classic and Opening Ports
      • Setting up SSH , FTP and Opening Ports on Oracle Cloud PaaS and IaaS
      • setting up web infrastructure DNS and HTTPS for your cloud Infrastructure as a Service OCI
      • World of Slack Programming
    • OCI Classic Blogs
      • How to Create WordPress blog on Oracle Cloud
      • running Function as a Service on Oracle Cloud Infrastructure – fnproject.io
      • running Hadoop & Big Data on Oracle Cloud Infrastructure
      • running TensorFlow Machine Learning for Image Recognition on Oracle Cloud Infrastructure
      • Setting up Kubernetes on Oracle Cloud Infrastructure – Classic
    • Oracle BPM for Financial Services
      • BPM for FS
      • 1. Setting up the development environment
      • 2. Modeling a home loan business process
      • 3. Implementing a home loan business process
      • 4. Deploying and testing a process workflow
      • 5. Administering processes
      • 6. Changing a business process by the process analyst
      • 7. Creating business reports for process owners
      • 8. Participating in a business process
      • 9. Integrating with business partners
      • 10. Collaborating with customers and end users
    • Oracle JET Series
  • Database Series
    • Autonomous Data Warehouse and Analytics
      • 01 Preparing Client Machine
      • 02 Creating Autonomous Data Warehouse Instance
      • 03 Creating Tables into Autonomous Data Warehouse through SQL Developer
      • 04 Load Data into OCI Object storage and import that data into Autonomous Data warehouse
      • 05 Create Autonomous Analytics Cloud ADW Connection and create Data Visualization
    • Oracle Apex Cloud Service
    • Oracle Database Cloud Service
    • setting up and running Oracle Big Data PaaS
    • Setting up MySQL PaaS on Oracle Cloud
  • Dockers on OCI Series
    • Comprehensive Blog on Dockers running on OCI
    • running a Docker Container on OCI
    • opening OCI Ports for Docker Containers
    • Building a Docker Image by using Dockerfile
    • Committing changes made in a Docker without using Dockerfile
    • pushing image to Docker Hub
    • DevOps with Github, Docker Hub and Oracle Container Cloud Services
    • running Apache Kafka for continuous data streaming on Oracle cloud infrastructure
  • Oracle OKE Series
    • 01 Comprehensive Blog on Oracle Kubernetes Engine – getting started
    • 02 Configure Network Resources for Oracle Kubernetes Engine
    • 03 Creating 3 Worker and 2 Load Balancers Subnets for OKE
    • 04 Creating Oracle Kubernetes Cluster
    • 05 – Enable Cluster access through Command line interface
    • 06 – Getting onto Oracle Kubernetes Engine Dashboard
    • 07 Pod Configuration using a YAML Deployment
  • SOA BPM IDM Portal Series
    • FMW
      • Comprehensive Business Process Management – BPM 11g
      • FMW Install Startup Scripts
      • Oracle 11gR2 and 12c Database on Linux / OEL / Fedora
      • Oracle Identity Mangement
      • PS6, PS7, PS8 Install and Configuration
    • Webcenter Portal
      • Art of Webcenter Templating
      • Webcenter Sites Installation Linux
      • Webcenter Sites Look n feel
      • Webcenter Spaces
        • Custom Landing Page
      • Webcenter UCM Integration PS5
      • Webcenter, BPM Process Spaces – UCM PS5
      • BPM UCM and Webcenter PS5
    • BPM Series
      • 01-Simple BPM Task Initiator
      • 02-Business Rules and Exclusive Gateway
      • 03-Service Invocation Adapters
      • 04-BPM as a Web Service
      • 05-Mediator and Conditional Service Routing
      • 06-BPM Composer – Runtime Edit
      • 07-BPM and JMS Adapters
      • Oracle BPM 12c features
    • Process Cloud Service
      • Part 1 – Working with Process Cloud Service
      • Part 2 – How to Build Process , Data Persistence in Database Cloud Service
      • Part 3 – Invoking PCS Process from Oracle JET Framework
    • SOA Series
      • Oracle OSB 11g
      • Oracle SOA 11g Business Rules
      • Oracle SOA 11g DB Adapter
      • Oracle SOA 11g Mediator
      • SOA 11g AQ Adapters
  • Terraform on OCI Series
    • Create a Highly Scalable Cluster in the cloud using Terraform on OCI
    • Creating an Instance with New VNC Network
    • Managing the OCI Cluster with Slurm Workload Manager & Grafana
    • Terraform on OCI create instance
    • Terraform on OCI create load balancer
    • Terraform on OCI create non-federated user
    • Terraform on OCI create user, group, dynamic group and policies
    • Terraform on Oracle Cloud OCI
Menu

Part 3 – Invoking PCS Process from Oracle JET Framework

Part 3 – Invoking PCS Process from Oracle JET Framework

REST URL: PCS Allows various rest URLS for various tasks such as Creating a Process Task, View Task Details and various other Services , the most important thing is to understand the URLs and how to call them, You can download Advanced REST Client or Postman Tool that comes as a part of chrome browser plugin

The REST URL will be

https://pcsname-idmdomainname.process.us2.oraclecloud.com/bpm/api/4.0/processes

Select Basic Authentication , Give username and password that you login to PCS Instance with Admin Privileges, Update request and Send GET request

JSON Response will be as shown below

{
    "count": 1,
    "hasMore": false,
    "items": [
        {
            "levels": 0,
            "title": "Instance #260302 of OSCA_Travel_Approval_Process",
            "processId": "260302",
            "processName": "OSCATravelApprovalProcess",
            "priority": 0,
            "ownedBy": "OSCA_Processes.ProcessOwner",
            "createdBy": "[email protected]",
            "state": "OPEN",
            "createdDate": "2017-07-05T15:24:15.000Z",
            "processDN": "default~OSCA_Processes!1.2~OSCATravelApprovalProcess",
            "processNumber": 371338,
            "href": "https://somepcsurl:443/bpm/api/4.0/processes/260302"
        }
    ],
    "links": [
        {
            "href": "https://somepcsurl:443/bpm/api/4.0/",
            "length": 0,
            "rel": "parent"
        },
        {
            "href": "https://somepcsurl:443/bpm/api/4.0/
processesueDateTo=&processDefId=&orderBy=", "length": 0, "rel": "self" } ], "totalResults": 1 }

The detailed document on PCS REST is here

let us now see how to Invoke this Process from a Java Script Driven Oracle JET Application

define(['ojs/ojcore', 'knockout', 'toastr', 'ojs/ojknockout-validation', 'ojs/ojknockout', 'ojs/ojmodel', 
    'ojs/ojbutton', 'ojs/ojinputtext', 'ojs/ojinputnumber',  'ojs/ojdatetimepicker', 
    'ojs/ojselectcombobox'], 
function (oj, ko,  toastr) { 
    function travelContentViewModel() {
        var self = this;
        self.serviceURL = 'https://pcsurl.oraclecloud.com/bpm/api/4.0/processes';
        self.locationModel = ko.observable();
        self.list = ko.observable();
        self.tracker = ko.observable();
        self.managers = ko.observableArray();
        self.selectedManager = ko.observableArray(); 
        self.country = ko.observable(); 
        self.eventDate = ko.observable();
        self.eventDate2 = ko.observable();
         toastr.options = {
                "closeButton": true,
                "debug": false,
                "newestOnTop": false,
                "progressBar": true,
                "positionClass": "toast-top-center",
                "preventDuplicates": false,
                "onclick": null,
                "showDuration": "300",
                "hideDuration": "1000",
                "timeOut": "5000",
                "extendedTimeOut": "1000",
                "showEasing": "swing",
                "hideEasing": "linear",
                "showMethod": "fadeIn",
                "hideMethod": "fadeOut"
              } 
        
        self.dateConverter = ko.observable(oj.Validation.
converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME). createConverter( { pattern: 'dd-MMM-yyyy' })); self.convertServerDate = function(serverDate){ if(serverDate != null){ var parts = serverDate.split('/'); var month; switch(parts[1]){ case "01": month = "Jan"; break; case "02": month = "Feb"; break; case "03": month = "Mar"; break; case "04": month = "Apr"; break; case "05": month = "May"; break; case "06": month = "Jun"; break; case "07": month = "Jul"; break; case "08": month = "Aug"; break; case "09": month = "Sep"; break; case "10": month = "Oct"; break; case "11": month = "Nov"; break; case "12": month = "Dec"; break; default: break; } var formatedDate = parts[0]+"-"+month+"-"+parts[2]; return formatedDate; } return ""; }; self.duration = ko.observable(); self.duration2 = ko.observable(); self.duration3 = ko.observable(); this.duration3 = ko.computed(function () { return Number(this.duration()) + Number(this.duration2() )}, this); $.getJSON(self.serviceURL, function(people){ for(var i=0; i<people.items.length; i++) { var item = people.items[i]; self.managers.push({value: item.person_id,
label: item.firstname + ' '+ item.lastname}); } }); self._showComponentValidationErrors = function (trackerObj) { trackerObj.showMessages(); var hasInvalidComponents = trackerObj ? trackerObj["invalidShown"] : false; if (trackerObj.focusOnFirstInvalid() && hasInvalidComponents) return false; return true; }; self.goBack = function() { oj.Router.rootInstance.store(null); oj.Router.rootInstance.go("addTravel"); };

 On Submit Button Invoke Save Travel Method, Params will actually Pass Message Parameters from JET Form Submission to Process in Process Cloud Service

        self.saveTravel = function() {            
                var trackerObj = ko.utils.unwrapObservable(self.tracker); 
                if (!this._showComponentValidationErrors(trackerObj))
                {
                  return;
                }
                else{
                    var r = confirm("Please Confirm to Submit Travel Approval Request ?");
                    if (r == true) {
                        var personData = 
                            {                                
                                "processDefId": "default~OSCA_Processes!1.2~OSCATravelApprovalProcess",
                                "serviceName": "OSCATravelApprovalProcess.service",
                                "operation": "start",
                                "action": "Submit", 
                                "params":  
                                        {
                                            "msgIn_firstname":$("#firstname").val(), 
                                            "msgIn_lastname":$("#lastname").val(),
                                            "msgIn_travelfrom":$("#travelfrom").val(),
                                            "msgIn_travelto":$("#travelto").val(),
                                            "msgIn_traveleremail":$("#traveleremail").val(),
                                            "msgIn_traveldate":$("#traveldate").val(),
                                            "msgIn_travelcost":$("#travelcost").val(),
                                            "msgIn_traveljustification":$("#traveljustification").val(),
                                            "msgIn_traveltype":$("#traveltype").val(),
                                            "msgIn_travelerorg":$("#travelerorg").val(),
                                            "msgIn_approveremail":$("#approveremail").val(),
                                            "msgIn_travelcostflight":$("#travelcostflight").val(),
                                            "msgIn_traveldateto":$("#traveldateto").val() 
                                      }
                            };

                        console.log("Travel Data is " + JSON.stringify(personData)); 
                         $.ajax({
                            type: "POST",
                            url: self.serviceURL,
                            headers: {"Authorization": "Basic " + btoa("pcsusername:pcspassword")},
                            data: JSON.stringify(personData),
                            contentType: "application/json; charset=utf-8",
                            dataType: "json",
                            processData: true,
                            success: function (data, status, jqXHR){
                                console.log("success..." + data); 
// On Success - Show Success Message on Browser toastr.success("Successfully Travel Request Submitted ! "); oj.Router.rootInstance.store(null);
// Redirect Back to Travel Application Form Screen oj.Router.rootInstance.go("viewTravel"); }, error: function (xhr) { console.log(xhr.responseText);
// On Error - Show Error Message on Browser toastr.error("Error in Travel Approval Submission , please contain"); oj.Router.rootInstance.store(null); oj.Router.rootInstance.go("travel"); } }); } } }; } return travelContentViewModel; });

Demo PCS Travel App with Email Approval of Task

Mobile Approval of Task

<< Part 2 – How to Build Process , Data Persistence in Database Cloud Service

Log in
  • Oracle OKE Series
    • 01 Comprehensive Blog on Oracle Kubernetes Engine - getting started
    • 02 Configure Network Resources for Oracle Kubernetes Engine
    • 03 Creating 3 Worker and 2 Load Balancers Subnets for OKE
    • 04 Creating Oracle Kubernetes Cluster
    • 05 - Enable Cluster access through Command line interface
    • 06 - Getting onto Oracle Kubernetes Engine Dashboard
    • 07 Pod Configuration using a YAML Deployment
  • Cloud How to Series
  • Dockers on OCI Series
    • Comprehensive Blog on Dockers running on OCI
    • running a Docker Container on OCI
    • opening OCI Ports for Docker Containers
    • Building a Docker Image by using Dockerfile
    • Committing changes made in a Docker without using Dockerfile
    • pushing image to Docker Hub
    • DevOps with Github, Docker Hub and Oracle Container Cloud Services
    • running Apache Kafka for continuous data streaming on Oracle cloud infrastructure
  • Terraform on OCI Series
    • Managing the OCI Cluster with Slurm Workload Manager & Grafana
    • Terraform on Oracle Cloud OCI
    • Terraform on OCI create instance
    • Creating an Instance with New VNC Network
    • Terraform on OCI create non-federated user
    • Terraform on OCI create user, group, dynamic group and policies
    • Terraform on OCI create load balancer
    • Create a Highly Scalable Cluster in the cloud using Terraform on OCI
  • Cloud-Blogs by Madhusudhan Rao
    • Oracle JET Series
    • OCI Classic Blogs
      • Setting up Kubernetes on Oracle Cloud Infrastructure - Classic
      • running TensorFlow Machine Learning for Image Recognition on Oracle Cloud Infrastructure
      • running Function as a Service on Oracle Cloud Infrastructure - fnproject.io
      • running Hadoop & Big Data on Oracle Cloud Infrastructure
      • How to Create WordPress blog on Oracle Cloud
    • OCI Admin Blogs
      • setting up Apache Tomcat on Oracle Cloud Infrastructure OCI
      • Setting up SSH , FTP and Opening Ports on Oracle Cloud PaaS and IaaS
      • setting up LAMP Stack , PHP 5.6, PhpMyAdmin , FTP and Mail Server on OCI
      • Create Oracle Cloud Infrastructure Instance
      • setting up File Storage on OCI and uploading files through Filezilla FTP
      • setting up CloudFlare DNS & HAProxy on Oracle Cloud Infrastructure for High Availability
      • setting up web infrastructure DNS and HTTPS for your cloud Infrastructure as a Service OCI
      • Oracle Cloud Infrastructure OCI - Create Instance ,Attach Block Volume , Open Ports, Setup Firewall rules
      • Setting up GPU-enabled Narupa server on Oracle Bare Metal Cloud for Virtual Reality Clients
      • Oracle Cloud Infrastructure - OCI Creating buckets and object storage - setting up self expiry URLs
      • OCI Oracle cloud infrastructure - Setting up a NAT Instances for Public Internet Access from a Private Subnet
      • setting up MongoDB on Oracle Cloud Infrastructure Classic and Opening Ports
      • ElasticSearch & Kibana - Must for All Search Engine Development
      • How to Create Oracle Bare metal Compute Instance
      • World of Slack Programming
      • Setting up Django Python Web Environment on Oracle Cloud
      • Measuring Latency and TraceRoute Details with Oracle Edge Services
      • setting up Load Balancer on Oracle Cloud Infrastructure
      • Python Basics
      • setting up MongoDB Enterprise version Instance on Oracle Cloud Infrastructure Baremetal
    • ADF
      • ADF CRUD Operation
      • ADF for Financial Services Software Development
      • ADF based Android Apps
      • ADF for Dummies
      • ADF CRUD Cascaded LOVs
    • Architecture
      • 08-Business Architecture
      • 04 Maturity Models
      • 09-Info Sys Architecture
      • 05-Architecture Governance
      • Value Selling Techniques
      • 10-Tech Architecture
      • Cloud Architecture Concepts
        • 01 Architecture Concepts - Regulatory Compliance, Security monitoring and Storage protocols
        • 02 Architecture - Network Concepts and Bare Metal
        • 03 Enterprise Solution Architecture - Best Practices
        • 04 Cloud Architecture Concepts
      • 11 Opportunities & Solns
      • 12-Migration Planning
      • 14 Implementation Governance
      • 15 Change Management
      • 16-Requirement Management
      • 01 Enterprise Business
      • 02 Content framework
      • 06-Preliminary Phase
      • 03 Enterprise Continuum
      • 17 Reference Models
      • 07-Architecture Vision
    • Oracle BPM for Financial Services
      • BPM for FS
      • 1. Setting up the development environment
      • 2. Modeling a home loan business process
      • 3. Implementing a home loan business process
      • 4. Deploying and testing a process workflow
      • 5. Administering processes
      • 6. Changing a business process by the process analyst
      • 7. Creating business reports for process owners
      • 8. Participating in a business process
      • 9. Integrating with business partners
      • 10. Collaborating with customers and end users
    • App Servers & DevOps
      • Oracle Application Container Cloud Service
      • Oracle Java Cloud Service
      • How to deploy NodeJS Application on Oracle Application Container Cloud Service
    • Analytics & Visualization
      • Business Intelligence
      • setting up Oracle Analytics Cloud Instance and Data Visualization Techniques
      • Oracle BI & DV Cloud Service
  • Database Series
    • setting up and running Oracle Big Data PaaS
    • Autonomous Data Warehouse and Analytics
      • 01 Preparing Client Machine
      • 02 Creating Autonomous Data Warehouse Instance
      • 03 Creating Tables into Autonomous Data Warehouse through SQL Developer
      • 04 Load Data into OCI Object storage and import that data into Autonomous Data warehouse
      • 05 Create Autonomous Analytics Cloud ADW Connection and create Data Visualization
    • Oracle Database Cloud Service
    • Oracle Apex Cloud Service
    • Setting up MySQL PaaS on Oracle Cloud
  • SOA BPM IDM Portal Series
    • FMW
      • PS6, PS7, PS8 Install and Configuration
      • FMW Install Startup Scripts
      • Oracle 11gR2 and 12c Database on Linux / OEL / Fedora
      • Comprehensive Business Process Management - BPM 11g
      • Oracle Identity Mangement
    • Webcenter Portal
      • Webcenter UCM Integration PS5
      • Webcenter, BPM Process Spaces - UCM PS5
      • Webcenter Spaces
        • Custom Landing Page
      • Webcenter Sites Installation Linux
      • Art of Webcenter Templating
      • Webcenter Sites Look n feel
      • BPM UCM and Webcenter PS5
    • Process Cloud Service
      • Part 1 - Working with Process Cloud Service
      • Part 2 – How to Build Process , Data Persistence in Database Cloud Service
      • Part 3 – Invoking PCS Process from Oracle JET Framework
    • BPM Series
      • 01-Simple BPM Task Initiator
      • 02-Business Rules and Exclusive Gateway
      • 03-Service Invocation Adapters
      • 04-BPM as a Web Service
      • 05-Mediator and Conditional Service Routing
      • 06-BPM Composer - Runtime Edit
      • 07-BPM and JMS Adapters
      • Oracle BPM 12c features
    • SOA Series
      • Oracle SOA 11g DB Adapter
      • Oracle SOA 11g Business Rules
      • Oracle SOA 11g Mediator
      • SOA 11g AQ Adapters
      • Oracle OSB 11g

"Technology has the shelf life of a banana. By the time you buy it, implement it and train people on it, it’s obsolete. … ” as said by Mr Scott McNealy

© 2022 Cloud Blogs | Powered by Minimalist Blog WordPress Theme