Just to finish off my review of this book -
Chapter 5 - Setting up B2B Transactions
discusses the B2B lifecycle from creating documents, trading partner agreements, reporting and monitoring etc. It also introduces integration with SOA Suite and enterprise manager.
Chapter 6 - SOA Suite Integration
A step by step guide to creating a B2B SOA Composite. Also contains a very useful section
on B2B design best practices.
Chapter 7 - Reporting and Monitoring
Covers usage of B2B itself, Enterpise Manager and BAM for reporting purposes.
Explains succinctly what you get OOTB and how easy it is to provide value-add via BAM.
Chapter 8 - Exception Handling
Covers exception handling at B2B level ( inbound/outbound), SOA Composite level and also covers custom exception handling.
Chapter 9 - Oracle B2B Security Management
This chapter details the security features available OOTB with B2B along with the integration with Oracle FMW security infrastructure.
Chapter 10 - Preparing to go -live
The chapter title is self-explanatory - a must read!
Chapter 11 - Advanced Topics.
Covers Java callouts, the extremely valuable B2B Self-Service Utility along with the relevant APIS.
Again, a must read!
All in all an excellent book - heavy on examples - a real Hands-On...
Well done Scott et al.
Again, the Link
Monday, September 30, 2013
# 278 BPM API - Initiator Tasks
Here is my composite -
Here is the app link in Workspace
Now I want to initiate via the API.
First Kudos to Rommel Pino's post here
A great starting point -
Anyway - let's get a list of the Initiable Processes I have deployed, and then initiate the above process.
I create a project in jdev and include the following jars -
Code -
package initiatorapi;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import oracle.bpel.services.bpm.common.IBPMContext;
import oracle.bpel.services.workflow.client.IWorkflowServiceClient;
import oracle.bpel.services.workflow.client.IWorkflowServiceClientConstants;
import oracle.bpel.services.workflow.client.WorkflowServiceClientFactory;
import oracle.bpel.services.workflow.task.model.Task;
import oracle.bpm.client.BPMServiceClientFactory;
import oracle.bpm.services.client.IBPMServiceClient;
import oracle.bpm.services.instancemanagement.IInstanceManagementService;
import oracle.bpm.services.processmetadata.IProcessMetadataService;
import oracle.bpm.services.processmetadata.ProcessMetadataSummary;
public class InitiableProcesses {
private static String url = "t3://localhost:7001";
public InitiableProcesses() {
super();
}
public void getInitiatiableProcesses() {
System.out.println("getInitiatiableProcesses()");
try {
IProcessMetadataService service =
getBPMServiceClient().getProcessMetadataService();
IBPMContext bpmContext = getIBPMContext("weblogic", "welcome1");
List initiableTasks =
service.getInitiatableProcesses(bpmContext);
for (ProcessMetadataSummary pms : initiableTasks) {
System.out.println(pms.getProjectName() + "/" +
pms.getProcessName());
System.out.println("App Link " +
pms.getApplicationLinkDisplayName());
}
} catch (Exception e) {
e.printStackTrace();
}
System.out.println(" #################### ");
}
public void initiateProcess(String processName) {
System.out.println(" +++ initiateProcess() for " + processName);
try {
IBPMServiceClient ibsc = getBPMServiceClient();
IProcessMetadataService service =
getBPMServiceClient().getProcessMetadataService();
IBPMContext bpmContext = getIBPMContext("weblogic", "welcome1");
List initiableTasks =
service.getInitiatableProcesses(bpmContext);
for (ProcessMetadataSummary pms : initiableTasks) {
System.out.println("++++ Process Name = " + pms.getProjectName() + "/" +
pms.getProcessName());
if (pms.getProcessName().equalsIgnoreCase(processName)) {
IInstanceManagementService ims =
ibsc.getInstanceManagementService();
Task task =
ims.createProcessInstanceTask(bpmContext, pms.getCompositeDN() +
"/" +
pms.getProcessName());
System.out.println("++++ Task title = " + task.getTitle());
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
public void initiate() {
}
// Connect to WLS
public static BPMServiceClientFactory getBPMServiceClientFactory() {
Map properties =
new HashMap();
properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.CLIENT_TYPE,
WorkflowServiceClientFactory.REMOTE_CLIENT);
properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_PROVIDER_URL,
url);
properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
return BPMServiceClientFactory.getInstance(properties, null, null);
}
public static IBPMContext getIBPMContext(String username,
String password) throws Exception {
return getBPMServiceClientFactory().getBPMUserAuthenticationService().authenticate(username,
password.toCharArray(),
null);
}
public static IWorkflowServiceClient getIWorkflowServiceClient() {
return getBPMServiceClientFactory().getWorkflowServiceClient();
}
public static IBPMServiceClient getBPMServiceClient() {
return getBPMServiceClientFactory().getBPMServiceClient();
}
//
}
Here is the app link in Workspace
Now I want to initiate via the API.
First Kudos to Rommel Pino's post here
A great starting point -
Anyway - let's get a list of the Initiable Processes I have deployed, and then initiate the above process.
I create a project in jdev and include the following jars -
Code -
package initiatorapi;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import oracle.bpel.services.bpm.common.IBPMContext;
import oracle.bpel.services.workflow.client.IWorkflowServiceClient;
import oracle.bpel.services.workflow.client.IWorkflowServiceClientConstants;
import oracle.bpel.services.workflow.client.WorkflowServiceClientFactory;
import oracle.bpel.services.workflow.task.model.Task;
import oracle.bpm.client.BPMServiceClientFactory;
import oracle.bpm.services.client.IBPMServiceClient;
import oracle.bpm.services.instancemanagement.IInstanceManagementService;
import oracle.bpm.services.processmetadata.IProcessMetadataService;
import oracle.bpm.services.processmetadata.ProcessMetadataSummary;
public class InitiableProcesses {
private static String url = "t3://localhost:7001";
public InitiableProcesses() {
super();
}
public void getInitiatiableProcesses() {
System.out.println("getInitiatiableProcesses()");
try {
IProcessMetadataService service =
getBPMServiceClient().getProcessMetadataService();
IBPMContext bpmContext = getIBPMContext("weblogic", "welcome1");
List
service.getInitiatableProcesses(bpmContext);
for (ProcessMetadataSummary pms : initiableTasks) {
System.out.println(pms.getProjectName() + "/" +
pms.getProcessName());
System.out.println("App Link " +
pms.getApplicationLinkDisplayName());
}
} catch (Exception e) {
e.printStackTrace();
}
System.out.println(" #################### ");
}
public void initiateProcess(String processName) {
System.out.println(" +++ initiateProcess() for " + processName);
try {
IBPMServiceClient ibsc = getBPMServiceClient();
IProcessMetadataService service =
getBPMServiceClient().getProcessMetadataService();
IBPMContext bpmContext = getIBPMContext("weblogic", "welcome1");
List
service.getInitiatableProcesses(bpmContext);
for (ProcessMetadataSummary pms : initiableTasks) {
System.out.println("++++ Process Name = " + pms.getProjectName() + "/" +
pms.getProcessName());
if (pms.getProcessName().equalsIgnoreCase(processName)) {
IInstanceManagementService ims =
ibsc.getInstanceManagementService();
Task task =
ims.createProcessInstanceTask(bpmContext, pms.getCompositeDN() +
"/" +
pms.getProcessName());
System.out.println("++++ Task title = " + task.getTitle());
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
public void initiate() {
}
// Connect to WLS
public static BPMServiceClientFactory getBPMServiceClientFactory() {
Map
new HashMap
properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.CLIENT_TYPE,
WorkflowServiceClientFactory.REMOTE_CLIENT);
properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_PROVIDER_URL,
url);
properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
return BPMServiceClientFactory.getInstance(properties, null, null);
}
public static IBPMContext getIBPMContext(String username,
String password) throws Exception {
return getBPMServiceClientFactory().getBPMUserAuthenticationService().authenticate(username,
password.toCharArray(),
null);
}
public static IWorkflowServiceClient getIWorkflowServiceClient() {
return getBPMServiceClientFactory().getWorkflowServiceClient();
}
public static IBPMServiceClient getBPMServiceClient() {
return getBPMServiceClientFactory().getBPMServiceClient();
}
//
}
Test a couple of times -
I now log in to workspace as weblogic -
Now let's check the roles for this process -
Test the API with jstein/welcome1
I change the method so as to pass in user/pwd -
Re-test -
Tuesday, September 24, 2013
Thursday, September 12, 2013
#276 B2B Chapters 3 & 4
Chapter 3
B2B app development has a lot to do with document definitions. This chapter introduces one to the
Oracle Document Editor - B2B's design time authoring tool. Here you can create your B2B docs and also generate sample data and test validation.
Chapter 4
Deals with Trading Partner Management - essentially you are "configuring and tracking your endpoints outside of the enterprise boundaries". The authors go deep down into the functionality available here - the trading partner profiles - including message sequencing, delivery channels, agreements etc.
The Book
Wednesday, August 21, 2013
#274 New Oracle B2B book from Packt - Chapter 1 & 2
Just got my hands on -
An excellent tome for developers and architects -
Chapter 1 - B2B Overview
This chapter gives us a short history of B2B electronic document exchange, thus setting the context for the rest of the book. It discusses the different connection models - hub and spoke, peer 2 peer etc, the relevant B2B standards - EDI X12, ebXML etc. In summary a good grounding in B2B basics.
Chapter 2 - Oracle B2B Overview
Oracle B2B sits on top of SOA Suite and leverages it's SCA architecture. For those new to SOA Suite please see http://www.oracle.com/us/products/middleware/soa/suite/overview/index.html
This chapter begins by guiding you thru the setup and configuration of a B2B vm, downloadable from OTN. Very useful stuff.
It then turns its attention to what B2B is - essentially an e-commerce gateway and the complexities it takes care of for us -
-Document standards
-Messaging protocols
-Transport protocols
-Packaging protocols
-Process control protocols
So what is B2B providing us with?
-Process incoming b2b docs received from remote trading partners
-Transport b2b docs to remote trading partners
-Transport security
- Support industry standard messaging protocols - As2, ebXML etc.
- Translation to and from XML
- Auditing and Reporting
Chapter 2 continues with a section on how B2B fits in with the base SOA platform - SCA, MDS etc.
In summary, a great overview of Oracle B2B - what it offers us and how it fits in with SOA Suite.
An excellent tome for developers and architects -
Chapter 1 - B2B Overview
This chapter gives us a short history of B2B electronic document exchange, thus setting the context for the rest of the book. It discusses the different connection models - hub and spoke, peer 2 peer etc, the relevant B2B standards - EDI X12, ebXML etc. In summary a good grounding in B2B basics.
Chapter 2 - Oracle B2B Overview
Oracle B2B sits on top of SOA Suite and leverages it's SCA architecture. For those new to SOA Suite please see http://www.oracle.com/us/products/middleware/soa/suite/overview/index.html
This chapter begins by guiding you thru the setup and configuration of a B2B vm, downloadable from OTN. Very useful stuff.
It then turns its attention to what B2B is - essentially an e-commerce gateway and the complexities it takes care of for us -
-Document standards
-Messaging protocols
-Transport protocols
-Packaging protocols
-Process control protocols
So what is B2B providing us with?
-Process incoming b2b docs received from remote trading partners
-Transport b2b docs to remote trading partners
-Transport security
- Support industry standard messaging protocols - As2, ebXML etc.
- Translation to and from XML
- Auditing and Reporting
Chapter 2 continues with a section on how B2B fits in with the base SOA platform - SCA, MDS etc.
In summary, a great overview of Oracle B2B - what it offers us and how it fits in with SOA Suite.
Tuesday, August 20, 2013
#273 Case Management Elements - Activities, Events, Policies, Documents, Stakeholders, Milestones...
Oracle Adaptive Case Management includes the following elements -
Now most of these are self-explanatory, however in the next couple of posts I'd like to look at how the tooling supports these. Today I'm looking at the above elements and how they are implemented in Oracle BPM 11g PS6.
A previous post introduces each element in more detail -
http://niallcblogs.blogspot.de/2013/07/259-bpm-11g-ps6-case-management-getting_1.html
Short Recap -
Just open the rules component created for the Case.
Create a decision table and then create a condition -
Browse thru some of the structures -
Events
Now to the events - these can be leveraged in Business Rules to control the flow of the case. They can also be published to external parties via EDN.
So it is very easy to create a condition of the type -
If eventActivity = "CheckTaxReturn" and
If eventActivityType = "COMPLETED"
say we now want to set the Case Milestone - TaxReturnCheck - to completed,
and we also want to activate the activity - payTaxRebate.
We simply add the following actions to the rule
Simple, isn't it?
Activities
Now to the activities -
BPM 11g ACM (Adaptive Case Mgt) currently supports 3 types of activities -
according to the ORCL docs - The stakeholders are the different persons involved in the processing of the case. They are case workers that can view the case and work on it. These stakeholders can be assigned permissions on the Case artifacts.
Conclusion
So essentially this release of Adaptive Case Management allows you to define the parameters within which the Case executes. You define the list of possible Activities. When, and to which Stakeholders these activities are available, is defined in your Policies. Regarding data - we consider Case Data and Documents. Documents are essentially collateral stored in a content management system. Case Data is the salient data used by the case workers in making their decisions.User Defined Events give us the possibility to react to external events at runtime - providing ad hoc support.
Now most of these are self-explanatory, however in the next couple of posts I'd like to look at how the tooling supports these. Today I'm looking at the above elements and how they are implemented in Oracle BPM 11g PS6.
A previous post introduces each element in more detail -
http://niallcblogs.blogspot.de/2013/07/259-bpm-11g-ps6-case-management-getting_1.html
Short Recap -
- Data: the Case Data e.g. Tax return for 2012
- Milestones/Phases e.g. Tax return checked, Tax Rebate approved
- Outcomes: e.g. Rebate Paid / Bill sent
- Events: e.g. Tax form arrives, phone call with tax payer
- Stakeholders: e.g. Tax officer, VAT inspector
- Policies: e.g. Rebate can only be paid when the Tax return has been fully processed
- implemented via Business Rules
- Activities: e.g. check Tax return, compute rebate, contact tax payer
- Documents: e.g. supporting information such as receipts for 2012.
Just open the rules component created for the Case.
Create a decision table and then create a condition -
Browse thru some of the structures -
- Case states include -
Events
Now to the events - these can be leveraged in Business Rules to control the flow of the case. They can also be published to external parties via EDN.
- Case events include -
- Activity Events
- Lifecycle Events
- Documents Events - fired when documents are added/removed etc. to/from the content management system.
- Milestone Events - self explanatory
- Data Events pertain to the Case Data and are raised when this data is changed. by case activities or via the API.
- User Defined Events give us the possibility to react to external events. These could be raised at runtime e.g.case worker gets a phone call from the tax payer in the Tax processing case. He could then create a user defined event - taxPayerCalled - at runtime.
So it is very easy to create a condition of the type -
If eventActivity = "CheckTaxReturn" and
If eventActivityType = "COMPLETED"
say we now want to set the Case Milestone - TaxReturnCheck - to completed,
and we also want to activate the activity - payTaxRebate.
We simply add the following actions to the rule
- reachMilestone "TaxReturnCheck"
- activateActivity "payTaxRebate"
Simple, isn't it?
Activities
Now to the activities -
BPM 11g ACM (Adaptive Case Mgt) currently supports 3 types of activities -
- Human Task
- BPM Process - for the structured part of a case
- Custom - java classes you then register with the case model
- manual / automatic
- conditional/unconditional (defined via Business Rule Policies)
- repeatable
according to the ORCL docs - The stakeholders are the different persons involved in the processing of the case. They are case workers that can view the case and work on it. These stakeholders can be assigned permissions on the Case artifacts.
Conclusion
So essentially this release of Adaptive Case Management allows you to define the parameters within which the Case executes. You define the list of possible Activities. When, and to which Stakeholders these activities are available, is defined in your Policies. Regarding data - we consider Case Data and Documents. Documents are essentially collateral stored in a content management system. Case Data is the salient data used by the case workers in making their decisions.User Defined Events give us the possibility to react to external events at runtime - providing ad hoc support.
Tuesday, August 13, 2013
Subscribe to:
Posts (Atom)
