business process services - dell emc · hands-on lab 3 introduction business process services is an...
TRANSCRIPT
11
Business Process ServicesTechnical Overview and LabSunil Panjwani – Staff EngineerDon Robertson – Senior Staff EngineerKenwood Tsai – Principal Engineer
Documentum Developer Conference 2004San Ramon, CA
October, 2004
22
Agenda
� Introduction: What is Business Process Services? � Inbound Integration� Outbound Messaging Services� Future Product Roadmap� Hands-on Lab
33
Introduction
� Business Process Services is an extensible integration platform for Documentum
� Allows Documentum applications to integrate with external systems, applications, and people
� Marketed and sold in the context of supporting business process management solutions– Why? Because BPM = (Workflow + Integration)– BPS is the Integration Component for Documentum BPM
44
Role of BPS in Overall Business Process Management (BPM) Solution
� Previous Workflow and BPM solutions focused on automating isolated functions (e.g. Document Approval Process)
� New focus of BPM on integrating islands of process automation
� BPS provides access to external systems and people (Documentum Workflow as process controller)
� Documentum applications participate in enterprise-wide processes spanning multiple systems (Documentum as one end-point in overall enterprise process)
55
Process EngineContent Server
Business Process Manager
CollaborativeInteraction
eRoom
Business systems, external processes
and people
Business Process Services
Forms Builder
Formlets
BPS as Component of Documentum BPM
66
Integration Styles and Protocols with BPS
DocumentumProcess or Application
Business Process Services
Enterprise Applications
External Services
EAI Framework
Individual UsersWeb Services, JMS, HTTP,
SMTP
77
Supporting the Event-Action Model
� Currently BPS supports loosely coupled style of integration� Messaging-based integration and event triggered actions
– Events in external system triggers action in Documentum and viceversa
– BPS messages encapsulate event information as well as content including multi-part content (We are an ECM Vendor after all)
� BPS on its own carries out simple, short message-flow processes between applications
� BPS augmented with Documentum Workflow capable of carrying out long-running end-to-end processes with multiple steps
88
Integration Driven Through Process Automation
99
� Large consulting firm uses BPS to handle e-mail submissions of status report documents from 1000’s of offsite users
� Documentum I18N and Localization group uses BPS to send and receive content to in-country translators & reviewers (SMTP and HTTP)
BPS in Action: Actual Customer Use Cases
BPS
Content Server
Firewall ExternalUser
BPSRepository
1010
� Semiconductor firm uses BPS to enable their Documentum application to participate in a multi-system PLM process (BEA WebLogic JMS)
� Government agency uses BPS to process Web Form submissions from field agents
BPS in Action: Actual Customer Use Cases, Cont’d
Product Data Management
Manufacturing Requirements
Planning
Technical Design Review and Publishing
BPS RepositoryFirewallWeb Browser
HTTPS
1111
� BPS is functional replacement for IWS (free upgrade for existing IWS customers!)
� BPS is an extensible integration development platform� IWS is standalone server, BPS deploys into any J2EE
application server – “future-proof”: Web Services, JCA, JMS, JTA, etc.
� BPS has explicit Documentum Workflow integration OOTB � IWS product beginning end-of-life procedure � BPS has future roadmap
So What About the Inter-Enterprise Workflow Services Product?
1212
Agenda
� Introduction: What is Business Process Services? � Inbound Integration� Outbound Messaging Services� Future Product Roadmap� Hands-on Lab
1313
Inbound Integration Outline� Overview� Key Concepts� Architecture� Communication� Configuration� Deployment Structure� Customization� Examples
1414
Overview
� Inbound interface for consuming Messages/Content� Message Listener� Performs custom handling of incoming Messages� Supports HTTP, JMS, and SMTP protocols� Supports Remote Message Processing� Out-of-the-box Message Handlers� Customizable using BOF
1515
Key Concepts� HTTP Listener� JMS Listener� SMTP Listener� Message Processor� Message Handler
1616
HTTP Listener� Listens for Messages over HTTP� Listens for Messages on a pre-specified URL� The Message contains the information required to
perform the Action� Invokes the Message Processor for performing the
Action
1717
JMS Listener� Listens for Messages over JMS� Listens for Messages on pre-configured Queues/Topics� The Message contains the information required to
perform the Action� Invokes the Message Processor for performing the
Action
1818
SMTP Listener� Listens for Messages over SMTP� Acts as an SMTP Server� The Message contains the information required to
perform the Action� Invokes the Message Processor for performing the
Action
1919
Message Processor� Processes incoming Messages� Performs the desired Action on the Message� Supports an architecture for performing custom Actions
2020
Message Handler� Handles an incoming Message� Standard BOF Service� Configured in the configuration file� Referenced by name� Can be passed additional (arbitrary) parameters� BPS ships with set of out-of-the-box Message Handlers
(with Source Code)� API available to create additional Message Handlers
2121
Message� A protocol-neutral representation of the incoming pay-
load� The Message contains Properties and zero or more
Content Items� Each Content Item can have its own set of associated
Properties� A Message contains all the information necessary for
invoking the appropriate Message Handler� The three key Properties of a Message
– ID – Connection Name– Handler Name
2222
Architecture
HTTPLISTENERIncoming Message
MESSAGE
PROCESSOR
InvokeMessage Handler
Incoming Message SMTPLISTENER
JMSLISTENERIncoming Message
Process Message
Process Message
ContentServerProcess Message
Perform Action
MessageHandler
(BOF Services)
2323
Communication
LISTENER
Incoming Message
MESSAGE
PROCESSOR
Retrieve Message Properties
RetrieveContent Payload
CreateMessage
LocateMessage Processor
Process Message
2424
HTTP Listener� Support GET and POST� Support form-data POST ( <INPUT TYPE=TEXT>,
<INPUT TYPE=CHECKBOX> etc.)� Support multipart/form-data ( <INPUT TYPE=FILE …>)� Query String or POSTed data available as name-value
pairs to the Message Handler� The uploaded file(s) available to the Message Handler
2525
HTTP Listener
2626
HTTP Listener
HTTP
LISTENER
Incoming Message
MESSAGE
PROCESSOR
Retrieve Message Properties
RetrieveContent Payload
CreateMessage
LocateMessage Processor
Process Message
URL: http://inbound/bps/http/Receive
POSTed Data:DctmBpsHandler=StartInvoiceWorkflow
DctmBpsConnection=bpm
DctmBpsId=inbound
File:
C:/Temp/myDoc.doc
DctmBpsHandler=StartInvoiceWorkflowDctmBpsConnection=bpmDctmBpsId=inbound
The file uploaded from the client
Message Properties
Uploaded Content
2727
JMS Listener� Listens for Messages on multiple JMS Queues/Topics� The Queues/Topics to listen to can be configured via an
XML file� The Queues/Topics need to be configured separately� The Message Properties (JMS Message Properties) are
made available to the Message Handler� The Message Content ( BytesMessage and
TextMessage) is made available to the MessageHandler
2828
JMS Listener
JMS
LISTENER
Incoming Message
MESSAGE
PROCESSOR
Retrieve Message Properties
RetrieveContent Payload
CreateMessage
LocateMessage Processor
Process Message
DctmBpsHandler=LinkToTempFolderDctmBpsConnection=starwarsDctmBpsId=some_id
The body of the message.
Message Properties
Content Payload
Message Properties:
DctmBpsHandler=LinkToTempFolderDctmBpsConnection=starwarsDctmBpsId=some_id
Message Body:
This is the Message we will send to a JMS Queue
2929
SMTP Listener� Acts as an SMTP Server for incoming messages� The SMTP Message Properties ( From, Subject, Reply-
to, etc.) are made available to the Message Handler� The SMTP Message body and attachments are made
available to the Message Handler� The e-mail has to be sent to
<id>-<handler>-<connection>@host.comFor [email protected]
3030
SMTP Listener
3131
SMTP Listener
SMTP
LISTENER
Incoming Message
MESSAGE
PROCESSOR
Retrieve Message Properties
RetrieveContent Payload
CreateMessage
LocateMessage Processor
Process Message
From:
To:
Subject: Please approve this invoice
Body:
Hope you can get this processed.
Attachment: invoice.doc
Subject=Please …[email protected]=StartInvoiceWorkflowDctmBpsConnection=bpmDctmBpsId=inbound
The body of the message and the file attachment
Message Properties
Content Payload
3232
Message Processor� Processes an incoming message� Responsible for invoking the appropriate Message
Handler� Invoked by Listeners� Configuration file for managing connections and
Message Handlers
3333
Message Processor
MESSAGE
PROCESSOR
Process Message
Properties
Content Item 1
Incoming Message attachment #1
Content Item 2
Incoming Message attachment #2
Locate Message Handler(StartInvoiceWorkflow)
Locate Connection(bpm)
Invoke Message Handler
InvokeMessage Handler
Message Handler
(BOF SERVICE)
ContentServer
DctmBpsHandler=StartInvoiceWorkflowDctmBpsConnection=bpmDctmBpsId=inbound
3434
Message Processor
MESSAGE
PROCESSOR
Process Message
DctmBpsHandler=LinkToTempFolderDctmBpsConnection=starwarsDctmBpsId=some_id
Properties
Content Item 1
Incoming Message attachment #1
Content Item 2
Incoming Message attachment #2
<handler name="LinkToTempFolder" description=“…."><param name=“folderName" value="/Temp"/><service-name>com.docu…bps.handlers.LinkToFolderService</service-name>
</handler>
folderName = /Temp
LinkToFolderService
handleMessage( Message message, IDfProperties config, String docbaseName )
{
}
3535
Configuration� Configuration is handled via an XML file.� Configure Docbase Connections� Configure JMS Queues/Topics on which to listen� Configure Handlers and their properties� Configure Remote Processors
3636
Message Handler Configuration� Registry of Message Handlers� Developers can register additional Message Handlers� The Message Handlers are referenced by name as
specified in the configuration� The service-name is the name of the BOF Service that
implements the Message Handler interface� Developers can specify any number of properties via
<param …> tags� The Configuration Properties are made available to the
Message Handler at run-time
3737
Message Handler Configuration<?xml version="1.0"?><handlers>
<handler name="LinkToTempFolder" description="This links a document to /Temp Cabinet."><param name=“folderName" value="/Temp"/><service-name>com.do….LinkToFolderService</service-name>
</handler>
<handler name="LinkToSystemFolder" description="This links a document to /System Cabinet."><param name=“folderName" value="/System"/><service-name>com.doc….LinkToFolderService</service-name>
</handler></handlers>
3838
Connection Configuration� Docbase Authentication information� Referenced by names� Developers can register additional Connections� Developers can register multiple connections to
separate Docbases� Developers can register multiple connections to the
same Docbase with different user-name, password etc.
3939
Connection Configuration<?xml version="1.0"?><connections>
<docbase-connection name=“bpm" description=“The BPM Docbase"><user-name>tuser1</user-name><docbase-name>BPMDocbase</docbase-name><password>secret</password><domain></domain>
</docbase-connection>
</connections>
Encrypted in production environments
4040
JMS Configuration� JMS Queues/Topics on which BPS will listen for
Messages� The Queues/Topics will have to be configured using the
JMS Provider� Configure BPS to listen for Messages on multiple JMS
Queues/Topics � Need to make sure that BPS has access to the JMS
classes for connecting to the JMS Provider
4141
JMS Configuration<?xml version="1.0"?>
<listeners>
<jms-queue-listener name=“exmplQ" description=“Example queue"><provider-url>iiop://localhost:7001</provider-url><initial-context-factory>
weblogic.jndi.WLInitialContextFactory</initial-context-factory> <connection-factory-jndi-name>
weblogic.examples.jms.QueueConnectionFactory</connection-factory-jndi-name><jndi-name>weblogic.examples.jms.exampleQueue</jndi-name>
</jms-queue-listener>……
</listeners>4242
Configuration<?xml version="1.0"?>
<listeners>
….<jms-topic-listener name=“exmplT" description=“Example topic">
<provider-url>iiop://localhost:7001</provider-url><initial-context-factory>
weblogic.jndi.WLInitialContextFactory</initial-context-factory> <connection-factory-jndi-name>
weblogic.examples.jms.TopicConnectionFactory</connection-factory-jndi-name><jndi-name>weblogic.examples.jms.exampleTopic</jndi-name>
</jms-topic-listener>
</listeners>
4343
Aliasing� When sending SMTP Messages the To: address can
get long� Difficult to understand, may not want to expose Handler
or Connection names� Not everything is dynamic in the address� Aliasing supports dynamic substitution� E-mail aliases defined in a properties file in the same
location as the config xml file.
4444
Aliasing� E.g. alias filestartInvoice=inbound-StartInvoiceWorkflow-bpminvoiceEvent=PostInvoiceEvent-bpm…[email protected] gets resolved [email protected]
[email protected] gets resolved [email protected]
4545
Deployment Structure� The HTTP and JMS Listeners are implemented as
Servlets� The SMTP listener is implemented as a customized
JAMES SMTP Server� The Message Processor is implemented as a Servlet
4646
Deployment Structure
HTTPLISTENER
MESSAGE
PROCESSOR
InvokeMessage Handler
REMOTELISTENER
SMTPLISTENER
JMSLISTENER
Process Message
Process Message
ContentServer
Process Message
Perform Action
MessageHandler
(BOF Services)
Process MessageFirewall
4747
Remote Configuration� Why two options?
– Firewall restrictions– Fail-over
� Common scenarios– HTTP and SMTP listeners outside the firewall– Message Processor inside the firewall
� HTTP used for remote communication
4848
Remote Configuration<processors>
<local name="default"/><remote name=“Remote1">
<url>http://machine1:7001/bps/remote</url></remote><remote name=“Remote2">
<url>http://machine2:7001/bps/remote</url></remote>
….</processors>
4949
Customizationpublic interface InboundMessageHandler{
public void handleMessage( Message message, IDfProperties config, String docbaseName ) throws HandlerException;
}
5050
Customizationpublic interface Message{
/**** @return a Properties instance representing the Message properties as name-value pairs
*/public Properties getProperties();
/*** Get the individual content attachments sent with the Message.** @return an array of ContentItems that were sent in the Message*/public ContentItem[] getContentItems();
/*** @return the identifier property of the incoming message*/
public String getId();}
5151
Customizationpublic interface ContentItem{
/** @return a Properties object representing the properties of the ContentItem as name-value pairs.*/public Properties getProperties();
/*** @return the body of this specific content item as an InputStream*/public InputStream getContent() throws IOException;
/**** @return a File object for the content item*/public File getFile() throws IOException;
}
5252
Customization� Implement the InboundMessageHandler interface� Extend DfService� Register the Service in dbor� Register the Handler in the configuration XML file� Make the Handler class(es) available in the
CLASSPATH
5353
Customizationpublic class MyMessageHandler extends DfService implements
InboundMessageHandler{….
public void handleMessage(Message message , IDfProperties config , String docbase ) throws …
{… // Handle the Message as you want to.
}}
5454
Customization
� Register in the dbor
5555
Customization<?xml version="1.0"?><handlers>
<handler name=“MyMessageHandler1" description=“Example usage of the handler."><param name=“myProp1" value="value1"/><param name=“myProp2" value="value2"/><service-name>com.mycompany.handlers.MyMessageHandler</service-name>
</handler>
<handler name=“MyMessageHandler2" description=" Example usage of the handler."><param name=“myProp1" value="value3"/><param name=“myProp2" value="value4"/><service-name>com.mycompany.handlers.MyMessageHandler</service-name>
</handler>
</handlers>
5656
Out-of-the-box Handlers� LinkToFolder� Queue� StartWorkflow� StartLifecycle� CompleteActivity� SetSecurity� ExecuteMethod
5757
Out-of-the-box Handlers� LinkToFolder
<handler name="LinkToFolderExample"><service-name>com.documentum.bps.handlers.LinkToFolderService</service-name><params>
<param name="folderName" value=“<folder_to_link>"/></params>
</handler>
5858
How do I send a Message to Inbound?� HTTP Example using form
5959
How do I send a Message to Inbound?� SMTP Example using Outlook
6060
How do I send a Message to Inbound?� HTTP Example Programmatically
URLConnection conn = u.openConnection();conn.setRequestProperty("Content-type" , "application/octet-stream");conn.setDoOutput(true);OutputStream stream = conn.getOutputStream();
….
stream.write(bytes, totalBytesRead, bytesRead); // Write the file….
stream.close();conn.connect();conn.getInputStream();
6161
How do I send a Message to Inbound?� SMTP Example Programmatically
Use the javax.mail APICreate Authentication informationCreate SMTP Session PropertiesCreate the MimeMessageSend the Message
6262
How do I send a Message to Inbound?� JMS Example Programmatically
Use the javax.jms APIGet the Initial ContextGet the Connection FactoryGet the Topic/QueueCreate the Sender/PublisherCreate the ConnectionCreate the SessionCreate Sender/PublisherCreate the MessageSend the Message
6363
How do I send a Message to Inbound?� Outbound Services� A layer of abstraction
6464
Agenda
� Introduction: What is Business Process Services? � Inbound Integration� Outbound Messaging Services� Future Product Roadmap� Hands-on Lab
6565
Features at a Glance
� HTTP(S), SMTP, JMS, and Web Services support� Transport-specific services
– Feature rich, but not like Java library equivalents
� Transport-neutral services– More restricted functionality– Common API– Transport-specifics captured in config parameters– Supports external “engines” driving the outbound
integration in uniform manner (BPM)� Transport-neutral services for peers
– For use when communicating as a peer of BPS Inbound– Takes care of addressing conventions
6666
HTTP Service
� com.documentum.services.messaging.http.HttpClient
� Form data POST– application/x-www-form-urlencoded
� File upload POST– multipart/form-data
� Generic input stream POST– application/octet-stream
� HTTP headers � Returns HTTP status code
6767
HTTP Service Interface
public interface HttpClient {
int post(String url, int timeoutMillis,Properties formParameters,Properties headers)
throws HttpClientException;
int post(String url, int timeoutMillis,InputStream data,Properties headers)
throws HttpClientException;
int post(String url, int timeoutMillis,File[] files,Properties headers)
throws HttpClientException;
}
6868
HTTP Form Data POST Example
// Emulate an HTML form.
Properties params = new Properties();
params.setProperty( "field1", "value1" );
params.setProperty( "field2", "value2" );
params.setProperty( "field3", "value3" );
// Instantiate the HTTP service and post the form data
// with a 5 second timeout and no explicit HTTP headers.
HttpClient client = (HttpClient)
DfClient.getLocalClient().newService( HttpClient.class.getName(), null );
int status = client.post( “http://localhost:8080/myServlet”, 5000, params, null );
// Display the resulting HTTP status.
System.out.println( "HTTP status: " + status );
6969
JMS Service
� com.documentum.services.messaging.jms.JmsClient
� Send to queues and publish to topics– Does not use transactional sessions
� BytesMessage, TextMessage� JMS message properties � Optional correlation id and reply queue for
sends� Returns JMS message id� Certified on WebLogic 8.1 and Tibco EMS 3.1.2
7070
JMS Service Interface
public interface JmsClient {
JmsConfiguration createConfiguration(String initialContextFactory,String providerURL,String queueConnectionFactory,String topicConnectionfactory,String otherIntialContextProperties);
String send(JmsConfiguration config,String jndiQueueName,InputStream data,Map properties,String correlationId,String jndiReplyToQueueName) throws JmsClientException;
String sendText(JmsConfiguration config,String jndiQueueName,String text,Map properties,String correlationId,String jndiReplyToQueueName) throws JmsClientException;
String publish(JmsConfiguration config,String jndiTopicName,InputStream data,Map properties) throws JmsClientException;
String publishText(JmsConfiguration config,String jndiTopicName,String text,Map properties) throws JmsClientException;
}
7171
JMS Send Text to Queue Example
// Instantiate the JMS service and configuration.
JmsClient client = (JmsClient)
DfClient.getLocalClient().newService( JmsClient.class.getName(), null );
JmsConfiguration config =
client.createConfiguration( “weblogic.jndi.WLInitialContextFactory”,
“iiop://localhost:7001”,
“weblogic.jms.ConnectionFactory”, null, null );
// Send the text with no message properties, but with
// reply queue and correlation id.
String messageId = client.sendText( config, “myQueue”, "Hello world", null,
“myCorrelationId”, “myReplyQueue” );
// Display the resulting message identifier.
System.out.println( "Message Id: " + messageId );
7272
SMTP Service
� com.documentum.services.messaging.smtp.SmtpClient
� Multiple file attachments– Multipart MIME
� Arbitrary DataSources– Java Activation Framework– Files supported out of the box
� All addressee combinations
7373
SMTP Service Interface
public interface SmtpClient {
SmtpServerConfiguration createServerConfiguration(String host, int port,String user, String password,boolean debug);
SmtpRecipients createRecipients(String[] to, String[] cc, String[] bcc);
void sendMessage(SmtpServerConfiguration config,String body,File[] attachments,String subject,SmtpRecipients recipients,String from, String replyTo)
throws JmsClientException;
void sendMessage(SmtpServerConfiguration config,String body,DataSource[] attachments,String subject,SmtpRecipients recipients,String from, String replyTo)
throws JmsClientException;
}
7474
SMTP Multiple File Attachments Example
// Establish a file array for upload.
File[] files = new File[] { “file1.xml”, “file2.html” };
// Instantiate the SMTP service and configuration.
SmtpClient client = (SmtpClient)
DfClient.getLocalClient().newService( SmtpClient.class.getName(), null );
SmtpServerConfiguration config =
client.createServerConfiguration( “localhost”, 25, null, null, true );
// Establish a recipient specification.
String[] to = new String[] { “[email protected]” };
SmtpRecipients recipients =
client.createRecipients( to, new String[] {}, new String[] {} );
// Send the file(s) to the named recipient with a null body
client.sendMessage( config, null, files, "<subject>", recipients,
"<from-address>", "<replyto-address>" );
7575
Web Services service
� com.documentum.services.messaging.ws.WebServiceClient
� SOAP over HTTP– We build the SOAP header for you– Requires WSDL at runtime
� WS-I Basic Profile bias– Intended primarily for document/literal style web services
� Requires body to be well-formed XML fragment– You supply the body only– Only one root element
� Requires body to be namespace self-sufficient– Namespace must be established in body root element if at all– There will be no target namespace declarations in SOAP header
� Returns response body less envelopes– That is, the contents of the SOAP:Body element
7676
Web Services Service Interface
public interface WebServiceClient {
String invoke(Reader wsdl,String serviceName,String portName,String operationName,Reader body)
throws WebServiceException;
String invoke(Reader wsdl,String operationName,Reader body)
throws WebServiceException;
String invokeAndIgnoreResponse(Reader wsdl,String serviceName,String portName,String operationName,Reader body)
throws WebServiceException;
String invokeAndIgnoreResponse(Reader wsdl,String operationName,Reader body)
throws WebServiceException;
}
7777
Invoke Web Service Example
// Instantiate a service object and invoke the web service.
// We are implicitly using the first service
// and first subordinate port discovered in the WSDL - we only need to specify
// the operation name explicitly.
WebServiceClient client = (WebServiceClient)
DfClient.getLocalClient().newService( WebServiceClient.class.getName(), null );
String response = client.invoke( new FileReader( “wsdl.xml” ),
“myOperation",
new FileReader( “body.xml” ) );
// Display the result body (excluding headers and SOAP body element).
System.out.println( response );
7878
Transport Neutral Services
� com.documentum.services.messaging.MessagingClient.<http|jms|smtp|ws>
� Same interface for all transports– Transport specifics provided in IDfProperties instance– Transport specific properties enumerated in <transport>Constants
classes
� Sends single file, docbase object, or text string� Any of these can be attributed (subject to underlying
transport)– SMTP has no message property support– Developer can check with <service>.supportsFeature method
� Use of transport-neutral interfaces is optional– Everything can be done with transport-specific services– Particularly suitable for automatic processing with XML config
7979
Transport Neutral Service Interface
public interface MessagingClient {
IDfProperties sendFile(IDfProperties config,String fileName,IDfProperties attributes)throws MessagingClientException, DfException;
IDfProperties sendText(IDfProperties config,String text,IDfProperties attributes)throws MessagingClientException, DfException;
IDfProperties sendSysObject(IDfProperties config,String docbase, IDfId objectIDfProperties attributes)throws MessagingClientException, DfException;
}
8080
Transport Neutral Service Example (using JMS)
// Instantiate the JMS messaging client service.
// Note that a session manager is required in order to use this method prototype.
// The docbase credentials are implicit in the session manager.
MessagingClient client = (MessagingClient)
DfClient.getLocalClient().newService( JmsConstants.SERVICE_NAME, sessionManager );
// Populate config object with protocol-specific details.
IDfProperties config = new DfClientX().getProperties();
config.putString( JmsConstants.JMS_PROVIDER_URL, “iiop://localhost:7001” );
config.putString( JmsConstants.JMS_INITIAL_CONTEXT_FACTORY,
“weblogic.jndi.WLInitialContextFactory” );
config.putString( JmsConstants.JMS_QUEUE_CONNECTION_FACTORY,
“weblogic.jms.ConnectionFactory” );
config.putString( JmsConstants.JMS_QUEUE, “myQueue” );
// Send the object (with no attributes).
client.sendSysObject( config, “docbase”, new DfId( “0123456789abcdef” ), null );
8181
Transport Neutral Services Driven by BPM
8282
Transport Neutral SMTP Service Driven by BPM
Captures properties passed to transport neutral service in the IDFProperties argument
8383
Transport Neutral Web Services Driven by BPM
8484
Transport Neutral JMS Service Driven by BPM
8585
Transport Neutral Peer Services
� com.documentum.services.messaging.PeerMessagingClient.<http|jms|smtp|ws>
� Intended for – sending directly to BPS Inbound – sending to third parties who will respond to BPS Inbound
• Eg. sending email to a translator who will respond with a translated document which causes a workflow to start
� Otherwise similar features to transport neutral services� Abstracts transport-specific conventions for specifying a
messaging channel address� Sends third party enough information to address a reply to a
messaging channel– Assumes same protocol for reply
� Use of transport-neutral peer interfaces is optional– Everything can be done with transport-specific or transport-neutral
services
8686
Transport Neutral Service Interface
public interface PeerMessagingClient {
InboundMessagingChannelcreateInboundMessagingChannel(String address,String connection,String handler,String id);
IDfProperties sendTextToPeer(IDfProperties config,String text,IDfProperties attributes,InboundMessagingChannel responseChannel)throws MessagingClientException, DfException;
IDfProperties sendFileToPeer(IDfProperties config,String fileName,IDfProperties attributes,InboundMessagingChannel responseChannel)throws MessagingClientException, DfException;
IDfProperties sendTextToChannel(IDfProperties config,String text,IDfProperties attributes,InboundMessagingChannel channel)throws MessagingClientException, DfException;
IDfProperties sendFileToChannel(IDfProperties config,String fileName,IDfProperties attributes,InboundMessagingChannel channel)throws MessagingClientException, DfException;
}
8787
Transport Neutral Peer Service Example (using HTTP)
// Instantiate the HTTP messaging client service.
PeerMessagingClient client = (PeerMessagingClient)
DfClient.getLocalClient().newService( HttpConstants.PEER_SERVICE_NAME, null );
// Populate config object with protocol-specific details.
// Note that the URL refers to the peer's address, not the inbound messaging channel.
IDfProperties config = new DfClientX().getProperties();
config.putString( HttpConstants.HTTP_URL, url );
config.putInt( HttpConstants.HTTP_TIMEOUT_MILLIS, 5000 );
// Create a channel descriptor.
InboundMessagingChannel imc =
client.createInboundMessagingChannel( “http://myhost:7001/bps/http,
“myConnection”, “myHandler”, “id” );
// Send the file to the peer (with no attributes).
client.sendFileToPeer( config, “file”, null, imc );
8888
Deployment
� Deployed as BOF Services– BOF 1 for now
� Deployed as three primary jars– <documentum>/bps/msgsvc/lib– msgsvc-api.jar is interfaces and exceptions only– msgsvc.impl.jar is implementation only– msgsvc.jar is a manifest only jar, referencing the other
two� Dependent libraries are deployed with BOF services
– Referenced in msgsvc-impl jar manifest– Located in msgsvc subdirectory relative to msgsvc-
impl.jar� msgsvc.jar is added to dctm.jar’s manifest, so always in
DFC classpath
8989
Logging
� Uses DfLogger� Uses Logger hierarchy of hosting application� Messages have keys of the form BPS_MS_OOPS� Debug is extensive� Trace exists, but should be used in exceptional
circumstances only� No error nor info messages
– Inappropriate for a component– Environmental problems logged as warnings (currently
just JMS connectivity problems)
9090
Collateral
� Extensive JavaDoc for services– Look in <documentum>/help/bps/msgsvc directory
� Source code examples (about 25)– Will be distributed to developer site– Grouped according to protocol
� Developer documentation, of course
� Note that developers still need some knowledge of the protocols – we offer simple services, but developers must provide the transport specifics (eg. protocol addresses, JNDI names, SMTP port numbers etc)
9191
Agenda
� Introduction: What is Business Process Services? � Inbound Integration� Outbound Messaging Services� Future Product Roadmap� Hands-on Lab
9292
Future Product Roadmap
� Messaging Reliability� GUI Console for Monitoring and Configuration� Built-in XML Payload Mapping and Transformation� Enterprise Application Adapters (JCA and Web
Services interface)� Additional Protocols (FTP, AS2, etc.)� Additional Inbound Handlers and Exchange of Ideas for
Handlers
9393
Agenda
� Introduction: What is Business Process Services? � Inbound Integration� Outbound Messaging Services� Future Product Roadmap� Hands-on Lab
9494