Showing posts with label bpms. Show all posts
Showing posts with label bpms. Show all posts

Wednesday, October 21, 2015

Using the Unified Push Server with BPMS

During this past Red Hat Summit I worked on a session with Mobile, Fuse and BPMS.  It was a great pleasure working with Phil SimpsonJavier Perez and  Maggie Hu to build and present the demo.  Below I walk through setting up and using the Push Notification Server.  For information on submitting claims through the mobile application and the adjudicator review you can review Maggie's Blog on Red Hat Mobile Application Platform - Connecting to JBoss BPMSuite REST.

Red Hat Summit 2015 - 
Photo Taken by Wanja Pernath

This article is part of a series we're putting together for the Build an Enterprise Application in 60 Minutes with JBoss Middleware session at the Summit. The original slide decks can be found below from Maggie on Slideshare. Please take a look at the slide decks to get a better idea on the use case we're working with.

Basically, we're allowing people to submit claims quickly from their mobile devices with some basic information when an auto accident happens. The claim will get submitted to the insurance company, an adjudicator will review the claim, set the settlement amount, and complete the claim. Then the policy holder will receive a push notification on their mobile device on the settlement amount.




What is Push Notification and its benefits?

A push notification is a message or alert delivered by a centralized server (on premise or cloud) to a device.   Unlike pull notifications, in which the client must request information from a server, push notifications originate from a server. Typically, the end user must opt-in to receive alerts; opt-in usually takes place during the install process and end users are provided with a way to manage alerts if they change their minds later on.

An important advantage of push notifications in mobile computing is that the technology doesn't require specific applications on a mobile device to be open in order for a message to be received. This allows a smartphone to receive and display social media or text message alerts even when the device's screen is locked and the social media application that is pushing the notification is closed.

The Red Hat Mobile Unified Push Server (Aerogear) can be seen as a broker that distributes push messages to different 3rd party Push Networks. The graphic below gives a little overview:


  1. One PushApplication and at least one mobile platform variant must be created.
  2. The variant credentials that are generated and stored by the UnifiedPush Server must be added to the mobile application source, enabling the application to register with the UnifiedPush Server once it is installed on mobile devices.
  3. Sending a push message can happen in different ways: The AdminUI can be used to send a (test) message to registered devices. However, in a real-world scenario the Push Notification Message request is triggered from a backend application, which sends its requests using the Sender API. Different SDKs for different languages are supported.
  4. The push request is then translated into platform specific details for the required variant Push Network. The Dashboard of the AdminUI gives a status report if a message is sent to the Push Network.
  5. The UnifiedPush Server does not directly deliver the message to the mobile device. This is done by the appropriate variant Push Network. Note: There can be latency in the actual delivery. Most Push Networks, such as APNs or GCM, do not guarantee to deliver messages to mobile devices.
Setting Up the Unified Push Server on Openshift

The Unified Push Server allows developers to send native push messages to Apple’s Push Notification Service (APNS) and Google’s Cloud Messaging (GCM). It features a built-in administration console that makes it easy for developers to create and manage the push related aspects of their applications for any mobile development environment. Includes client SDKs (iOS, Android, & Cordova), and a REST based sender service with an available Java sender library.

In our example we setup the UPS on Openshift instead of on premise and we do this through the Openshift Application Manager.  First we need a Openshift account.  You can sign up for a free account for 3 small gears.


Next we will create an openshift application.


We will use the Unified Push Server 1.0 Cartridge which will also add MySQL to the Application.  We can take the defaults and click Create Application Button.  After creating the application a credentials screen is displayed with URLs and credentials.


Now we can sign onto the console to create applications, variants, etc and monitor messages.  Let's open the dashboard for the Push Server, ie https://jbossunifiedpushtest2-ossmentor.rhcloud.com/ag-push, and login with admin/admin which will bring up the dasboard main screen.


Now we want to add an application to receive the push notifications.  We click on applications and the create application button.  Once created we can look at the variants.  This shows the application ID and Master Secret for the application which we will use in our example.



At this point we can create variants for Android and iOS.   For this first example we will create an application but won't use variants and register devices.  We will just show the notification getting to the push notification server.  Now that the application is created let's do a quick test.

Test sending a message to the UPS

I used the Advanced REST Client in Chrome to test the message.  I setup the project with the URL, the Authorization and Content Type as shown below.  I put in some sample data for the notification.


After clicking on send I get a Job submitted response and can lookup the message in the dashboard.



Now let's move onto how we can make the call from BPMS.

Sending a notification message from BPMS to the UPS



First in our Business Process we add the message in a script task to the Response Body for the REST call.

kcontext.setVariable("requestBody","{\"ttl\":3600,\"message\":{\"alert\":\"Your Payment Amount is:"+kcontext.getVariable("paymentAmount")+"\",\"action-category\":\"some value\",    \"sound\":\"default\",\"badge\":2,\"content-available\":true},\"simple-push\":\"version=123\"}");

Next in our Business Process we added a REST Task to make the call to the UPS to send the claim award message.  A couple of items to note on the Task.  The first is the data assignments.  The username is the Application ID and the password is the Master Secret as seen in the screen shots below.  Also note the URL for the domain REST API for UPS in addition to the Basic Authorization.




Note the App settings in addition to the Android Variant settings for Google Cloud messaging.
Also in the REST Task we setup the Data Input and Output as indicated below.

One additional item that was required is the work definition as displayed below.

import org.drools.core.process.core.datatype.impl.type.StringDataType;
import org.drools.core.process.core.datatype.impl.type.ObjectDataType;
[
  [
    "name" : "Email",
    "parameters" : [
      "From" : new StringDataType(),
      "To" : new StringDataType(),
      "Subject" : new StringDataType(),
      "Body" : new StringDataType()
    ],
    "displayName" : "Email",
    "icon" : "defaultemailicon.gif"
  ],
  [
    "name" : "Log",
    "parameters" : [
      "Message" : new StringDataType()
    ],
    "displayName" : "Log",
    "icon" : "defaultlogicon.gif"
  ],
  [
    "name" : "WebService",
    "parameters" : [
        "Url" : new StringDataType(),
         "Namespace" : new StringDataType(),
         "Interface" : new StringDataType(),
         "Operation" : new StringDataType(),
         "Parameter" : new StringDataType(),
         "Endpoint" : new StringDataType(),
         "Mode" : new StringDataType()
    ],
    "results" : [
        "Result" : new ObjectDataType(),
    ],
    "displayName" : "WS",
    "icon" : "defaultservicenodeicon.png"
  ],
  [
    "name" : "Rest",
    "parameters" : [
        "Url" : new StringDataType(),
        "Method" : new StringDataType(),
        "ConnectTimeout" : new StringDataType(),
        "ReadTimeout" : new StringDataType(),
        "Username" : new StringDataType(),
        "Password" : new StringDataType()
    ],
    "results" : [
        "Result" : new ObjectDataType(),
    ],
    "displayName" : "REST",
    "icon" : "defaultservicenodeicon.png"
  ]
]
That was all that is required to send a push notification from BPMS to the Unified Push server.  You can see the messages in the UPS console.
All variants associated with the Application in UPS will receive the notification.  We will cover the Android application in a follow up article to register the device with Google Cloud Messaging (GCM) and receive the notification. 

References:
http://searchconsumerization.techtarget.com/definition/push-notification
https://aerogear.org/docs/unifiedpush/ups_userguide/index/
https://developers.openshift.com/en/xpaas-unified-push.html

Thursday, October 15, 2015

Webinar: Build your next business application in 60 minutes

IT is at the center of change in application development as new approaches like DevOps emphasize rapid delivery of features and greater participation by end users and “citizen developers.” Middleware technologies such as integration, business rules, business process management (BPM), mobile application platforms, and Platform-as-a-Service (PaaS) are emerging as important tools for DevOps teams, greatly reducing the traditional coding requirements for new business applications.

Join us for this webinar to learn how two middleware technologies—business process management and mobile app development platforms—can work together in the cloud to support development of process-enabled mobile business apps. Through a real-word use case, we will demonstrate:
  • Development and deployment of a mobile business app using Red Hat® Mobile Application Platform.
  • Platform inclusion of captured mobile information into business processes with Red Hat JBoss® BPM Suite.
  • Integration of automated processes with systems of record with Red Hat JBoss Fuse.
    Speakers:
    Phil Simpson, senior principal product marketing manager, Red Hat
    Maggie Hu, middleware specialist solution architect, Red Hat
    Kenny Peeples, JBoss technology evangelist, Red Hat

    Join the live event:
    Time zone converter
    • Thursday, October 22, 2015 | 11 a.m. EDT | 8 a.m. PDT
    Register Now

    Monday, June 29, 2015

    Video for Craig Muzilla delivering the middleware keynote at 2015 Red Hat Summit

    The shift to a digital economy puts developers in a unique position where they can recognize opportunities to create new value. Craig Muzilla, senior vice president of the Red Hat Applications Product Group, and his team demonstrated a complete OpenShift Enterprise by Red Hat environment, building and deploying a mobile app in real time. He also announced a Red Hat and Samsung strategic alliance.




    Having the right middleware makes the things that should work, actually work. And it makes your IT team more productive.

    Learn more:
    • Accelerate: Applications are built, tested, and deployed faster.
    • Integrate: Systems and data are connected more easily.
    • Automate: Manual, time-consuming processes are automated.

    Wednesday, May 6, 2015

    Come join me at DevNation and Summit 2015 in Boston in June!

    I am looking forward to being involved in DevNation and Summit again this year.  I am involved in the following Events, Presentations and Demos.  I look forward to seeing everyone.

    Integration with Red Hat JBoss Fuse and Red Hat JBoss Data Virtualization

    Bill Kemp — Sr. Solutions Architect, Red Hat
    Kenneth Peeples — JBoss Technology Evangelist, Red Hat

    Learn how to build and deploy a Red Hat JBoss Fuse application using the JDBC and SQL Apache Camel components to integrate an Apache Camel route in JBoss Fuse with a virtual database (VDB) in JBoss Data Virtualization.

    Use the JBoss Fuse and Teiid Designer tools in Red Hat JBoss Developer Studio to build and deploy the VDB and Apache Camel routes that will access and mediate records from the VDB.

    Wednesday, June 24 4:50 pm - 5:50 pm

    Why real integration developers ride Camels

    Kenneth Peeples — JBoss Technology Evangelist, Red Hat
    Christian Posta - Principal Middleware Specialist, Red Hat

    Apache Camel is a powerful integration framework that is the foundation of popular open source integration platforms like JBoss Fuse.

    While the open community, analysts, and our customers agree that Apache Camel is better for integration, some people choose proprietary competitor products because they’re not sure what Apache Camel can do.

    In this session, we’ll clear up the misconceptions. We’ll focus on areas that competitors feel are weaknesses, and address why Apache Camel and JBoss Fuse are ideal choices for integrating applications, systems, and microservices.

    Wednesday, June 24 1:20 pm - 2:20 pm

    Build an enterprise application in 60 minutes with JBoss Middleware

    Kenneth Peeples — JBoss Technology Evangelist, Red Hat
    Javier Perez — Director Of Product Management And Global Consulting, Red Hat
    Phil Simpson — Principal Product Marketing Manager, Red Hat

    As businesses seek new ways to engage their customers, the demand for new applications increases. To meet the growing demand, IT is turning to new application development approaches, like DevOps, to quickly develop features.

    By using certain middleware technologies, DevOps teams can collaboratively and rapidly develop and manage applications that engage customers and connect to back-end services and legacy systems.

    In this session, we’ll demonstrate how 3 middleware technologies--integration, business process management (BPM), and mobile--can be brought together in the cloud to support the development of context-aware, process-enabled, connected mobile apps.

    Through a real-word use case, we’ll demonstrate:

    • Development and deployment of an enterprise mobile app using Red Hat Mobile Application Platform.
    • Inclusion of captured mobile information into business processes with Red Hat JBoss BPM Suite.
    • Integration of automated processes with legacy applications and systems of record with JBoss integration solutions, including Apache Camel.
    • Automation of business decisions guided by business rules.

    Friday, June 26 9:45 am - 10:45 am


    Code Challenge

    Show your coding skills and win prizes at the DevNation Code Challenge! Take showcased technologies from Cloud, Mobile and Data Services and build something to let your creativity shine. Bring your friends and present your extraordinary project that you’ve built together (or on your own!) to the judges to win prizes.

    Monday, June 22, 6:00PM - 2:00AM

    Friday, March 20, 2015

    Preview of Build your next enterprise application in 60 minutes with JBoss Middleware

    I am pleased to announced that our talk below was accepted at Summit 2015.   Our initial architecture is described in the diagram below as well as the abstract.  


    Abstract: Business demands for new applications are increasing as businesses seek new ways to engage with their customers. As a result IT is at the center of a sea change in application development as new approaches like DevOps emphasize rapid delivery of features and greater participation by end users and “citizen developers”.

    Middleware technologies such as integration, business rules, BPM , mobile application platforms and Platform-as-a-Service (PaaS) are emerging as important tools for DevOps teams, greatly reducing the traditional coding requirements for new business applications. With appropriate use of middleware, DevOps teams can collaboratively and rapidly develop and manage applications that engage customers and connect to back end services and legacy systems.

    Join us for this session where we will show how three middleware technologies – integration, business process management and mobile – can be brought together in the cloud to support development of context-aware, process enabled, connected enterprise mobile apps. We’ll show you how to delight your employees and customers with modern solutions that deliver results quickly and yet integrate seamlessly into existing infrastructure. Through a real-word use-case we will demonstrate:
    • Development and deployment of an enterprise mobile app using FeedHenry’s Mobile Application Platform
    • Inclusion of captured mobile information into business processes with JBoss BPM Suite
    • Integration of automated processes with legacy applications and systems of record with JBoss integration solutions
    • Automation of business decisions guided by business rules
    • Attendees will gain an appreciation for the ease with which middleware-enabled applications can support ever-changing business needs, and an understanding of the benefits of Red Hat JBoss Middleware products.

    Wednesday, March 4, 2015

    The new JBoss Demo Central Github Organization and Site


    I am pleased to announce, along with the other JBoss Technology Evangelist -Eric Schabell, Thomas Qvarnstrom and Christina Lin, our Central Organization for JBoss Demo Repositories is available.  The team has worked hard to pull together existing content and start new content as well.

    There are two ways to access jbossdemocentral -
    1) The website with an easy to navigate front end to access the source code, videos, articles, etc for each demo - http://jbossdemocentral.comhttp://jbossdemocentral.com/#/
    2) The github organization with all the source code repositories for the demos -http://github.com/jbossdemocentralhttps://github.com/jbossdemocentral/

    Give the demos a try and follow us on twitter and our blogs!

    Monday, October 27, 2014

    The past week in review for the JBoss Community

    This week is my first time posting for the weekly editorial and excited to join the team. There is a lot to highlight for this weeks editorial. Autumn is now upon us in the Northern Hemisphere which marks the transition from summer to winter. The arrival of night is earlier, temperature is cooling and leaves are turning color as well as falling. I was at the Boston office a couple of weeks ago and the area was beautiful with the change in the color of the leaves in addition to the cool weather. With the transition of warm to cold weather autumn is known as the primary harvest with many harvest festivals celebrated across the globe. Whether you celebrate Labor Thanksgiving Day in Japan, the Dutch Feast of Saint Martin of Tours, American Thanksgiving Feast, Canadian Thanksgiving Feast, German Martinmas, Czech Republic Posviceni/Obzinky, Chinese Harvest Moon Festival, etc., have a great Autumn.

    Now on to our exciting JBoss weekly content

    Job Opening


    Red Hat is the best company in the world to work. I have enjoyed Red Hat since day one and continue to enjoy the work, the people and the open source culture. We have a current job opening for a Software Sustaining Engineer who will help improve the quality of the BRMS and BPM Suite platforms which are the productised versions of the Drools and jBPM open source projects. So if you love Drools and jBPM, and want to help make them even better and even more robust - then this is the job for you The role is remote, so you can be based almost anywhere.


    Events


    We had several events that took place plus some coming up:
    • 300+ kids, 16 speakers (4 from middle/high school), 6 rooms, 24 sessions of 75 mins each = extremely rewarding weekend + inspired kids! Silicon Valley Code Camp Kids (SVCC.kids) is a one-day event that is a new addition to the famous Silicon Valley Code Camp (SVCC) event. The event was held at Foothill College in Los Altos Hills, CA on October 12th.
    • DecisionCAMP 2014 took place at San Jose on October 13-15 which is a free conference in the San Jose area for business rules and decision management practitioners. The conference concentrates on Business Rules and Decision Management. Decision Management is the art or science, depending on your perspective, of automating decisions in your systems.
    • Last week was the Openslava 2014 Conference for emerging technologies and open-source in Bratislava, Slovakia. Videos from the talks will be published soon. Markus Eisele posted a Trip Report which also included a video and presentation on 50 best features of Java EE 7.
    • Coming up in November we have several people from Red Hat involved at Devoxx BE 2014. Devoxx has grown to be one of the most popular Java conferences series in Europe. This year we are excited to announce that JBoss will be presenting a keynote on the future capabilities of PaaS. We have severalspeakers who are speaking on a variety of topics. Visit JBoss Community members at Devoxx University, the Hackergarten, the sessions or have a drink with us at Nox!

    Blog/Articles


    A lot of blogs and articles were posted the last couple of weeks so I listed them here for your reading pleasure:
    1. JBoss Teiid
    2. JBoss BRMS and JBoss BPM Suite
    3. JBoss Fuse
    4. JBoss Wildfly
    5. JBoss Aerogear
    • Markus Eisele provided another episode his developer interview which took place with Matthias Wessendorf. Matthias is working at Red Hat where he is leading the AeroGear project. Previously, he was the PMC Chair of the Apache MyFaces project. Matthias is a regular conference speaker.

    Releases


    The last couple of weeks we had several new project releases. Take all of them for a spin and enjoy!
    • JBoss Tools and Developer Studio for Eclipse Luna! There have been many feature additions and a lot of bug fixing polish going into this main release and these have been documented/described in details atWhat’s New.
    • Immutant 2 (The Deuce) Alpha2 Released! We're as happy as a cat getting vacuumed to announce our second alpha release of The Deuce, Immutant 2.0.0-alpha2. Big, special thanks to all our early adopters who provided invaluable feedback on alpha1 and our incremental releases.
    • Infinispan 7.0.0.CR2 released! As we approach final release, the main themes of this CR were bug fixes and enhancements, many related to Partition Handling.
    • JGroups 3.6.0.Final released! We just released 3.6.0.Final to SourceForge [1] and Nexus. It contains a few new features, but mostly optimizations and a few bug fixes. It is a small release before starting work on the big 4.0.
    • RichFaces 4.5.0.CR2 Release Announcement! We have a second candidate release for RichFaces 4.5 (4.5.0.CR2) available. We’ve fixed a couple of regressions uncovered by both our community and QA team.
    • Teiid 8.9 CR1 Posted! After a small delay Teiid 8.9 CR1 has been posted to the maven repository and the download page.
    • SwitchYard 2.0.0.Alpha3 Now Available! The SwitchYard team has been making steady progress on the 2.0 release and I'm pleased to announce the latest preview of SwitchYard 2.0, Alpha3. We're rapidly approaching beta quality and the only think keeping this release from being called a beta is the lack of support for BPM and rules components on WildFly. Overall, the team has made great progress improving stability, especially on Fuse/Karaf.

    That's all for this week, please join us next week when we will share more news about the JBoss Community.

    Wednesday, October 8, 2014

    Red Hat JBoss BPM Suite Workshop in Washington, DC


    Attend Red Hat's complementary, hands-on technical workshop and experience Red Hat JBoss BPM Suite on November 5, 2014 from 8:30am to 5:00pm at MicroTek in Washington, DC.   Learn how introducing business process management can help your organization respond faster to changing business environments and update applications more quickly.

    By attending this one day workshop you'll be able to:

      * Reduce the time required to update applications, SOA deployments, and business processes with the latest business rules and policies.
      * Work with hands-on labs based on real-world case studies led by  experienced solution architects.
      * Learn about business workflows, complex event processing, and business process from the people who brought you the Drools community project and Red Hat JBoss BRMS.

    For more information and to register, visit:

    https://engage.redhat.com/jboss-bpm-suite-workshop-e-201409291104?sc_cid=70160000000eBqfAAE

    MicroTek
     1110 Vermont Ave. NW
    Washington, DC 20005
    (800) 207-9620

    Wednesday, September 3, 2014

    New integration scenarios highlighted in JBoss BPM Suite & JBoss FSW integration demo

    Eric Schabell has started us out on a great demo with 2 of our Red Hat JBoss Middleware products.  This demo shows off the integration between JBoss BPM Suite and JBoss FSW. This initial announcement provides an automated installation (repeatable) in minutes where you get JBoss BPM Suite running on an instance of JBoss EAP and a separate instance of JBoss FSW on its very own EAP instance. There are plans to expand this demo project with various integration scenarios or use cases, but for now we start with just a single story around using JBoss FSW governance integration to manage your rules, events, data models, processes, and other BPM artifacts.

    Background

    We will be expanding this project in the coming days to include a Switchyard services application that will leverage a Fuse camel route which in turn makes a call to a process running on JBoss BPM Suite.

    Governance workflow
    There will be more expansion such as calling a Switchyard services application from a BPM process and much more so stay tuned. The project can be found on github and has documentation to get you up and running in minutes.

    Governance process

    The S-RAMP and DTGov tooling comes with a standard process that was designed using the same BPM Suite tools you are using to create your process projects.
    Email task notification
    It models the process you work through when you run mvn deploy in the provided demo project, which uploads the project artifacts into the S-RAMP repository and automatically starts a process instance for the new artifact.

    Installing and running

    The following steps will get you up and running in a matter of minutes with this fully automated and repeatable demo:
    1. Add products to installs directory.
    2. Run 'init.sh' or 'init.bat'.
    3. Copy this code snippet into your ~/.m2/settings.xml (authorization for s-ramp repository):
      <!-- Added for BPM Suite Governance demo -->
      <server>
       <id>local-sramp-repo</id>
       <username>erics</username>
       <password>jbossfsw1!</password>
      </server>
      
    Follow the instructions on the screen to start JBoss BPM Suite server and JBoss Fuse Service Works server.
       Login to http://localhost:8180/business-central  (u:erics / p:bpmsuite1!).
    
       Login to http://localhost:8080/s-ramp-ui         (u:erics / p:jbossfsw1!)
    
       As a developer you have a modified project pom.xml (found in projects/customer)
       which includes an s-ramp wagon and s-ramp repository locations for transporting any
       artifacts we build with 'mvn deploy'.
    
            $ mvn deploy -f projects/customer/evaluation/pom.xml
    
       The customer project now has been deployed in s-ramp repository where you can view
       the artifacts and see that the governance process in the s-ramp was automatically
       started. Claim the approval task in dashboard available in your browser and see the
       rewards artifact deployed in /tmp/dev copied to /tmp/qa upon approval:
    
            http://localhost:8080/s-ramp-ui            u:erics/p:jbossfsw1!       
    
       The example of promoting through dev to qa to stage to prod is an example of using
       a local filesystem for this demo.
    
           $ ls /tmp/dev/
    
             evaluation-1.0.jar
    
           $ ls /tmp/qa/
    
             evaluation-1.0.jar
    Note that the setup puts JBoss FSW product on port 8080 and JBoss BPM Suite on port 8180 (offset 100).

    Artifact repository
    The FSW S-RAMP and DTGov installation is configured to automatically react to any deployments of the provided customer evaluation project, kicking off an instance of the process to start evaluating and approving or rejecting the artifact build for the next level of your infrastructure. The current demo setup just uses the following file system locations to show progression but you can configure this to make use of existing continuous integration infrastructure in your own enterprise as needed.
    • /tmp/dev
    • /tmp/qa
    • /tmp/stage
    • /tmp/prod
    If at each stage you approve the task waiting in the S-RAMP UI, it will copy the artifact to the new /tmp/dev folder, but after approving the waiting task you will find a new copy in /tmp/qa. deployment stage. This video walks you through the installation and BPM artifact governance use case in just under 10 minutes:
    We hope you enjoy this new demo showcasing JBoss FSW governance integration with JBoss BPM Suite.