Skip to content

sbunciak/jbpm-drive-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jbpm-drive-integration

Sample integration of Google Drive within jBPM 6.

About

This project demonstrates how to interact with Google Drive from jBPM business process. It contains custom Workitem handler implementation which is responsible for authenticating using OAuth 2.0 protocol authorizing access to user data, and providing an easy-to-use API for communication with the Google Drive services.

Prerequisites

Before you start, you need to register your application for Drive API in Google Developers Console at https://cloud.google.com/console/flows/enableapi?apiid=drive and download application specific client_secrets.json. This JSON file needs to be placed in src/main/resources

Installation

  • You need to build this maven project:

      mvn clean install -DskipTests=true
    
  • Copy artifacts to jBPM installer:

      copy target/*.jar and target/lib/*.jar to jbpm-installer/dependencies
    
  • Add to jbpm-installer/conf/META-INF/CustomWorkItemHandlers.conf following definitions:

      ...
      "GoogleDriveGet" : new org.jbpm.google.handlers.GoogleDriveGet(),
      "GoogleDriveList" : new org.jbpm.google.handlers.GoogleDriveList(),
      "GoogleDriveUpload" : new org.jbpm.google.handlers.GoogleDriveUpload(),
      "GoogleDriveDelete" : new org.jbpm.google.handlers.GoogleDriveDelete(),
      "GoogleDriveUpdate" : new org.jbpm.google.handlers.GoogleDriveUpdate(),
      ...
    
  • Finally, run jbpm-installer, see http://docs.jboss.org/jbpm/v6.0/userguide/jBPMInstaller.html

Ready to go

Now You can create new project in jBPM console with use of Google Drive services. All you ned is to create WorkItemDefinitions in your jBPM project workspace according to WorkItems.wid

Sample

  • Create Process: Process designer
  • Complete task: Task
  • Voilà - file uploaded to Google Drive: Uploaded file

About

Sample integration of Google Drive in jBPM 6

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages