Package Analysis/Code Review

When webMethods developers finished their piece of work ready for test, the challenge is how to review those components in the most efficient way. Are you still using code review checklist printed on paper and tick the box one by one? This tool set is to have a clear insight in the integration code base complexity and overall implementation quality.

This code quality check tool can be plugged into continual improvement process (CI) before deployment to any environment. It makes sure the quality of code maintained at expected level.

Package Summary:

This page shows the overall code quality statistics of selected package. All code quality rules are configurable to either “must compliance” or “nice to compliance”. Hence green bar means compliance to code quality rule, red bar means not compliance etc. The more green means the better adhere to code quality rule.

The full list of webMethods artifact:

  • Services
    • Flow service
    • Java service
    • C/C++ service
    • Specification
    • XSLT service
    • REST service
    • WS Connector service
    • Adapter Service
  • Document Types
    • Local document type
    • Broker document type
    • Adapter document type
  • WS Descriptors
    • WS consumer
    • WS provider
  • Triggers
    • Broker trigger
    • JMS trigger
  • Schemas
  • Flat Files
    • Flat file dictionary
    • Flat file schema
  • Connections
  • Adapter Notifications

PackageAnalysis_packagesummary

Nodes Quality Summary:

  • Orphan element – Orphan element means element has neither references nor dependents. If it is an unused element, ideally should be removed to reduce package loading time.
  • Unresolved Reference – Unresolved Reference means referenced element doesn’t exist. This will cause exception when executing service.
  • Recursive Reference – Recursive Reference means referenced element is recursive.
  • No. of Dependents – Number of elements that referencing current element.
  • No. of References – Number of elements that referenced by current element.
  • Local Name – A universal name to a service or document type. It consists of two parts: local name and namespace name.
  • Namespace – The namespace name as part of universal name. A universal name should be unique on an Integration Server.

PackageAnalysis_node

Service Quality Summary:

  • Service Input – A good practice is to explicit define both input and output for a service. This will reduce memory usage in the Integration Server. This is very important to keep memory tide and clean when process large document.
  • Service Output – As above. Drop all variables in the pipepline except those defined as service output.
  • Comments – Comment at service level. This place is to give a brief description of the service as well as change history.
  • Audit Setting – Audit setting should be turned off if use customized event management system. Or only audit top level service.
  • Pipeline Debug – Pipeline debug should be always turned off in production. This is new feature in webMethods 9.

PackageAnalysis_servicesummary

Flow Service:

  • Disabled Code – Disabled code is prohibited in production. This will increase package load time and memory usage. Disabled code could exist in normal flow steps or transformer step.
  • Save/Restore Pipeline – Save/Restore pipeline in memory/file are prohibited in production.
  • Trace/Debug Pipeline – As above.
  • Exception Handling – The standard exception management for flow is to implement a try/catch block using the flow sequence element. These sequences should be at the same level in the flow hierarchy and ideally should be the only elements at this level. The structure is:
    • TRY – Sequence with exit-on property set to FAILURE
    • CATCH – Sequence with exit-on property set to DONE
  • Maximum Path Depth – The number of elements deep that the logic goes down. How deeply nested is the code.
  • Lines of Elements – The number of elements in a flow service.
  • Lines with Comment – The number elements with the comment property populated.
  • Comments Threshold – If elements with comment/total flow elements >= threshold.

PackageAnalysis_servicesflow

Java Service:

  • System.out – System.out.print log the message to JVM console instead of server.log. To log the debug message properly, use Service.doInvoke( “pub.flow”, “debugLog”, input ).
  • Exception Handling – The standard exception management for java is to implement a try/catch block.
  • Lines of Elements – The number of line in a java service.
  • Lines with Comment – The number of line with the comment populated.
  • Comments Threshold – If elements with comment/total flow elements >= threshold.

PackageAnalysis_servicesjava

C/C++ Service:

  • System.out – System.out.print log the message to JVM console instead of server.log. To log the debug message properly, use Service.doInvoke( “pub.flow”, “debugLog”, input ).
  • Exception Handling – The standard exception management for java is to implement a try/catch block.
  • Lines of Elements – The number of line in a java service.
  • Comments per Line – The number of line with the comment populated.
  • Comments Threshold – If elements with comment/total flow elements >= threshold.

PackageAnalysis_servicesc

Specification:

  • Spec Reference – A spec should not reference to another spec. This will create unnecessary complexity. Meanwhile, a spec can reference to existing document as input/output.
  • Referenced Spec – A spec which current spec reference to. This value should be always empty.
  • Input Reference – The document referenced as input object.
  • Output Reference – The document referenced as output object.

PackageAnalysis_servicesspec

REST Service:

  • Disabled Code – Disabled code is prohibited in production. This will increase package load time and memory usage. Disabled code could exist in normal flow steps or transformer step.
  • Save/Restore Pipeline – Save/Restore pipeline in memory/file are prohibited in production.
  • Trace/Debug Pipeline – As above.
  • Exception Handling – The standard exception management for flow is to implement a try/catch block using the flow sequence element. These sequences should be at the same level in the flow hierarchy and ideally should be the only elements at this level. The structure is:
    • TRY – Sequence with exit-on property set to FAILURE
    • CATCH – Sequence with exit-on property set to DONE
  • Maximum Path Depth – The number of elements deep that the logic goes down. How deeply nested is the code.
  • Lines of Elements – The number of elements in a flow service.
  • Lines with Comment – The number elements with the comment property populated.
  • Comments Threshold – If elements with comment/total flow elements >= threshold.
  • _default Service – To be developed.

PackageAnalysis_servicesrest

WSConnector Service:

  • Disabled Code – Disabled code is prohibited in production. This will increase package load time and memory usage. Disabled code could exist in normal flow steps or transformer step.
  • Save/Restore Pipeline – Save/Restore pipeline in memory/file are prohibited in production.
  • Trace/Debug Pipeline – As above.
  • Exception Handling – The standard exception management for flow is to implement a try/catch block using the flow sequence element. These sequences should be at the same level in the flow hierarchy and ideally should be the only elements at this level. The structure is:
    • TRY – Sequence with exit-on property set to FAILURE
    • CATCH – Sequence with exit-on property set to DONE
  • Maximum Path Depth – The number of elements deep that the logic goes down. How deeply nested is the code.
  • Lines of Elements – The number of elements in a flow service.
  • Lines with Comment – The number elements with the comment property populated.
  • Comments Threshold – If elements with comment/total flow elements >= threshold.

PackageAnalysis_serviceswsc

Adapter Service:

  • StoreProc – The recommend way to invoke exist database function is via call store procedure or use customSQL to form SQL statement.
  • Adapter Type – The adapter type such as JDBCAdapter, SAPAdapter.
  • Service Template – Service template used.
  • Connection Name – Adapter connection name such as LOCAL_TRANSACTION, XA_TRANSACTION.
  • Schema Name – <Catalog name>.<Schema name>
  • StoreProc Name – The store procedure name to be invoked.

PackageAnalysis_servicesadp

Document Type:

  • Broker Document Name – Broker document name should always identical to document. If not, should delete document from broker and re-create from Designer.
  • Empty Document – Document should have at least one element.
  • Link to Source – Document is linked to another object.
  • Publishable – Publishable broker document.
  • Broker Document Name – Broker Document Name.
  • Storage Type – Broker document storage type, Guaranteed or Volatile.

PackageAnalysis_document

WSDescriptor Consumer/Provider:

  • Handler – Ideally to have Request Handler, Response Handler and Fault Handler in place. This helps to standardize the process of SOAP header in both request and response.
  • Policy – WS-Policy is a model and syntax you can use to communicate the policies associated with a web service.
  • Port Alias – Associate WSD with alias defined in web service endpoint administrator page.
  • ACL Control – Change Read ACL and Execution ACL as per requirement.
  • Header/Fault – Ideally to use SOAP header and SOAP Fault document.
  • SOAP Protocol – SOAP protocol such as SOAP 1.1 or SOAP 1.2.
  • Operations List – In a web service descriptor, an operation corresponds to a service on Integration Server.
  • Binders List – Support multiple binders includes JMS.
  • Header in Pipeline – If enabled, To make the contents of the SOAP headers available to subsequent services when enabled.

PackageAnalysis_wscConsumer

PackageAnalysis_wscProvider

Broker Trigger:

  • Deliver Enabled – Broker trigger should be enabled in Designer.
  • Execute Enabled – As above.
  • Retrieval Enabled – Enable retrieval document from message administrator page.
  • Processing Enabled – Enable document processing from message administrator page.
  • Trigger Type – Trigger type such as Broker or JMS.
  • Concurrent/Serial – Concurrent processing or serial processing.
  • Priority Enabled – The trigger priority setting.
  • Queue Size – The capacity of the trigger queue.
  • Max Threads – The maximum threads to concurrently process documents.

PackageAnalysis_triggerbroker

JMS Trigger:

  • Execute Enabled – JMS trigger should be enabled in Designer.
  • Trigger Type – Trigger type such as Broker or JMS.
  • JMS Trigger Type – JMS trigger type such as Standard or SOAP over JMS.
  • Concurrent/Serial – Concurrent processing or serial processing.
  • Prefetch Size – Using pre-fetch cache can speed up the retrieval of messages from webMethods Broker.
  • Batch Size – The maximum number of messages that the trigger service can receive at one time.
  • Max Threads – The maximum threads to concurrently process documents.
  • Connection Count – The number of connections this trigger makes to the JMS provider.

PackageAnalysis_triggerjms

Schema:

  • Target Namespace – The URL that used as the target namespace for the schema definition.
  • Elements – The global element declarations in an IS schema.
  • Schema Domain – A schema domain is a named collection of IS schemas. More than one schema domain can contain the same schema components for an XML namespace.

PackageAnalysis_schema

Connection:

  • Error – The connection load error could be caused by various reasons such as invalid java class path.
  • Connection Enabled – Connection can be disabled from adapter administrator page.
  • Poolable – Make adapter connection poolable to increase connection performance.
  • Adapter Type – The adapter type such as JDBCAdapter, SAPAdapter.
  • Version – The adapter version.
  • Transaction Type – Adapter transaction type such as NO_TRANSACTION, LOCAL_TRANSACTION, XA_TRANSACTION.
  • DataSource Class – The java class used by this connection.
  • Min PoolSize – Keep minimum pool size at least 1.
  • Max PoolSize – Make sure the maximum pool size at reasonable level. Consulate your DBA.
  • Pool incr – Make sure the pool size increasement at reasonable level.

PackageAnalysis_connection

Adapter Notification:

  • Basic Notification – It is recommended to use basic notifications which enable you to manage sequence and temporary table manually.
  • Notification Enabled – Notification can be disabled from adapter administrator page.
  • Broker/JMS Publish – Broker/JMS publish is required in cluster environment.
  • Adapter Type – The adapter type such as JDBCAdapter, SAPAdapter.
  • Version – The adapter version.
  • DataSource Class – The java class used by this notification.
  • Table – <Catalog Name>.<Schema Name>
  • Max Row – Make sure the maximum number of records at reasonable level. Consulate your DBA.
  • Interval – The interval between two notification executions.
  • JMS Destination – JMS destination such as Queue, Topic.

 

PackageAnalysis_adapterNotification

Package reference:

  • Referring Element – The URL that used as the target namespace for the schema definition.
  • Unresolved Referenced Element – An unresolved reference is an element that does not exist yet is still referred to in the service, IS document type, or specification.

PackageAnalysis_reference

Package Successors:

  • Dependency Package – The elements in current package has referring to some elements in dependency package.
  • Referenced – If the dependency package has been setup correctly.

PackageAnalysis_successor