0 votes
637 views
in IBM BPM Infrastructure by

1 Answer

0 votes
ago by (30.6k points)

WebSphere environment entries and JVM custom properties are readable from server-side JavaScript through Java, and WebSphere variables (${APP_INSTALL_ROOT} style) through the expansion API - useful for paths and per-node settings that must not live in the process app:

// JVM custom property (Servers > server > Java and Process Management > Process definition > JVM > Custom properties)
var region = String(java.lang.System.getProperty("company.region", "EU"));
// OS environment variable of the JVM process
var home = String(java.lang.System.getenv("BPM_DATA_HOME") || "/data");
// (WebSphere variables of the Environment page are not exposed to scripts - mirror the ones you need as JVM custom properties)
// practical: JVM custom property or OS variable is enough for 95% of cases
var dataHome = String(java.lang.System.getProperty("bpm.data.home") || java.lang.System.getenv("BPM_DATA_HOME") || "/data");
tw.local.inboundFolder = dataHome + "/in";
// WebSphere variable expansion (traditional): the server name / node name
var installRoot = String(java.lang.System.getProperty("was.install.root") || "");

Which to use for what: BPM environment variables (process app level, per snapshot / server, editable in Process Admin) for application configuration - the intended mechanism; JVM custom properties for per-JVM / per-node technical settings (paths, feature switches for a member) - set once per member, read with System.getProperty; OS variables only when the platform injects them (containers: Kubernetes env from ConfigMaps / Secrets - on CP4BA that is the natural way to pass secrets to Java integrations); WebSphere variables for WebSphere resources (data source paths, library references), rarely needed in process code. On CP4BA there is no WebSphere admin console: JVM properties go into jvm_customize_options of the CR and env vars into the pod spec through the operator's custom settings.

References

Related questions

0 votes
1 answer 2.5k views
0 votes
1 answer 794 views
0 votes
1 answer 668 views
0 votes
1 answer 1.8k views
0 votes
1 answer 672 views
0 votes
1 answer 1.2k views
0 votes
2 answers 3.1k views
asked Oct 16, 2017 in Coach Views by qaziMateen (120 points)
0 votes
1 answer 2.8k views
0 votes
1 answer 3.0k views
0 votes
1 answer 1.6k views
asked May 19, 2016 in Team Services by anonymous
0 votes
4 answers 4.5k views
0 votes
1 answer 1.4k views
0 votes
1 answer 686 views
0 votes
2 answers 4.7k views

723 questions

807 answers

98 comments

4.9k users

Join BPM Community Discord Channel

Welcome to BPM Tips Q&A, Community wiki/forum where you can ask questions and receive answers from other IBM BPM experts and members of the community. Users with 2000 points will automatically be promoted to expert level.
Created by Dosvak LLC
Our Youtube Channel
...