Sunday 2 December 2012

Modify the Business Space logout URL with wsadmin (Process Server V7)


# import the regular expression engine
import re

# Loop through all Resource Environment Providers searcing for the Mashups Config Service
for rep in AdminConfig.list('ResourceEnvironmentProvider').splitlines():
if(re.search("Mashups_ConfigService",rep)):
mashup_cs=rep

# Split out the propertySet into individual properties and search for the one containing the word logout
for ps in AdminConfig.show( AdminConfig.showAttribute(mashup_cs,"propertySet") ).split('resourceProperties')[1].split(']]')[0].split('[')[1].split(' '):
if(re.search("logout",ps)):
lou=ps

# now modify the URL
AdminConfig.modify(lou, '[[value "https://foo.com/logout.html"]]')

# Save
AdminConfig.save()

1 comment: