Monday, September 3, 2012

Extending WebCenter 11g with BPM Process Spaces

I recently extended my WebCenter Spaces with BPM process spaces. Since there has been lot of speculation & issues in successfully getting this done, this post attempts to act as a reference guide and detail the step-by-step process for extending the WebCenter Spaces with BPM process spaces.

Firstly ensure that all your managed servers are down (including AdminServer).

Step 1: Run the config.sh from the WebCenter home ($Middleware_Home/Oracle_WC/common/bin)

Step 2: Choose 'Extend an existing WebLogic domain' option

Step 3: Select the domain directory

Step 4: In the 'Select Extension Source' window, choose 'Extend my domain using an existing extension template' option

Step 5: Browse for 'oracle.bpm.spaces_template_11.1.1.jar' template. This can be found under '$Middleware_Home/Oracle_WC/common/templates/applications' folder

Step 6: On next, ensure that the domain is extended with WebCenter process spaces. This will now allow you to embed and use BPM 11g features from within the WebCenter spaces portal

Now that we have completed the first part by extending the domain with process space, we have to perform some configuration in Oracle UCM (Unified Content Management) server.

Step 7: Login to ECM as weblogic - Default URL would be http://<hostname>:16200/cs

Note: At the time of first login to Oracle ECM, make sure to configure the server socket port to 4444. This is very important for external applications (like WebCenter spaces) to communicate with content server via the RIDC - Intra Doc Communication protocol


Step 8: Here we should enable the following options (if not already enabled)

Administration -> AdminServer

Under Component Manager enable the following;

  • WebCenterConfigure
  • DynamicConverter
  • Folders_g (You will have to click on 'advanced component manager' link at the top of the page to enable this).

It will be important to note that "FrameworkFolders" option description under the component manager page states that it is a replacement for the 'Folders_g' option. But process spaces will work only if 'Folders_g' is enable and will not work with 'FrameworkFolders'

Now that the options are enabled in ECM, the UCM_server 1 managed server has to be restarted for changes to take effect. After restart ensure that all managed servers are up and running.

Step 9: Login to EM console (http://<hostname>:7001/em) and ensure that the Intradoc Server Port is configured properly;


Now, try and access the WebCenter spaces portal (http://hostname:port/webcenter/spaces)
If there is an issue with access, check whether mds-soa datasource (JNDI: jdbc/mds/MDS_LocalTxDataSource) is targeted on WC_Spaces managed server. If not, please target the data source on the WC_Spaces server.

Configuring the process spaces in WebCenter:

Step 10: Configure the following properties in the process-portal-install.properties file which is available under $MIDDLEWARE_HOME/Oracle_SOA1/bpm/process_spaces
The description is available against every property within the properties file. I am stating it here with sample values just for convenience;
Property
Description
Sample Value
extendSoa
Flag to decide whether to extend existing BPM domain or create a new one. Set extendSoa to true, if the webcenter space and the SOA server are running in the same domain. Set extendSoa to false, if the webcenter space and the SOA server are running in different domains.
true
promptForPasswords
Flag to decide whether install will prompt for passwords or read them from this file.
false
Setting up Domain Global Trust
wcSetDomainRealmPassword
Flag to control whether to set domain realm password or not, set to true if extendSoa is false.
false
wcDomainRealmPassword
This is the password to setup trusted domains. Same password should be set on BPM domain as well.
welcome1
wc.server.port
WebCenter server port.
8888
BPM Schema and MDS Details
bpmDBUser
SOA DB Schema name
DEV_SOAINFRA
bpmDBPassword
SOA schema password
welcome1
bpmDBType
Type of DB
ORACLE
bpmDBDriver
DB Driver class
oracle.jdbc.OracleDriver
bpmDBUrl
SOA DB connect string
jdbc:oracle:thin:@localhost:1521:orcl
bpmMDSUser
BPM MDS username
DEV_MDS
bpmMDSPassword
BPM MDS password
welcome1
BPM Runtime Details
bpmServerURL
Specify the BPM server URL (t3://<bpmHost>:<bpmRuntimePort>) in the case of a single
t3://localhost:8001
bpmAdminUser
Admin username
weblogic
bpmAdminPassword
Admin password
welcome1
Webcenter Spaces Installation Details
wcOracleHome
Provide the oracle home location of the webcenter install.
/oracle/ofm/11g/wc_home
wcDomainName
Provide the Webcenter domain name. If extendSoa flag has been set to true, Webcenter domain name should be the same as SOA domain name. If extendSoa flag has been to false, Webcenter domain name will be different from SOA domain name.
fmw_domain
isWebcenterClusterConfig
Pass 'true' if in cluster mode, 'false' otherwise.
false
wcSpacesClusterName
Specify the name of the webcenter spaces cluster.

wcHost
WebCenter hostname
localhost
wcAdminPort
WebCenter port
7001
wcAdminUser
WebCenter Admin username
weblogic
wcAdminPwd
WebCenter Admin password
welcome1
wcManagedServerName
In the case of a single server environment, specify the name of the Webcenter Spaces Managed server. In a clustered environment, specify the name of any one of the Spaces managed servers that is part of the Cluster.
WC_Spaces
wcConfigServices
Flag to control whether to configure services
true
Content Server Details
wcContentServerName
Content Server hostname
localhost
wcContentServerPort
Content Server port
4444
wcContentSpacesRoot
Content Server spaces root
/WebCenter0809
wcContentAdminUser
Content Server Admin username
weblogic
Discussion Server Details
wcDiscussionServerUrl
Discussions Server URL
http://localhost:8890/owc_discussions
wcDiscussionAdminUser
Admin username
weblogic

Step 11: Now, execute the following Ant script from the following location $MIDDLEWARE_HOME/Oracle_SOA1/bpm/process_spaces. This will configure the BPM process spaces in WebCenter spaces.

$MIDDLEWARE_HOME/modules/org.apache.ant_1.7.1/bin/ant –f install.xml

Ensure that the script ran without any errors. In case of errors, please correct them before proceeding further. More often than not, the property values could cause issues if not set properly.

Sample Output should be something like below;

Buildfile: install.xml

readPasswords:

validate-env:
     [echo] Validating the environment..
     [echo] Successfully contacted discussion server running at http://localhost:8890/owc_discussions.
     [echo] Successfully contacted content server running at localhost:4444.

post-install:
     [echo] This target can also be called by setting 'piArgs' property for fine grained operations.
     [echo]         Possible values are:
     [echo]           -importRCOnly -- Imports only resource catalogs and exits.
     [echo]           -importGSOnly -- Imports only group spaces and exits.
     [echo]           -configDSOnly -- Configures data sources when SOA domain is not extended
     [echo]           -foreignJndiOnly -- Configures foreign JNDI links
     [echo]           -deploySTCOnly -- deploys server test case ejb
     [echo]           -all (default) -- Does all post install activies including all above
     [echo] Invoking post install script with args: -all
     .......................
     .......................
     .......................
     [exec] Initializing WebLogic Scripting Tool (WLST) ...
     [exec]
     [exec]
     [exec] Welcome to WebLogic Server Administration Scripting Shell
     [exec]
     [exec] Type help() for help on available commands
     [exec]
     [exec] Connecting to t3://localhost:7001 with userid weblogic ...
     [exec] Successfully connected to Admin Server 'AdminServer' that belongs to domain 'ofmdomain'.
     [exec]
     [exec] Warning: An insecure protocol was used to connect to the
     [exec] server. To ensure on-the-wire security, the SSL port or
     [exec] Admin port should be used instead.
     [exec]
     [exec] Location changed to edit tree. This is a writable tree with
     [exec] DomainMBean as the root. To make changes you will need to start
     [exec] an edit session via startEdit().
     [exec]
     [exec] For more help, use help(edit)
     [exec]
     [exec] Starting an edit session ...
     [exec] Started edit session, please be sure to save and activate your
     [exec] changes once you are done.
     [exec] Creating Foreign JNDI links to BPM Runtime...
     [exec] Updating deployment targets for the datasources...
     [exec] Activating all your changes, this may take a while ...
     [exec] The edit lock associated with this edit session is released
     [exec] once the activation is completed.
     [exec] Activation completed
     [exec] Importing Resource Catalogs...
     [exec] Importing resource catalog: $Middleware_Home\Oracle_WC1\bpm\process_spaces\resourceCatalog\ProcessSpacesCatalog.ear
     [exec] Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root.
     [exec] For more help, use help(domainRuntime)
     [exec]
     [exec] Imported $Middleware_Home\Oracle_WC1\bpm\process_spaces\resourceCatalog\ProcessSpacesCatalog.ear
     [exec]
     [exec] Configuring webcenter services...
     [exec] Configuring webcenter to point to content server: localhost Port: 4444
     [exec]
     [exec] The Documents primary connection is "portal-content-server"
     [exec] Created connection "portal-content-server".
     [exec] To effect connection changes, you must restart the managed server on which the WebCenter application is deployed.
     [exec]
     [exec] Setting the spaces root on content server to :/WebCenter0809
     [exec]
     [exec]
     [exec]
     [exec] To effect connection changes, you must restart the managed server on which the WebCenter application is deployed.
     [exec]
     [exec] Configuring webcenter to point to the discussions server: http://localhost:8890/owc_discussions
     [exec]
     [exec] Created connection "portal-discussions".
     [exec] To effect connection changes, you must restart the managed server on which the WebCenter application is depl
oyed.
     [exec] Property "selected.connection" with value "portal-discussions" successfully added to service with id "oracle.webcenter.collab.forum"
     [exec] To effect connection changes, you must restart the managed server on which the WebCenter application is deployed.
     [exec] Property "selected.connection" with value "portal-discussions" successfully added to service with id "oracle.webcenter.collab.announcement"
     [exec] To effect connection changes, you must restart the managed server on which the WebCenter application is deployed.
     [exec]
     [exec] Services are configured. You need to restart webcenter to import BPM Process Portal group spaces. Call this script with '-importGSOnly' to import group spaces
     [exec] Grant PolicyStoreAccessPermission to oracle.bpm.pml.security.jar .....
     [exec]
     [exec] oracle.security.jps.service.policystore.PolicyStoreAccessPermission Granted to file:${wc.oracle.home}/soa/modules/oracle.bpm.runtime_11.1.1/oracle.bpm.pml.security.jar.

stop-webcenter:
    [mkdir] Created dir: C:\Users\satannam\AppData\Local\Temp\pp
    [touch] Creating C:\Users\satannam\AppData\Local\Temp\pp\shutdown.py
     [java]
     [java] Initializing WebLogic Scripting Tool (WLST) ...
     [java]
     [java] Welcome to WebLogic Server Administration Scripting Shell
     [java]
     [java] Type help() for help on available commands
     [java]
     [java] Connecting to t3://localhost:7001 with userid weblogic ...
     [java] Successfully connected to Admin Server 'AdminServer' that belongs to domain 'ofmdomain'.
     [java]
     [java] Warning: An insecure protocol was used to connect to the
     [java] server. To ensure on-the-wire security, the SSL port or
     [java] Admin port should be used instead.
     [java]
     [java] Shutting down the server WC_Spaces with force=true while connected to AdminServer ...
     [java] .

install-spaces:
     [echo] process portal installation completed. Please start the managed server now.

install:

BUILD SUCCESSFUL
Total time: 53 seconds


Step 12: Start the WebCenter managed server back as this script will shutdown the managed server. Check all other managed servers are running okay. If not restart them.

Step 13: Execution of above script will result in creation of couple of connections in the WC_Spaces portal. Now,  login to EM console -> Expand WebCenter -> Portal -> Spaces -> WebCenter Portal (11.1.1)(WC_Spaces). Choose WebCenter Portal -> Settings -> Service Configuration.

Under the WebCenter Portal Service Configuration, choose "Content Repository" from Service Name and edit the portal-content-server connection.

In the Edit Content Repository Connection screen, change the Administrator User Name from sysadmin to weblogic.

You will be required to restart the WC_Spaces server after the connection update. Restart the WC_Spaces managed server.

Step 14: Change the following property values in the process-portal-install.properties file

extendSoa=false

Step 15: Now, execute the Ant script again with the following flag/option. This will import the group spaces into the WebCenter spaces.

$MIDDLEWARE_HOME/modules/org.apache.ant_1.7.1/bin/ant –f install.xml -DpiArgs="-importGSOnly"

Step 16: Ensure that the script ran without errors. If any errors are encountered at this stage, rectify them and re-run the Ant script before proceeding further.

Output of the above script will be something like below;

Buildfile: install.xml

readPasswords:

post-install:
     [echo] This target can also be called by setting 'piArgs' property for fine grained operations.
     [echo]         Possible values are:
     [echo]           -importRCOnly -- Imports only resource catalogs and exits.
     [echo]           -importGSOnly -- Imports only group spaces and exits.
     [echo]           -configDSOnly -- Configures data sources when SOA domain is not extended
     [echo]           -foreignJndiOnly -- Configures foreign JNDI links
     [echo]           -deploySTCOnly -- deploys server test case ejb
     [echo]           -all (default) -- Does all post install activies including all above
     [echo] Invoking post install script with args: -importGSOnly
     .........................
     .........................
     .........................
     [exec] Initializing WebLogic Scripting Tool (WLST) ...
     [exec]
     [exec]
     [exec] Welcome to WebLogic Server Administration Scripting Shell
     [exec]
     [exec] Type help() for help on available commands
     [exec]
     [exec] Connecting to t3://localhost:7001 with userid weblogic ...
     [exec] Successfully connected to Admin Server 'AdminServer' that belongs to domain 'ofmdomain'.
     [exec]
     [exec] Warning: An insecure protocol was used to connect to the
     [exec] server. To ensure on-the-wire security, the SSL port or
     [exec] Admin port should be used instead.
     [exec]
     [exec] Importing group spaces into webcenter...
     [exec] Importing group space: $Middleware_Home\Oracle_WC1\bpm\process_spaces\groupspaces\default-modeling-workspace-gs.ear
     [exec] Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root.
     [exec] For more help, use help(domainRuntime)
     [exec]
     [exec] Imported $Middleware_Home\Oracle_WC1\bpm\process_spaces\groupspaces\default-modeling-workspace-gs.ear
     [exec]
     [exec] Importing group space: $Middleware_Home\Oracle_WC1\bpm\process_spaces\groupspaces\default-modeling-workspace-gst.ear
     [exec]
     [exec] Imported $Middleware_Home\Oracle_WC1\bpm\process_spaces\groupspaces\default-modeling-workspace-gst.ear
     [exec]
     [exec] Importing group space: $Middleware_Home\Oracle_WC1\bpm\process_spaces\groupspaces\default-process-workspace-gs.ear

     [exec]
     [exec] Imported $Middleware_Home\Oracle_WC1\bpm\process_spaces\groupspaces\default-process-workspace-gs.ear
     [exec]
     [exec] Importing group space: $Middleware_Home\Oracle_WC1\bpm\process_spaces\groupspaces\default-process-workspace-gst.ear
     [exec]
     [exec] Imported $Middleware_Home\Oracle_WC1\bpm\process_spaces\groupspaces\default-process-workspace-gst.ear
     [exec]
     [exec] Importing group space: $Middleware_Home\Oracle_WC1\bpm\process_spaces\groupspaces\process-instance-gst.ear
     [exec]
     [exec] Imported $Middleware_Home\Oracle_WC1\bpm\process_spaces\groupspaces\process-instance-gst.ear
     [exec]
     [exec]
     [exec]
     [exec] Exiting WebLogic Scripting Tool.
     [exec]

BUILD SUCCESSFUL
Total time: 32 seconds


Step 17: This script will shutdown the WebCenter managed server and the Admin server. Restart the Admin server and WebCenter managed servers.

Step 18: Check whether the following users are already provisioned in ECM. If not create them manually.
Login to ECM http://<hostname>:16200/cs
Choose Administration -> Admin Applets

Click on User Admin and add the following users and grant all roles to these users
PersonalSpaces
ProcessPortal



Step 19: All set! Login to WebCenter spaces and verify that the BPM group spaces are available. That is a good sign that the WebCenter spaces portal has been extended successfully with BPM process spaces.



11 comments:

  1. After setting the file process-portal-install.properties and have set the path environment variable to the ANT.
    When i execute a command ant -f install.xml i can see the next error

    [exec] Updating deployment targets for the datasources...
    [exec] This Exception occurred at Tue Dec 18 14:32:49 EST 2012.
    [exec] javax.management.InvalidAttributeValueException: Array has at least one null element
    [exec] Problem invoking WLST - Traceback (innermost last):
    [exec] File "/opt/oracle/Middleware/Oracle_SOA1/bpm/process_spaces/wc-post-install.py", line 253, in ?
    [exec] File "/opt/oracle/Middleware/Oracle_SOA1/bpm/process_spaces/wc-post-install.py", line 112, in updateTargets
    [exec] File "", line 581, in set
    [exec] File "", line 1847, in raiseWLSTException
    [exec] WLSTException: Error occured while performing set : Error setting attribute Targets : Array has at least one null element
    [exec] Use dumpStack() to view the full stacktrace
    [exec]

    BUILD FAILED
    /opt/oracle/Middleware/Oracle_SOA1/bpm/process_spaces/install.xml:207: exec returned: 1

    Someone know the cause of this error??
    Thanks in advance

    ReplyDelete
    Replies
    1. Not sure of the root cause from the provided info. But more often than not, the line numbers in the error guides us to the problem area. Check the line numbers 253 & 112 in wc-post-install.py python script.

      Delete
  2. Hi Sathya,

    We followed the process to patch BPM Workspace from 11.1.1.6 to 11.1.1.7. We are having following issues so far:

    1. ProcessWorkspace 11.1.1.7 could not be loaded on the first page. I know this issue from 11.1.1.6 due to the "Group Calendar" taskflow somehow endlessly hungry for to transfer data chunk. The issue is gone if we remove Calendar.

    2. Worklist BPM 11.1.1.7 does not work probably anymore. I can see the UI change. Issue happen when user clicks on any the the view with MDS error : oramds, could not find soa-infra-config.xml . And create custom view also does not work.

    We did run the script so many time ( no major error) but no success

    ReplyDelete
    Replies
    1. Hi,

      Appreciate your comments.

      I would suggest you to speak to Oracle support to get this issue resolved.

      To be honest, it is very difficult to debug/suggest remedies remotely with such shallow information. Let me know how it goes. Thanks!

      Delete
  3. Hi Sathya, nice post.

    I'm trying to do this integration with separete products/servers. 3 servers in different domains. Soa domain, WCContent domain and Portal domain.

    Any additional steps to do?? I do all the steps you mentioned but no positive results. Ant scripts finished build succesfull, but i see a lot of errors... please your help..

    [exec] Imported /oracle/Middleware/Oracle_WC1/bpm/process_spaces/resourceCatalog/ProcessSpacesCatalog.ear
    [exec]
    [exec] Skipping webcenter services configuration...
    [exec] Importing group spaces into webcenter...
    [exec] Importing group space: /oracle/Middleware/Oracle_WC1/bpm/process_spaces/groupspaces/default-process-workspace-gst.ear
    [exec]
    [exec] Error occurred while performing import
    [exec] Error provisioning document library for a scope in the import set.
    [exec] Please check the WebCenter Portal: Spaces Server log files for additional details.
    [exec]
    [exec] Importing group space: /oracle/Middleware/Oracle_WC1/bpm/process_spaces/groupspaces/default-modeling-workspace-gst.ear
    [exec]
    [exec] Error occurred while performing import
    [exec] Error provisioning document library for a scope in the import set.
    [exec] Please check the WebCenter Portal: Spaces Server log files for additional details.
    [exec]
    [exec] Importing group space: /oracle/Middleware/Oracle_WC1/bpm/process_spaces/groupspaces/default-process-workspace-gs.ear
    [exec]
    [exec] Error occurred while performing import
    [exec] Error provisioning document library for a scope in the import set.
    [exec] Please check the WebCenter Portal: Spaces Server log files for additional details.
    [exec]
    [exec] Importing group space: /oracle/Middleware/Oracle_WC1/bpm/process_spaces/groupspaces/process-instance-gst.ear
    [exec]
    [exec] Imported /oracle/Middleware/Oracle_WC1/bpm/process_spaces/groupspaces/process-instance-gst.ear
    [exec]
    [exec] Importing group space: /oracle/Middleware/Oracle_WC1/bpm/process_spaces/groupspaces/default-modeling-workspace-gs.ear
    [exec]
    [exec] Error occurred while performing import
    [exec] Error provisioning document library for a scope in the import set.
    [exec] Please check the WebCenter Portal: Spaces Server log files for additional details.

    ReplyDelete
    Replies
    1. Hi,

      Firstly, if your installations are on different domains, you will have to perform additional steps to establish trust between the domains. In the "Domain Global Domain Trust" section, change "wcSetDomainRealmPassword" property value to true and provide a password. The same password must be setup in your SOA domain so that WebCenter & BPM/SOA domains can communicate.

      To do this, go to weblogic console of soa domain, go to security tab -> General -> Expand Advanced section and enter the same credentials as webcenter domain realm password.

      Then proceed with script execution. Hope that helps.

      Delete
  4. Hello, first of all thank you for sharing. And i have a questions. Why I’m getting this error?

    C:\Oracle\Middleware\Oracle_SOA1\bpm\process_spaces>C:\Oracle\Middleware\modules
    \org.apache.ant_1.7.1\bin\ant -f install.xml
    Buildfile: install.xml

    BUILD FAILED
    C:\Oracle\Middleware\Oracle_SOA1\bpm\process_spaces\install.xml:82: C:\Oracle\Mi
    ddleware\Oracle_SOA1\bpm\process_spaces\modules not found.

    in this line gives the error. help me please.

    line 82 : -taskdef resource=”net/sf/antcontrib/antcontrib.properties” classpathref=”ant.contrib.lib”-
    line 83 : -taskdef name=”xmltask”
    classname=”com.oopsconsultancy.xmltask.ant.XmlTask” classpath=”${wcOracleHome}/bpm/process_spaces/util/xmltask.jar”-

    ReplyDelete
    Replies
    1. Sounds like a faulty install. Check if the modules folder exist. If you still face problems, raise a ticket with Oracle support - they can do a detailed analysis on your environment.

      Delete
  5. HI Sathya-

    We are having BPM & Web Center both running on different domains. We have extended spaces to integrate BPM in web center domain and also configured the domains using cross domain security.

    After the installation process, we are having an issue where when we click the process spaces we are not able to edit the space (or) the pages is not displayed in the space. Also, the BPM task flows have been broken. Please let me know what can be done in order to work the process spaces as expected.

    Thanks,
    Swaroop

    ReplyDelete
  6. C:\Oracle\Mi
    ddleware\Oracle_SOA1\bpm\process_spaces\modules - instead of this, give forward slash and try. i faced similar problem.

    Thanks,
    Chinna

    ReplyDelete
  7. Hi Sathya,

    Excellent article with great efforts.

    Thanks a lot.
    -Prashant

    ReplyDelete