• No results found

Chapter 8. Using and extending MD policy enforcement samples

8.7 Reporting for success

Enterprises that implement business processes need to monitor the processes from a performance and statistical perspective to further improve and optimize the process. IBM Business Process Manager provides ways to collect and use process performance information. The process applications can be designed so that they can be tracked by the monitoring framework of BPM.

In IBM Business Process Manager V8, the reporting function was deprecated. However, this function is compatible with earlier versions. The reporting function is not enabled by default.

To enable reporting, in Process Designer, click File Preferences IBM BPM Capabilities. Then, enable the capabilities that are compatible with

earlier versions. By using reports, you can analyze business data that is specific to your processes. You can specify the variables to track and define the report to query your tracked data. Users can view the resulting report scoreboards from the Dashboards page in Process Portal. However, in BPM V8, you can use more mechanisms for monitoring, tracking, and reporting purposes.

By using the Performance Data Warehouse, you can create customized reports by using third-party reporting tools in IBM Business Process Manager. To use this feature, you must identify the data elements that are required for tracking in the process. You send this tracking definition to the Performance Data Warehouse.

To track data in a business process definition (BPD), you can use the facilities of autotracking, tracking groups, or both. Autotracking automatically captures data from tracking points at the entry and exit of each item in a BPD (for example, services, activities, and gateways). Tracking groups provide more control over tracked data. You use them to track a selected group of process variables across multiple BPDs or process applications and to store tracking points for a timing interval. You can take advantage of both tracking methods in a single BPD. Use

discretion when you model process definitions because the number of events that are captured for reporting impacts the process performance.

For more information about the configurations and steps for process monitoring, search for enabling processes for tracking and reporting in the IBM Business Process Manager V8.0 Information Center at:

© Copyright IBM Corp. 2013. All rights reserved. 173

Appendix A.

MDM Advanced Edition

configuration script

Use the script in Example A-1 to achieve the required configuration in IBM InfoSphere Master Data Management (MDM) Advanced Edition for messaging integration.

Example A-1 MDM Advanced Edition configuration script for messaging integration

################################################################################ # Content of file MDMBPMSetupApp.py

################################################################################ import sys ################################################################################ # # Functions: # # getPort # createSIBAlias # createForeignBus # createForeignBusLink # createSIBJMSQueue # createSIBJMSConnectionFactory # createDefaultJMSProvider

A

def getPort (portName, nodeName, serverName):

lineSeparator = java.lang.System.getProperty('line.separator') node=AdminConfig.getid("/Node:"+nodeName+"/")

serverEntries = []

serverEntries=AdminConfig.list("ServerEntry",node).split(lineSeparator) for serverEntry in serverEntries:

sName = AdminConfig.showAttribute(serverEntry,"serverName") if sName == serverName: specialEndPoints = [] temp = AdminConfig.showAttribute(serverEntry,"specialEndpoints") specialEndPoints = AdminConfig.showAttribute(serverEntry,"specialEndpoints").split(" ") for specialEndPoint in specialEndPoints:

specialEndPoint = specialEndPoint.replace("]","") endPointNm = [] endPointNm = AdminConfig.showAttribute(specialEndPoint,"endPointName") if endPointNm == portName: ePoint = AdminConfig.showAttribute(specialEndPoint,"endPoint") vhPort = AdminConfig.showAttribute(ePoint,"port")

#print "\nGet the Port - "+portName+" = "+vhPort break return vhPort def createSIBAlias (clusterName,nodeName,serverName,SIBAliasName,SIBusName,targetBusName,targetDestinati onName ): #--- # up globals #--- global AdminConfig global AdminTask #--- # Create SIB queue

#--- print ""

print "---" print " Create SIB Alias " print "---"

Appendix A. MDM Advanced Edition configuration script 175

print " name "+SIBAliasName+" "

print " SI bus: "

print " name "+SIBusName+" "

print "---"

print "" #lineSeparator = java.lang.System.getProperty('line.separator') #arr=AdminConfig.list("SIBAlias").split(lineSeparator) #for queue in arr : #identifier = AdminConfig.showAttribute(queue,"identifier") #if identifier == SIBAliasName: # print " The "+SIBAliasName+" SIB queue already exists" # return

#---

# Create SIB queue #---

print " Creating a new SIB Alias named "+SIBAliasName+"..."

if clusterName != "None": params="[-bus "+SIBusName+" -name "+SIBAliasName+" -type Alias -cluster "+clusterName+" -targetBus "+targetBusName+" -targetName "+targetDestinationName+"]" else: params="[-bus "+SIBusName+" -name "+SIBAliasName+" -type Alias -node "+nodeName+" -server "+serverName+" -targetBus "+targetBusName+" -targetName "+targetDestinationName+"]" try: AdminTask.createSIBDestination(params) except: print " The "+SIBAliasName+" SIB Alias already exists" def createForeignBus (clusterName,nodeName,serverName,SIBusName,foreignBusName): #--- # up globals #--- global AdminConfig global AdminTask #---

# Create Foreign Bus #---

print ""

print "---"

print " Create Foreign Bus "

print "---"

print " Foreign Bus: "

print " name "+foreignBusName+" "

print " SI bus: "

print " name "+SIBusName+" "

print "---"

print "" #---

# Create Foreign Bus #---

print " Creating a new Foreign Bus named "+foreignBusName+"..."

if clusterName != "None": params="[-bus "+SIBusName+" -name "+foreignBusName+" -routingType Direct -type SIBus ]" else: params="[-bus "+SIBusName+" -name "+foreignBusName+" -routingType Direct -type SIBus]" try: AdminTask.createSIBForeignBus(params) except: print " The "+foreignBusName+" foreign bus already exists" def createForeignBusLink (clusterName,nodeName,serverName,SIBusName,foreignBusName,foreignBusMessagingEngineNa me,SIBLinkName,endpoint): #--- # up globals #--- global AdminConfig global AdminTask #--- # Create Foreign Bus

Appendix A. MDM Advanced Edition configuration script 177

print ""

print "---"

print " Create Foreign Bus "

print "---"

print " Foreign Bus: "

print " name "+foreignBusName+" "

print " SI bus: "

print " name "+SIBusName+" "

print "---"

print "" #---

# Create Foreign Bus #--- if clusterName != "None": localMessagingEngine = clusterName+".000-"+SIBusName else: localMessagingEngine = nodeName+"."+serverName+"-"+SIBusName print " Creating a new SIB Link named "+SIBLinkName+"..."

print " Foreign messaging engine name is "+foreignBusMessagingEngineName params="[-bus "+SIBusName+" -messagingEngine "+localMessagingEngine+" -name "+SIBLinkName+" -foreignBusName "+foreignBusName+" -remoteMessagingEngineName "+foreignBusMessagingEngineName+" -bootstrapEndpoints "+endpoint+"]" try: AdminTask.createSIBLink(params) except: print " The "+SIBLinkName+" SIB Link already exists" def createSIBJMSQueue (clusterName,nodeName,serverName,jmsQName,jmsQJNDI,jmsQDesc,SIBQName,SIBusName): #--- # up globals #--- global AdminConfig

global AdminTask

#---

# Create SIB JMS queue #---

print "" print "---"

print " Create SIB JMS queue "

print "---"

print " SIB "+SIBusName+" "

print " SIB JMS queue: "

print " name "+jmsQName+" "

print " JNDI "+jmsQJNDI+" "

print " description "+jmsQDesc+" "

print " SIB queue "+SIBQName+" "

print "---"

print "" #---

# Create SIB JMS queue that references a SIB queue #---

if clusterName != "None": scope = AdminConfig.getid("/ServerCluster:"+clusterName+"/") else: scope = AdminConfig.getid("/Node:"+NodeName+"/Server:"+ServerName+"/") #for queue in AdminTask.listSIBJMSQueues(scope): #name = AdminConfig.showAttribute(queue,"name") #if name == jmsQName: # print " The "+jmsQName+" SIB JMS queue already exists" # return print " Creating a new SIB JMS queue named "+jmsQName+"..."

params = "[-busName "+SIBusName+" -name \""+jmsQName+"\" -jndiName "+jmsQJNDI+" -description \""+jmsQDesc+"\" -queueName "+SIBQName+"]"

try:

AdminTask.createSIBJMSQueue(scope,params) except:

print " The "+jmsQName+" SIB JMS queue already exists" def createSIBJMSConnectionFactory

(clusterName,nodeName,serverName,jmsCFName,jmsCFJNDI,jmsCFDesc,jmsCFType,authAlias,SI BusName,endpoint):

Appendix A. MDM Advanced Edition configuration script 179 #--- # up globals #--- global AdminConfig global AdminTask #---

# Create SIB JMS connection factory #---

print "" print "---"

print " Create SIB JMS connection factory "

print "---"

print " Connection factory: "

print " name "+jmsCFName+" "

print " JNDI "+jmsCFJNDI+" "

print " description "+jmsCFDesc+" "

print " type "+jmsCFType+" "

print " auth alias "+authAlias+" "

print " SI bus: "

print " name "+SIBusName+" "

print "---" print "" if clusterName != "None": jmsCF = AdminConfig.getid ("/ServerCluster:"+clusterName+"/J2CResourceAdapter:SIB JMS Resource Adapter/J2CConnectionFactory:"+jmsCFName) else: jmsCF = AdminConfig.getid ("/Node:"+nodeName+"/J2CResourceAdapter:SIB JMS Resource Adapter/J2CConnectionFactory:"+jmsCFName) print "" print " JMS Connection Factory ID is "+jmsCF print "" if len(jmsCF) != 0: print " The "+jmsCFName+" JMS connection factory already exists" return #---

# Create the SIB JMS connection factory #--- if clusterName != "None":

scope = AdminConfig.getid("/ServerCluster:"+clusterName+"/") else:

scope = AdminConfig.getid("/Node:"+NodeName+"/Server:"+ServerName+"/") print " Creating a new SIB JMS connection factory named "+jmsCFName+"..." print scope params = [] params.append(["-name",jmsCFName]) params.append(["-jndiName",jmsCFJNDI]) params.append(["-busName",SIBusName]) if jmsCFDesc != "": arg = ["-description",jmsCFDesc] params.append(arg); endArg = "" if endpoint != "":

endArg = " -providerEndPoints " + endpoint

if jmsCFType != "":

arg = ["-type",jmsCFType]

params = "[-name \""+jmsCFName+"\" -jndiName "+jmsCFJNDI+" -type "+jmsCFType+" -busName "+SIBusName+ endArg+"]"

elif authAlias != "":

arg = ["-authDataAlias",authAlias]

params = "[-name \""+jmsCFName+"\" -jndiName "+jmsCFJNDI+" -busName "+SIBusName+" -authDataAlias "+authAlias+ endArg+"]"

else:

params = "[-name \""+jmsCFName+"\" -jndiName "+jmsCFJNDI+" -busName "+SIBusName+ endArg+"]" print "" AdminTask.createSIBJMSConnectionFactory(scope,params) def createDefaultJMSProvider (clusterName,nodeName,serverName,SIBusName,targetBusName,targetDestinationName,target MessagingEngineName,endPointPort): print ""

print "Creating Default Messaging Provider"

Appendix A. MDM Advanced Edition configuration script 181 endpoint = "" if clusterName != "None": clusterId = AdminConfig.getid("/ServerCluster:"+clusterName+"/") lineSeparator = java.lang.System.getProperty('line.separator') members = AdminConfig.list("ClusterMember",clusterId).split(lineSeparator) for id in members: srv = AdminConfig.showAttribute(id,"memberName") node = AdminConfig.showAttribute(id,"nodeName") nodeId = AdminConfig.getid("/Node:"+node+"/") host = AdminConfig.showAttribute(nodeId,"hostName") port = getPort("SIB_ENDPOINT_ADDRESS", node, srv) endpoint1 = host+":"+port+":BootstrapBasicMessaging" if endpoint == "":

endpoint = endpoint1 else:

endpoint = endpoint +","+endpoint1 else:

endpointPort = getPort("SIB_ENDPOINT_ADDRESS", nodeName, serverName) print "endpoint port : "+endpointPort

if endpointPort != "7276":

endpoint = "localhost:" + endpointPort + ":BootstrapBasicMessaging" jmsCFName = "MDMBPMQueueConnectionFactory"

jmsCFJNDI= "notification/MDMBPMQueueConnectionFactory" jmsCFDesc= "MDM BPM Queue Connection Factory"

jmsCFType = "Queue" secAuthAlias = "" createSIBJMSConnectionFactory (clusterName,nodeName,serverName,jmsCFName,jmsCFJNDI,jmsCFDesc,jmsCFType,secAuthAlias ,SIBusName,endpoint) #--- # Create JMS Queue #--- jmsQName= "MDMBPMQueue" jmsQJNDI = "notification/MDMBPMQueue" jmsQDesc= "MDM BPM Queue" AliasQName = "MBMBPMAlias"

createSIBJMSQueue(clusterName,nodeName,serverName,jmsQName,jmsQJNDI,jmsQDesc ,AliasQName,SIBusName)

createSIBAlias(clusterName,nodeName,serverName,AliasQName ,SIBusName, targetBusName,targetDestinationName)

#--- # Create Foreign Bus

#---

endpoint = "localhost:" + endPointPort + ":BootstrapBasicMessaging" SIBLinkName="MDM_BPM_LINK" createForeignBus (clusterName,nodeName,serverName,SIBusName,targetBusName) createForeignBusLink (clusterName,nodeName,serverName,SIBusName,targetBusName,targetMessagingEngineName,SI BLinkName,endpoint) ################################################################################ # Prints the usage message

################################################################################ def printUsage ():

print ""

print "Usage:" print ""

print " wsadmin -f MDMBPMSetupApp.py"

print " ClusterName" print " NodeName" print " ServerName" print " SIBusName" print " targetBusName" print " targetDestinationName" print " targetMessagingEngineName" print " targetEndPointPort" sys.exit(1) ################################################################################ # Main #

Appendix A. MDM Advanced Edition configuration script 183

print "Number of arguments:" print len(sys.argv) if len(sys.argv) != 8: printUsage() sys.exit() ClusterName = sys.argv[0]; NodeName = sys.argv[1]; ServerName = sys.argv[2]; SIBusName= sys.argv[3]; targetBusName = sys.argv[4]; targetDestinationName = sys.argv[5]; targetMessagingEngineName=sys.argv[6]; targetEndPointPort=sys.argv[7]; print ""

print "Setting up application server for MDM BPM Integration ..." print " Cluster name : "+ClusterName

print " Node name : "+NodeName print " Server name : "+ServerName print " SI Bus name : "+SIBusName

print " Target Bus name : "+targetBusName

print " Target Destination Name : "+targetDestinationName

print " Target Messaging Engine Name : "+targetMessagingEngineName print " Target End Point Port : "+targetEndPointPort

print ""

#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^# # WAS or MQ JMS Queue Connection Factories # #---# createDefaultJMSProvider(ClusterName,NodeName,ServerName,SIBusName,targetBusName,targ etDestinationName,targetMessagingEngineName,targetEndPointPort);

#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^# # Save server configuration

#---# print ""

if ClusterName != "None":

else:

print " Saving configuration changes for server '"+ServerName+"'..." AdminConfig.save()

#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^# # Done

#---# print ""

print " Done setting up environment." print ""

Related documents