Webmethods Flow Service Design and Practice PDF
Webmethods Flow Service Design and Practice PDF
LANGUAGE DESIGN
AND PRACTICE
This paper explores and suggests on coding of webMethods flow
service. The sole purpose of article is to make first-timer aware how
to code webMethods flow service.
Rankesh Kumar
http://www.linkedin.com/in/rankesh
Disclaimer: Documents references and their names may change. I acknowledge the
Intellectual property rights of Software AG and or its affiliates products and documentations.
1
Definition: Flow language provides a set of simple but powerful constructs that you use
to specify a sequence of actions (steps) that the Integration Server will execute at run
time.2
Flow Service
Pipeline
Disclaimer: Documents references and their names may change. I acknowledge the
Intellectual property rights of Software AG and or its affiliates products and documentations.
2
Suggestions on Flow Service:
c. Compose service name using mixed case letters, beginning with a lower
case letter and starting each subsequent word with an upper case letter.
d. Begin method names with a strong action verb. E.g. process, map, etc.
e. Add adjectives if necessary to clarify the noun i.e. convertToDate
f. Do NOT use special characters [exception is underscore], it may cause
problem during execution.
4. Signature of Service
a. Always define input and output of a service. It eases the implementation.
Disclaimer: Documents references and their names may change. I acknowledge the
Intellectual property rights of Software AG and or its affiliates products and documentations.
3
b. Ask connecting system(s) owners to provide the XSD, XML Schema or
sample XML to define the input/output document(s).
c. Prefer to define one Input and one Output Doc reference. It eases future
signature change(s) and mapping(s).
d. If possible, name input and output same for helper services.
e. Name the variables of helper service intelligently. Take advantage of
implicit mapping.
Disclaimer: Documents references and their names may change. I acknowledge the
Intellectual property rights of Software AG and or its affiliates products and documentations.
4
6. Mapping Suggestions
a. Map docs, not independent variables [inside the doc], whenever possible.
b. Use Map step to process multiples small unit of work, like string trim,
concatenation, date format, etc.
7. Document Structure
a. Split complex document into sub-documents to maximize reusability and
flexibility.
8. Do not put disabled steps in flow, it consume precious CPU time during execution.
Disclaimer: Documents references and their names may change. I acknowledge the
Intellectual property rights of Software AG and or its affiliates products and documentations.
5
10. When developing flows for eStandards, IDoc, XSDs Documents it is good to
validate input and output.
11. Transformers are services invoked in MAP step in a special way. Multiple
transformers can be executed in one MAP step. This is recommended to use
when you have a large set of variables under a document and you need to map
them independently to output after some processing, as shown below.
12. When using I/O services, make sure you close them. E.g. The readerToString
service does not automatically close the reader object. To close the reader, use
the pub.io:closeservice7.
Disclaimer: Documents references and their names may change. I acknowledge the
Intellectual property rights of Software AG and or its affiliates products and documentations.
6
13. Use link properties for conditional mappings.
15. Restrict the data to invoked services, by using scope. It passes limited variables to
invoked service.
16. Always use a timeout for I/O and network operations. E.g.
pub.art.transaction:setTransactionTimeout
Disclaimer: Documents references and their names may change. I acknowledge the
Intellectual property rights of Software AG and or its affiliates products and documentations.
7
a. Label is very interesting feature. It is used by EXIT and BRANCH step types
to accomplish different logic.
17. Regular expression not just shortens your code but also performs better. You can
use it in branch, link mapping, and a few String services.
18. Configure TOP level service for auditing. Recommended setting is:
Disclaimer: Documents references and their names may change. I acknowledge the
Intellectual property rights of Software AG and or its affiliates products and documentations.
8
b. Caching / Prefetch are available for performance tuning.
c. HTTP URL alias is an excellent option to hide the namespace, put security
and ability to change service without changing the end point.
d. Pipeline debug is helpful during development. webMethods flow service is
inherently TDD, [Test Driven Development].
23. There are 7 step types9 [BRANCH, EXIT, INVOKE, LOOP, MAP, REPEAT, SEQUENCE],
with help of them you control the flow and write logic in flow service.
24. For DML [SQL] queries, use TRANSACTION TYPE = LOCAL TRANSACTION in JDBC
connection and following services10:
a. pub.art.transaction:commitTransaction
b. pub.art.transaction:rollbackTransaction
c. pub.art.transaction:setTransactionTimeout
d. pub.art.transaction:startTransaction
25. Please make effort to put comment in steps and service level comments. It helps
in maintaining the good health of service.
Disclaimer: Documents references and their names may change. I acknowledge the
Intellectual property rights of Software AG and or its affiliates products and documentations.
9
A SPECIAL NOTE
Sachin Mantri
Rakesh Kumar
Vicky Anand
Shradha Gundannavar
Disclaimer: Documents references and their names may change. I acknowledge the
Intellectual property rights of Software AG and or its affiliates products and documentations.
10
REFERENCES
1: Product of Software AG,
http://www.softwareag.com/corporate/products/az/webmethods/default.asp
2: Page 34,
http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/
wmsuite9-6/Designer/9-6_Service_Development_Help.pdf
3:
http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/
wmsuite9-6/Integration_Server/9-
6_Integration_Server_Java_API_Reference/com/wm/data/IData.html
4: http://docs.oracle.com/javase/7/docs/api/java/util/Hashtable.html
5: 9-5-SP1_Service_Development_Help.pdf, Page 308
6: 9-5-SP1_Integration_Server_Built-In_Services_Reference.pdf, page 353
7: 9-5-SP1_Service_Development_Help.pdf, Page 510
8: 9-5-SP1_Service_Development_Help.pdf, Page 961
9: 9-5-SP1_Service_Development_Help.pdf, Page 813
10:
http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/adapters_
estandards/Adapters/JDBC/JDBC_6-5/6-5_JDBC_Adapter_Install_and_Users_Guide.pdf,
page 234
Disclaimer: Documents references and their names may change. I acknowledge the
Intellectual property rights of Software AG and or its affiliates products and documentations.
11