Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Follow the instructions provided at the end of to connect to PCF Dev, by logging in using the admin user and choosing the pcfdev-org organization:

 

Code Block
cf login -a https://api.local.pcfdev.io --skip-ssl-validation

...

Now that the Joget Workflow platform has been deployed in Cloud Foundry, the final step is to setup the database schema, based on https://docs.cloudfoundry.org/devguide/services/migrate-db.html#single-migration.

...

Info

If you are using Joget Workflow prior to version 6.0.3, you need to modify the default Joget Workflow SQL setup script due to a limitation in MySQL for PCF where explicit locking is not supported i.e. LOCK TABLES.

SSH into the application:

Code Block
cf ssh joget

And download the modified script:

...

Code Block
curl https://raw.githubusercontent.com/jogetworkflow/jw-community/6.0.3/wflow-consoleweb/src/main/resources/setup/sql/jwdb-mysql.sql > ~/app/WEB-INF/classes/setup/sql/jwdb-mysql.sql

...

 
exit

...

At this point, we can obtain the MySQL database service credentials by viewing the environment variables:

Code Block
cf env joget

In particular, note down the p-mysql service hostname, port, name, username and password.

Code Block
System-Provided:

...


{

...


"VCAP_SERVICES": {

...


 "local-volume": [

...


  {

...


   "credentials": {},

...


   "label": "local-volume",

...


   "name": "jogetdata",

...


   "plan": "free-local-disk",

...


   "provider": null,

...


   "syslog_drain_url": null,

...


   "tags": [

...


    "local"

...


   ],

...


   "volume_mounts": [

...


    {

...


     "container_dir": "/home/vcap/wflow",

...


     "device_type": "shared",

...


     "mode": "rw"

...


    }

...


   ]

...


  }

...


 ],

...


 "p-mysql": [

...


  {

...


   "credentials": {

...


    "hostname": "mysql-broker.local.pcfdev.io",

...


    "jdbcUrl": "jdbc:mysql://mysql-broker.local.pcfdev.io:3306/cf_d13b2f40_c124_4c4b_a900_2269e10a7052?user=XMpalSAOEYcClZl2\u0026password=uSRs0B1D6NPNuLOe",

...


    "name": "cf_d13b2f40_c124_4c4b_a900_2269e10a7052",

...


    "password": "uSRs0B1D6NPNuLOe",

...


    "port": 3306,

...


    "uri": "mysql://XMpalSAOEYcClZl2:uSRs0B1D6NPNuLOe@mysql-broker.local.pcfdev.io:3306/cf_d13b2f40_c124_4c4b_a900_2269e10a7052?reconnect=true",

...


    "username": "XMpalSAOEYcClZl2"

...


   },

...


   "label": "p-mysql",

...


   "name": "jogetdb",

...


   "plan": "1gb",

...


   "provider": null,

...


   "syslog_drain_url": null,

...


   "tags": [

...


    "mysql"

...


   ],

...


   "volume_mounts": []

...


  }

...


 ]

...


}

...


}

...


{

...


"VCAP_APPLICATION": {

...


 "application_id": "a450291a-0440-4727-ba78-c65f12d99961",

...


 "application_name": "joget",

...


 "application_uris": [

...


  "joget.local.pcfdev.io"

...


 ],

...


 "application_version": "aedb8053-7288-4272-bcf7-85eab3dbd360",

...


 "cf_api": "http://api.local.pcfdev.io",

...


 "limits": {

...


  "disk": 512,

...


  "fds": 16384,

...


  "mem": 1024

...


 },

...


 "name": "joget",

...


 "space_id": "4376eb82-3935-49c1-b543-8df589392831",

...


 "space_name": "pcfdev-space",

...


 "uris": [

...


  "joget.local.pcfdev.io"

...


 ],

...


 "users": null,

...


 "version": "aedb8053-7288-4272-bcf7-85eab3dbd360"

...


}

...


}

...



User-Provided:

...


JBP_CONFIG_SPRING_AUTO_RECONFIGURATION: [enabled: false]

...


JBP_CONFIG_TOMCAT: {tomcat: {context_path: "/jw"}}


Access Joget Workflow at
http://joget.local.pcfdev.io/jw/ and you will be presented with the database setup page.

Proceed to setup the database according to the instructions at https://dev.joget.org/community/display/KBv6/Setting+Up+Database.

Image Modified

Once setup is complete, you will be brought to the Joget Workflow App Center.

Image Modified

Build a Complete App in 30 minutes, No Code!

With the Joget Workflow platform up and running, it is now possible to build a full-fledged app running on Cloud Foundry with dashboards, calendar, approval workflow and data management within 30 minutes. And, it can be done without coding and you essentially drag-and-drop, point-and-click and configure your way through instead. It’s also possible to use your touch device to build it.

Image Removed

Watch the 30 minute video below, which demonstrates an authentic, real-time example of building the app from scratch.

https://www.youtube.com/watch?v=edqxt9zx_IE 

To get started with Joget Workflow:


Appendix A: Application Manifest File

Optionally, an application manifest file can be used to specify environment variables and bind services.

manifest.yml:

Code Block
---

...


applications:

...


- name: joget

...


 memory: 1G

...


 buildpack: https://github.com/cloudfoundry/java-buildpack.git

...


 path: /path_to/jw.war

...


 services:

...


   - jogetdb

...


   - jogetdata

...


 env:

...


   JBP_CONFIG_SPRING_AUTO_RECONFIGURATION: '[enabled: false]'

...


   JBP_CONFIG_TOMCAT: '{tomcat: {context_path: "/jw"}}'

However, there is a limitation that the current version of Cloud Foundry does not support  specifying parameters when binding parameters, so binding of the local volume service to the Joget data directory has to be done manually:

Code Block
cf bind-service joget jogetdata -c '{"mount":"/home/vcap/wflow"}'
cf restage joget


Appendix B: Useful Cloud Foundry Commands

View application logs:

Code Block
cf logs joget


Restage the application after modifying service bindings or environment variables:

Code Block
cf restage joget


Stop PCF Dev VM:

Code Block
cf dev stop


Delete the PCF Dev VM:

Code Block
cf dev destroy


Uninstall the PCF Dev Plugin:

Code Block
cf uninstall-plugin pcfdev


View PCF Dev App Manager:

...