Recently, I was working on a BPM Project in 12c when all of a sudden JDeveloper could not render the project composite and SOA components. After further investigation, when trying to create a New Project, the options to create a new SOA or BPM application disappeared!
I could not figure out what the root cause of this was but the solution for the fix was to install the Spring components via JDeveloper Updates:
1. Click Help --> Check for updates
2. Tick all sources
3. Tick Spring
4. Click Next to install the update
5. Restart JDeveloper
The SOA and BPM options should be back!
Yet to complete.
Blog about Oracle Cloud and Oracle Fusion Middleware technology
Showing posts with label BPM. Show all posts
Showing posts with label BPM. Show all posts
Raise and Capture EDN Events for SOA / BPM Human Task Components
The Human Task component offers functionality to raise EDN events when certain actions related to a Task occur. The screenshot below shows the page in JDeveloper where this functionality can be initialised:
6. Click on the Magnifying glass and select HumanTaskEvent.edl. This definition is provided by Oracle and is located in MDS (ensure you have a connection to your SOA server MDS in resource palette) - it can be navigated to via the below structure:
7. Click OK and select the specific Event you want your Mediator to subscribe to. Considering we want to subscribe to Assign events, choose OnTaskAssigned from the list:
11. Inside the BPEL, drag in an Email component and populate the fields as such:
15. Launch the Flow Trace and we can see that an OnTaskAssigned Event was triggered, our SOAReceiveHumanTaskEvents service caught the event and the Mediator routed it to the TaskAssignedBPEL component:
16. To complete the example, the TaskAssignedBPEL sends out an Email Notification:
It is then your responsibility to implement the functionality that captures the triggered EDN events and process them in a way that fits your requirements.
I will cover an example where:
- An OnAssigned event is raised
- Captured by a Mediator in a separate SOA Composite
- BPEL in SOA Composite sends out an email notification.
Lets get started
1. We have a very basic SOA/BPM composite which has 1 BPMN and 1 Human Task component as follows:
2. We want to modify the Human Task component so that it raises EDN Events for specific actions. The below screenshot shows that the Human Task will fire OnAssign and OnCompleted EDN events.
Once you have completed that, there are no further modifications required for the current project. It has been configured so that an EDN event will be raised. The BPM project can be deployed to the SOA Server.
Now we must implement functionality to capture the specific EDN Events.
3. We will capture the EDN events in a new SOA composite. Create a new SOA Project SOAReceiveHumanTaskEvents:
4. In the SOA Composite, drag on a Mediator component. Select Subscribe to Events as the Mediator Template:
5. We must define the definition of the EDN event is captured, click on the Green plus icon:
7. Click OK and select the specific Event you want your Mediator to subscribe to. Considering we want to subscribe to Assign events, choose OnTaskAssigned from the list:
8. Click OK. In the Mediator Template, you can add further Event subscriptions so that your Mediator can subscribe to multiple events. You can then define the routing that takes place by the Mediator when a specific Event is captured. The below screenshot shows that the Mediator also subscribes to OnTaskCompleted events:
9. Once you click OK, your composite will look like this:
10. Now we need to implement a component to which the Mediator will route to once a specific EDN event is captured. We will add a simple BPEL component into the composite. There is a TaskNotification.xsd schema that can also be utilised from MDS for the input/output for the BPEL but for this example, it is not a requirement:
11. Inside the BPEL, drag in an Email component and populate the fields as such:
12. Once your BPEL is complete, close it and return to the Composite view. Now we need to add a wire from the Mediator to the BPEL component. Drag a wire from the Mediator to the BPEL - a dialog is displayed asking for the Operation to be triggered for a specific EDN event caught:
13. Once the Event Mediator has been wired, deploy the Composite to your SOA server so that we can test it.
14. Create a test instance for the BPM Project:
15. Launch the Flow Trace and we can see that an OnTaskAssigned Event was triggered, our SOAReceiveHumanTaskEvents service caught the event and the Mediator routed it to the TaskAssignedBPEL component:
16. To complete the example, the TaskAssignedBPEL sends out an Email Notification:
Further Comments
1. In this example, a separate SOA project was created to capture and process the EDN events. We could have implemented the Mediator to capture events within the BPM project. However, the separation approach increases abstraction, reduces complexity and improves maintainability.
2. Sending an Email at the end of the EDN capture event is just an example, but it shows the capabilities available. We can implement auditing mechanisms for each type of action on a Task or further extend the Notification capabilities available such as Sending an SMS, etc.
Configure User holidays or vacations for automatic Human Task assignment in Default and Custom BPM Workspace
This post is demonstrated using 11.1.1.7
Configuring User Holidays/Vacations in BPM is fairly straight forward. The users can set up Holidays and select other Users to reassign tasks to. So if a task is assigned to a specific User and that user is on holiday, then the task is automatically re-assigned to the User the user has chosen.
They can make use of this functionality via the Default BPM Workspace or from a custom BPM Workspace implementation.
Default BPM Workspace (localhost:port/bpm/workspace)
We will perform the User Holiday tests with our good friend jcooper.
1. Log into the BPM Workspace
2. Click on Preferences at the top right:
3. Click on Rules on the left:
4. Click on Vacation Period (disabled)
- Tick Enable Vacation Period
- Select the Start and End Date
- Tick Reassign to and look up the User you would like to reassign tasks to
- Click Save
Once saved, the Vacation Period rule will change to Vacation Period (enabled) to indicate that a Vacation/Holiday period is active:
5. The above step is the simple quick way to create a holiday period. The functionality offers a further advanced approach to setting up rule based reassignments based on certain conditions e.g. the task name. Multiple rules can be enabled so that assignment of different tasks can be handled in different ways.
To view this functionality, click on My Rules then click on the green plus. The below screenshot shows an example of what a user could enter:
6. To test the functionality, I have used a simple BPM process where the first step is a Human Task component and is assigned to jcooper when initialised.
Once a test case is created, when we drill into the initialised human task instance in the Flow Trace of the EM, we can see that it was firstly assigned to jcooper, then the reassignment vacation rule removed it from jcooper and created the same instance for achrist - our chosen reassignment candidate:
7. We can log into the BPM Workspace with achrist and find an instance of the BPM Process awaiting her attention:
Custom BPM Workspace
If you have a custom BPM application implemented via adflibTaskListTaskFlow.jar, then you can make use of the task flow provided by this jar. The task flow is called rules-task-flow-definition.
Expose this task flow on a page and the user will see the same Rules page from the Default BPM Workspace. Be sure to grant this task flow priviledges in jazn-data.xml before deploying.
Note: I do not think it is possible for an admin to control Vacation rules on behalf of Users using the UI. So if a User comes back from Vacation/Holiday, it is their responsibility to ensure that their Vacation Rules are correct. An admin may be able to modify Vacation Rules on behalf of the user using the BPM API... but that is a separate investigation and would require a separate post! :)
Configuring User Holidays/Vacations in BPM is fairly straight forward. The users can set up Holidays and select other Users to reassign tasks to. So if a task is assigned to a specific User and that user is on holiday, then the task is automatically re-assigned to the User the user has chosen.
They can make use of this functionality via the Default BPM Workspace or from a custom BPM Workspace implementation.
Default BPM Workspace (localhost:port/bpm/workspace)
We will perform the User Holiday tests with our good friend jcooper.
1. Log into the BPM Workspace
2. Click on Preferences at the top right:
- Tick Enable Vacation Period
- Select the Start and End Date
- Tick Reassign to and look up the User you would like to reassign tasks to
- Click Save
To view this functionality, click on My Rules then click on the green plus. The below screenshot shows an example of what a user could enter:
Once a test case is created, when we drill into the initialised human task instance in the Flow Trace of the EM, we can see that it was firstly assigned to jcooper, then the reassignment vacation rule removed it from jcooper and created the same instance for achrist - our chosen reassignment candidate:
Custom BPM Workspace
If you have a custom BPM application implemented via adflibTaskListTaskFlow.jar, then you can make use of the task flow provided by this jar. The task flow is called rules-task-flow-definition.
Expose this task flow on a page and the user will see the same Rules page from the Default BPM Workspace. Be sure to grant this task flow priviledges in jazn-data.xml before deploying.
Note: I do not think it is possible for an admin to control Vacation rules on behalf of Users using the UI. So if a User comes back from Vacation/Holiday, it is their responsibility to ensure that their Vacation Rules are correct. An admin may be able to modify Vacation Rules on behalf of the user using the BPM API... but that is a separate investigation and would require a separate post! :)
Part 2 - Send emails from Oracle BPM using Mail Activity - Implement Mail Activity in BPM
Before going ahead with this implementation, please ensure you have completed the EM Configuration. This can be completed by following Part 1 of this blog post:
Part 1 - Send emails from Oracle BPM using Mail Activity - Weblogic EM Configuration
Implement a send Mail activity within a BPM Process in JDeveloper BPM Studio
In a BPM Process there is quite often the requirement to send an email to user(s) to keep them updated or to make them aware of an event that has taken place. It is actually straight forward to achieve this.
We will use a very simple BPM process to illustrate:
Part 1 - Send emails from Oracle BPM using Mail Activity - Weblogic EM Configuration
Implement a send Mail activity within a BPM Process in JDeveloper BPM Studio
In a BPM Process there is quite often the requirement to send an email to user(s) to keep them updated or to make them aware of an event that has taken place. It is actually straight forward to achieve this.
We will use a very simple BPM process to illustrate:
1. Firstly, we will create a Data Object to store the entire output payload of the worked human task called Task_DO of type TaskExecutionData:
2. Next, select the Mail Activity from the Notification components:
And drag it into the BPM Process:
3. In the General tab, we populate 2 fields.
- Enter Default into the From Account field, this will be obtained from your configuration in EM.
- Enter the Email address you want to send an email to in the To field. This can also be extracted from a Data Object via XPath. To send to multiple emails, separate each email address with a semi colon (;)
4. In the Content tab, you populate the Subject and Body of the email. This can be made up of static text or from expressions as shown below:
For reference, the expression in the Body is: concat('Task Number ', bpmn:getDataObject('Task_DO')/ns:systemAttributes/ns:taskNumber, ' has been worked by ', bpmn:getDataObject('Task_DO')/ns:systemAttributes/ns:updatedBy/ns:displayName, ' with an outcome of ', bpmn:getDataObject('UserTask_outcome'))
5. We can also add attachments to the mail via the Attachments tab. The value must map to an element of type base64Binary, which holds the document in a binary format. The Mime Type must reflect the type of stored document too.
If you navigate back to your Composite, you will see a new external reference created to a Notification Service Web Service. The WSDL referenced is NotificationService.wsdl and is stored in MDS so you do not have to worry about maintaining it:
6. Now, your implementation from a development perspective is complete. Let's see the project in action.
Deploy the BPM project to your Weblogic SOA server.
7. Create an instance for the deployed BPM Project via EM:
8. Work the running instance of the Human Task:
9. Check the BPM Flow to confirm a successful flow.
10. Check your Email Inbox for the Email address you entered. Voila!
11. You can also monitor the status of instances of the Email User Messaging Driver from the EM:
Part 1 - Send emails from Oracle BPM using Mail Activity - Weblogic EM Configuration
To get sending Emails to work from your SOA/BPM process, there is a mandatory requirement to firstly configure Weblogic Enterprise Manager (EM) so that it registers with your Email server.
Once it has been set up, when a send Email component is implemented, it will use this configuration at run time to Send/Receive emails successfully. Follow below steps to make the required configuration in EM.
Part 2 of this blog post shows how to implement sending Emails in a BPM process (Link)
Assumptions
This post assumes you have an Email Server running successfully in your infrastructure.
Configure Weblogic Enterprise Manager (EM) to register with Email Server
1. Log into Weblogic Server EM (localhost:7001/em)
2. Click on soa-infra:
4. - Notification Mode: Select Email from the drop down.
- Email From Address: Enter an email address that ends with your Email Server domain name e.g. bpmadmin@CompanyDomainName.co.uk. This is the email address users will receive emails from.
- Email Actionable Address: Same as above
- Email Reply To Address: This is the reply email used when a user clicks reply on a sent email. If you do not support replies, then use something like no_reply@CompanyDomainName.co.uk
6. Next, on the same page, click on Go to the Messaging Driver Page:
8. Now, the main field to populate is OutgoingMailServer. In this field, populate with the Email Server name.
Our test Email Server does not require a Username and Password, however, yours might. If so, populate OutgoingUsername and OutgoingPassword.
The rest can be left as default.Once completed, click Apply:
Once it has been set up, when a send Email component is implemented, it will use this configuration at run time to Send/Receive emails successfully. Follow below steps to make the required configuration in EM.
Part 2 of this blog post shows how to implement sending Emails in a BPM process (Link)
Assumptions
This post assumes you have an Email Server running successfully in your infrastructure.
Configure Weblogic Enterprise Manager (EM) to register with Email Server
1. Log into Weblogic Server EM (localhost:7001/em)
2. Click on soa-infra:
3. Navigate to Workflow Properties via SOA Infratructure and SOA Administration:
- Email From Address: Enter an email address that ends with your Email Server domain name e.g. bpmadmin@CompanyDomainName.co.uk. This is the email address users will receive emails from.
- Email Actionable Address: Same as above
- Email Reply To Address: This is the reply email used when a user clicks reply on a sent email. If you do not support replies, then use something like no_reply@CompanyDomainName.co.uk
5. Click Apply.
Alternatively, you can also get to the same screen via the screenshot below:
7. For the User Messaging Email Driver, click on the pencil to Configure Driver:
8. Now, the main field to populate is OutgoingMailServer. In this field, populate with the Email Server name.
Our test Email Server does not require a Username and Password, however, yours might. If so, populate OutgoingUsername and OutgoingPassword.
The rest can be left as default.Once completed, click Apply:
Note: The above changes will support only sending emails, not receiving emails. If you would like to support receiving emails, then values need to be populated for IncomingMailServer too.
9. Once the above changes have been made, do not forget to restart your Weblogic Server for changes to take effect.
Once the server is back up, your server should be hopefully configured to support sending emails!
How to separate BPM 11g ADF Task page components from SOA/BPM to a new ADF managed server
If you haven't already, read this post. It gives a basic overview as to why we should split all ADF components from SOA/BPM, and the options available around this process as well as their pros and cons.
Oracle Documentation also provides a similar guide on this process (link). The difference is that this post is more specific and in-depth, trying to provide a more thorough guide from start to finish.
Versions of Oracle technology this post utilizes:
Weblogic: 10.3
JDeveloper: 11.1.1.6.0
BPM 11g
So we have a server (soa_server) and deployed to it are SOA + BPM processes + BPM ADF UI's (Human task pages) + an ADF application that manages the BPM solution. We shall be migrating all ADF components + BPM Task pages to a newly created managed server under the same server node, thus restoring the connection between the BPM process and its Task page over different server ports.
I will be referring to the SOA server that currently has all deployments as soa_server, and the newly created ADF/UI server as ui_server.
Pre-requisites
1. Un-deploy all UI (ADF + BPM task pages) from soa_server.
BPM Task page application - wf_client_config.xml
We need to include the above XML file into your BPM Task page application code so that when deployed to the ui_server, it will register to its corresponding BPM Process that resides on the soa_server. The property that refers to weblogic.jndi.WLInitialContextFactory will be created shortly.
Note: Each BPM Task page will require the insertion of this wf_client_config.xml file
1. We need to create a new XML file (if it does not already exist) called wf_client_config.xml under the directory: bpm_ui_code/public_html/WEB-INF/classes
2. Use the following template as the body of the code:
wf_client_config.xml
3. Do not forget to update the server_hostname_address for serverURL and rootEndPointURL. An example could be:
<serverURL>t3://tom.company-name.co.uk:8001</serverURL>
<rootEndPointURL>http://tom.company-name.co.uk:8001</rootEndPointURL>
4. Once complete, save the file. The rest of the configurations will take place inside the Server Console and EM.
Create new UI server
1. Log into your Server Console
2. Click servers and click New
3. Enter the following details:
Server Name: ui_server
Server Port: 8020 (You can choose any new port number, as long as it is not already used)
Should this server belong to a cluster? No, this is a stand-alone server
4. Click Finish
5. Click on the newly created server: ui_server
6. Click on the drop down for Machine and select your domain address from the list
7. In Listen Address, type your domain address
8. Click Save, then Activate Changes
9. Click on Servers, click Lock & Edit, click the Control tab, select ui_server and then click Start, and click Yes on the next screen.
Apply the Java Runtime Files (JRF) Template
When the JRF Template is applied to a Managed Server, the ADR libraries are added to the server in order to run ADF based application successfully:
1. Log into your Server EM
2. Expand the Weblogic Domain
3. Expand your_domain and click on ui_server
4. On the main panel, there is a button at the top 'Apply JRF Template'. Click on the button
5. Return to the Server Console and restart ui_server.
Configure Data Sources for ui_server
You need to point any Data Sources (Databases, MDS repositories etc) that are used in the application to the new ui_server:
1. Log into your Server Console
2. Click on Data Sources, click on your_data_source, click the Targets tab and tick the ui_server target. (Save and Activate changes)
3. Repeat the above step for all Data Sources that are used in your application.
Configure required Libraries for ui_server
Similar to configuring the Data Sources, we want to do the same for any libraries that are used by the ADF or BPM Task pages:
1. Log into your Server Console
2. Click on Deployments
3. You need to find out what specific libraries are used by your application. You can find some of the libraries by analysing the source code of weblogic-application.xml, which is found under every project (Application Resources -> Descriptors -> META-INF). The application I worked on used the following libraries:
- adf.oracle.domain
- adf.oracle.domain.webapp
- oracle.soa.workflow.wc
- oracle.soa.workflow
- oracle.soa.worklist.webapp
- oracle.soa.bpel
- oracle.bpm.runtime
- oracle.jsp.next
- jsf
- jstl
3. For each of the identified libraries, click on each one from the deployments list, then click the Targets tab and tick the ui_server target. (Activate changes after each one).
Create a new Foreign JNDI Provider
This new Foreign JNDI Provider is what the code in wf_client_config.xml will refer to, to allow the BPM Task page to communicate with its BPM Process on the soa_server
1. Log into your Server Console
2. Click on Services, click Foreign JNDI Providers and click New:
a. Set Name as: ForeignJNDIProvider-SOA
b. Click Next
c. Select the following as Targets - soa_server; ui_server
d. Click Finish
e. Click on the newly created Foreign JNDI Provider - ForeignJNDIProvider-SOA
f. Enter the following details:
i) Initial Context Factory: weblogic.jndi.WLInitialContextFactory
ii) Provider URL: t3://soa_hostname:soa_portnumber/soa-infra
iii) User: Weblogic username (weblogic)
iv) Password: Weblogic password (welcome1)
vi) Save and Activate changes.
3. Click the Links tab for the above ForeignJNDIProvider-SOA
4. For each of the 14 JNDI Links below, click New and create a Link with the specified information:
Name: ejb/bpel/services/workflow/TaskMetadataServiceBean
Local JNDI Name: ejb/bpel/services/workflow/TaskMetadataServiceBean_local
Remote JNDI Name: ejb/bpel/services/workflow/TaskMetadataServiceBean
Name: ejb/bpel/services/workflow/TaskServiceBean
Local JNDI Name: ejb/bpel/services/workflow/TaskServiceBean_local
Remote JNDI Name: ejb/bpel/services/workflow/TaskServiceBean
Name: ejb/bpel/services/workflow/TaskServiceGlobal/TransactionBean
Local JNDI Name: ejb/bpel/services/workflow/TaskServiceGlobal/TransactionBean_local
Remote JNDI Name: ejb/bpel/services/workflow/TaskServiceGlobal/TransactionBean
Name: ejb/bpm/services/BPMUserAuthenticationServiceBean
Local JNDI Name: ejb/bpm/services/BPMUserAuthenticationServiceBean_local
Remote JNDI Name: ejb/bpm/services/BPMUserAuthenticationServiceBean
Name: ejb/bpm/services/InstanceManagementServiceBean
Local JNDI Name: ejb/bpm/services/InstanceManagementServiceBean_local
Remote JNDI Name: ejb/bpm/services/InstanceManagementServiceBean
Name: ejb/bpm/services/InstanceQueryServiceBean
Local JNDI Name: ejb/bpm/services/InstanceQueryServiceBean_local
Remote JNDI Name: ejb/bpm/services/InstanceQueryServiceBean
Name: ejb/bpm/services/ProcessDashboardServiceBean
Local JNDI Name: ejb/bpm/services/ProcessDashboardServiceBean_local
Remote JNDI Name: ejb/bpm/services/ProcessDashboardServiceBean
Name: ejb/bpm/services/ProcessMetadataServiceBean
Local JNDI Name: ejb/bpm/services/ProcessMetadataServiceBean_local
Remote JNDI Name: ejb/bpm/services/ProcessMetadataServiceBean
Name: ejb/bpm/services/ProcessModelServiceBean
Local JNDI Name: ejb/bpm/services/ProcessModelServiceBean_local
Remote JNDI Name: ejb/bpm/services/ProcessModelServiceBean
Name: RuntimeConfigService
Local JNDI Name: RuntimeConfigService_local
Remote JNDI Name: RuntimeConfigService
Name: TaskEvidenceServiceBean
Local JNDI Name: TaskEvidenceServiceBean_local
Remote JNDI Name: TaskEvidenceServiceBean
Name: TaskQueryService
Local JNDI Name: TaskQueryService_local
Remote JNDI Name: TaskQueryService
Name: TaskReportServiceBean
Local JNDI Name: TaskReportServiceBean_local
Remote JNDI Name: TaskReportServiceBean
Name: UserMetadataService
Local JNDI Name: UserMetadataService_local
Remote JNDI Name: UserMetadataService
5. Save and Activate Changes
6. Click on the Targets tab for the newly created ForeignJNDIProvider-SOA
7. Ensure that soa_server and ui_server are ticked
8. Save and Activate changes
9. Restart both soa_server and ui_server (Shutdown then Start up).
Deployment of BPM Task pages + ADF
1a. If you are deploying your ADF/BPM Taskpage using JDeveloper, ensure you select the ui_server when selecting what managed server to deploy to
1b. If you are deploying using scripts (WLST), ensure you make the modifications required such as the name of the managed server or the port number to deploy to
2. Following the above deployment, your BPM Task should now be successfully registered with their corresponding BPM Processes that reside on the soa_server. Clicking on a task link should open the task page whose processing will take place on the ui_server.
Note
This process can also be followed during the architecture set up before any development takes place so that right from the beginning, all ADF deployments are on a separate server to any other non-ADF components.
When deploying to different environments further down the line (From a Development to Test environment), be sure to update any end points you have defined that initially point to a specific server. E.g. The server end points located in wf_client_config.xml (ServerURL and RootEndPointURL properties).
Any questions, feel free to ask.
Oracle Documentation also provides a similar guide on this process (link). The difference is that this post is more specific and in-depth, trying to provide a more thorough guide from start to finish.
Versions of Oracle technology this post utilizes:
Weblogic: 10.3
JDeveloper: 11.1.1.6.0
BPM 11g
So we have a server (soa_server) and deployed to it are SOA + BPM processes + BPM ADF UI's (Human task pages) + an ADF application that manages the BPM solution. We shall be migrating all ADF components + BPM Task pages to a newly created managed server under the same server node, thus restoring the connection between the BPM process and its Task page over different server ports.
I will be referring to the SOA server that currently has all deployments as soa_server, and the newly created ADF/UI server as ui_server.
Pre-requisites
1. Un-deploy all UI (ADF + BPM task pages) from soa_server.
BPM Task page application - wf_client_config.xml
We need to include the above XML file into your BPM Task page application code so that when deployed to the ui_server, it will register to its corresponding BPM Process that resides on the soa_server. The property that refers to weblogic.jndi.WLInitialContextFactory will be created shortly.
Note: Each BPM Task page will require the insertion of this wf_client_config.xml file
1. We need to create a new XML file (if it does not already exist) called wf_client_config.xml under the directory: bpm_ui_code/public_html/WEB-INF/classes
2. Use the following template as the body of the code:
wf_client_config.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <workflowServicesClientConfiguration xmlns="http://xmlns.oracle.com/bpel/services/client" clientType="REMOTE"> <server default="true" name="default"> <localClient> <participateInClientTransaction>false</participateInClientTransaction> </localClient> <remoteClient> <serverURL>t3://server_hostname_address:8001</serverURL> <initialContextFactory>weblogic.jndi.WLInitialContextFactory</initialContextFactory> <participateInClientTransaction>false</participateInClientTransaction> </remoteClient> <soapClient> <rootEndPointURL>http://server_hostname_address:8001</rootEndPointURL> <identityPropagation mode="dynamic" type="saml"> <policy-references> <policy-reference enabled="true" category="security" uri="oracle/wss10_saml_token_client_policy"/> </policy-references> </identityPropagation> </soapClient> </server> </workflowServicesClientConfiguration>
3. Do not forget to update the server_hostname_address for serverURL and rootEndPointURL. An example could be:
<serverURL>t3://tom.company-name.co.uk:8001</serverURL>
<rootEndPointURL>http://tom.company-name.co.uk:8001</rootEndPointURL>
4. Once complete, save the file. The rest of the configurations will take place inside the Server Console and EM.
Create new UI server
1. Log into your Server Console
2. Click servers and click New
3. Enter the following details:
Server Name: ui_server
Server Port: 8020 (You can choose any new port number, as long as it is not already used)
Should this server belong to a cluster? No, this is a stand-alone server
4. Click Finish
5. Click on the newly created server: ui_server
6. Click on the drop down for Machine and select your domain address from the list
7. In Listen Address, type your domain address
8. Click Save, then Activate Changes
9. Click on Servers, click Lock & Edit, click the Control tab, select ui_server and then click Start, and click Yes on the next screen.
Apply the Java Runtime Files (JRF) Template
When the JRF Template is applied to a Managed Server, the ADR libraries are added to the server in order to run ADF based application successfully:
1. Log into your Server EM
2. Expand the Weblogic Domain
3. Expand your_domain and click on ui_server
4. On the main panel, there is a button at the top 'Apply JRF Template'. Click on the button
5. Return to the Server Console and restart ui_server.
Configure Data Sources for ui_server
You need to point any Data Sources (Databases, MDS repositories etc) that are used in the application to the new ui_server:
1. Log into your Server Console
2. Click on Data Sources, click on your_data_source, click the Targets tab and tick the ui_server target. (Save and Activate changes)
3. Repeat the above step for all Data Sources that are used in your application.
Configure required Libraries for ui_server
Similar to configuring the Data Sources, we want to do the same for any libraries that are used by the ADF or BPM Task pages:
1. Log into your Server Console
2. Click on Deployments
3. You need to find out what specific libraries are used by your application. You can find some of the libraries by analysing the source code of weblogic-application.xml, which is found under every project (Application Resources -> Descriptors -> META-INF). The application I worked on used the following libraries:
- adf.oracle.domain
- adf.oracle.domain.webapp
- oracle.soa.workflow.wc
- oracle.soa.workflow
- oracle.soa.worklist.webapp
- oracle.soa.bpel
- oracle.bpm.runtime
- oracle.jsp.next
- jsf
- jstl
3. For each of the identified libraries, click on each one from the deployments list, then click the Targets tab and tick the ui_server target. (Activate changes after each one).
Create a new Foreign JNDI Provider
This new Foreign JNDI Provider is what the code in wf_client_config.xml will refer to, to allow the BPM Task page to communicate with its BPM Process on the soa_server
1. Log into your Server Console
2. Click on Services, click Foreign JNDI Providers and click New:
a. Set Name as: ForeignJNDIProvider-SOA
b. Click Next
c. Select the following as Targets - soa_server; ui_server
d. Click Finish
e. Click on the newly created Foreign JNDI Provider - ForeignJNDIProvider-SOA
f. Enter the following details:
i) Initial Context Factory: weblogic.jndi.WLInitialContextFactory
ii) Provider URL: t3://soa_hostname:soa_portnumber/soa-infra
iii) User: Weblogic username (weblogic)
iv) Password: Weblogic password (welcome1)
vi) Save and Activate changes.
3. Click the Links tab for the above ForeignJNDIProvider-SOA
4. For each of the 14 JNDI Links below, click New and create a Link with the specified information:
Name: ejb/bpel/services/workflow/TaskMetadataServiceBean
Local JNDI Name: ejb/bpel/services/workflow/TaskMetadataServiceBean_local
Remote JNDI Name: ejb/bpel/services/workflow/TaskMetadataServiceBean
Name: ejb/bpel/services/workflow/TaskServiceBean
Local JNDI Name: ejb/bpel/services/workflow/TaskServiceBean_local
Remote JNDI Name: ejb/bpel/services/workflow/TaskServiceBean
Name: ejb/bpel/services/workflow/TaskServiceGlobal/TransactionBean
Local JNDI Name: ejb/bpel/services/workflow/TaskServiceGlobal/TransactionBean_local
Remote JNDI Name: ejb/bpel/services/workflow/TaskServiceGlobal/TransactionBean
Name: ejb/bpm/services/BPMUserAuthenticationServiceBean
Local JNDI Name: ejb/bpm/services/BPMUserAuthenticationServiceBean_local
Remote JNDI Name: ejb/bpm/services/BPMUserAuthenticationServiceBean
Name: ejb/bpm/services/InstanceManagementServiceBean
Local JNDI Name: ejb/bpm/services/InstanceManagementServiceBean_local
Remote JNDI Name: ejb/bpm/services/InstanceManagementServiceBean
Name: ejb/bpm/services/InstanceQueryServiceBean
Local JNDI Name: ejb/bpm/services/InstanceQueryServiceBean_local
Remote JNDI Name: ejb/bpm/services/InstanceQueryServiceBean
Name: ejb/bpm/services/ProcessDashboardServiceBean
Local JNDI Name: ejb/bpm/services/ProcessDashboardServiceBean_local
Remote JNDI Name: ejb/bpm/services/ProcessDashboardServiceBean
Name: ejb/bpm/services/ProcessMetadataServiceBean
Local JNDI Name: ejb/bpm/services/ProcessMetadataServiceBean_local
Remote JNDI Name: ejb/bpm/services/ProcessMetadataServiceBean
Name: ejb/bpm/services/ProcessModelServiceBean
Local JNDI Name: ejb/bpm/services/ProcessModelServiceBean_local
Remote JNDI Name: ejb/bpm/services/ProcessModelServiceBean
Name: RuntimeConfigService
Local JNDI Name: RuntimeConfigService_local
Remote JNDI Name: RuntimeConfigService
Name: TaskEvidenceServiceBean
Local JNDI Name: TaskEvidenceServiceBean_local
Remote JNDI Name: TaskEvidenceServiceBean
Name: TaskQueryService
Local JNDI Name: TaskQueryService_local
Remote JNDI Name: TaskQueryService
Name: TaskReportServiceBean
Local JNDI Name: TaskReportServiceBean_local
Remote JNDI Name: TaskReportServiceBean
Name: UserMetadataService
Local JNDI Name: UserMetadataService_local
Remote JNDI Name: UserMetadataService
5. Save and Activate Changes
6. Click on the Targets tab for the newly created ForeignJNDIProvider-SOA
7. Ensure that soa_server and ui_server are ticked
8. Save and Activate changes
9. Restart both soa_server and ui_server (Shutdown then Start up).
Deployment of BPM Task pages + ADF
1a. If you are deploying your ADF/BPM Taskpage using JDeveloper, ensure you select the ui_server when selecting what managed server to deploy to
1b. If you are deploying using scripts (WLST), ensure you make the modifications required such as the name of the managed server or the port number to deploy to
2. Following the above deployment, your BPM Task should now be successfully registered with their corresponding BPM Processes that reside on the soa_server. Clicking on a task link should open the task page whose processing will take place on the ui_server.
Note
This process can also be followed during the architecture set up before any development takes place so that right from the beginning, all ADF deployments are on a separate server to any other non-ADF components.
When deploying to different environments further down the line (From a Development to Test environment), be sure to update any end points you have defined that initially point to a specific server. E.g. The server end points located in wf_client_config.xml (ServerURL and RootEndPointURL properties).
Any questions, feel free to ask.
Subscribe to:
Posts (Atom)











































