Configuring URL for Brazos UI Attach File control in IBM BPM 8.5.x

Follow

Introduction

It's a common scenario to use Load Balancer (LB) URL or any other front-end URL in IBM BPM instead of BPM server hostname URL to access Process Portal and other IBM BPM applications.

Brazos UI also depends on IBM BPM URLs for downloading files uploaded with the Attach File control. Properly configuring the IBM BPM environment to use front-end/LB URLs will insure a consistent URL exposure to end users.

Issue

When using the Brazos UI Attach File control to upload a file and then checking the download URL for this file you see something like:

https://BPM_host:port/...

Even though the URL that you have used to login to BPM Portal in the browser could be your Load Balancer URL (something like: https://LB_URL/...).

Resolution

This issue is a BPM configuration issue rather than Brazos UI one because the URL that is being used in this scenario is coming from IBM BPM.

In IBM BPM, depending on the complexity of your topology and security setup, you might have to configure several different types of URLs. Those are called "scenarios" in IBM BPM and they were first introduced in 8.5.0 version.

You may find detailed information about all the different scenario in this IBM Knowledge Center article.

In this particular case, the scenario that is used by IBM BPM to generate download URLs for the attached files uploaded with the Brazos UI Attach File control is called EXTERNAL_CLIENT

Examples

Example 1:

  • wsadmin code that can be used to change EXTERNAL_CLIENT BPMURL in IBM BPM 8.5.0.1 and 8.5.5:

-Set variables for LB host and port

lbUrl='LBURL.domain.com'
lbPort='443'
lbProtocol='https'

-Display current virtual hosts and default virtual host for DE

dePath='/Cell:'+AdminControl.getCell()+'/BPMCellConfigExtension:/BPMDeploymentEnvironment:/'
de=AdminConfig.getid(dePath) deId=AdminConfig.getid(dePath) print AdminConfig.showAttribute(deId,'virtualHosts') print AdminConfig.showAttribute(deId,'defaultVH')

-Create new virtual host for DE that matches DNS alias and set it as default

default_vh=AdminConfig.create('BPMVirtualHostInfo',deId,[['name','<DE_NAME_HERE>'],['transportProtocol',lbProtocol],['hostname','lbURL'],['port',lbPort],['uriPrefix','']],'virtualHosts')
AdminConfig.modify(deId,[['defaultVH',default_vh]])

-Find EXTERNAL_CLIENT scenario and add created DE virtual host to it

bpmurlsid=AdminConfig.getid(dePath+'BPMURLS:/')
bpmurllist=AdminConfig.list("BPMURL", bpmurlsid).split()
print AdminConfig.showAttribute(bpmurllist[0],'scenario') 
// perform next step only if previous command returned 'EXTERNAL_CLIENT', if not - iterate through bpmurlist objects
AdminConfig.modify(bpmurllist[0],[['virtualHost',default_vh]])

-Save

AdminConfig.save()

Exit wsadmin shell

Example 2:

  • Syntax/commands has been slightly changed in 8.5.6 compared to 8.5.0.1 and 8.5.5. More detailed information can be found in IBM Knowledge Center article. Old commands will still work for 8.5.6. but below you will find an IBM BPM 8.5.6 code example:

-Set variables for LB host and port

//use the same commands as in previous example

-Display current virtual hosts and default virtual host for DE

//use the same commands as in previous example

 - Create new virtual host for DE and set it as default


default_vh = AdminTask.setBPMVirtualHost(['-de', '<DE_NAME_HERE>', '-name', '<vh_deployment_env_name>', '-transportProtocol', lbProtocol, '-hostname', lbURL, '-port', lbPort])
AdminTask.setBPMDefaultVirtualHost( [ '-de', '<DE_NAME_HERE>', '-name', '<vh_deployment_env_name>'])

-Find EXTERNAL_CLIENT scenario and add created DE virtual host to it

//use the same commands as in previous example

-Save

AdminConfig.save()

Exit wsadmin shell

Have more questions? Submit a request

Comments

Powered by Zendesk