Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mule flows - Naming conventions

As with any programming language, what are the standard naming conventions to be followed while writing Mule flows? I found camel-case convention has been followed in Mule in Action book.What is the standard format for Mule naming convention.

Can any suggest the standard option?

like image 456
Ram Bavireddi Avatar asked Dec 09 '14 10:12

Ram Bavireddi


People also ask

What are naming conventions?

A naming convention is a convention (generally agreed scheme) for naming things. Conventions differ in their intents, which may include to: Allow useful information to be deduced from the names based on regularities.

How do you get the flow name in mule 4?

Hi, You can use # [flow.name] to get the current flow name.

What is the convention for naming variables?

The choice of a variable name should be mnemonic — that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary "throwaway" variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.

Which is the best practice when it comes to mule coding?

1) Naming conventions. Mule flow by itself and its components should have such names, which would give a clear understanding of what function they have. Standard names of components are allowed for transformation elements, but for other elements it is prefered to use more coherent names.


4 Answers

There is no such thing as a naming convention for Mule. You could try to apply the same rules Mule community developers follow, but those are not strictly for Mule Applications.

At the same time it does make sense to follow the same naming conventions than the IoC container of Spring given that Mule is a sort of specialization of it.

like image 58
Víctor Romero Avatar answered Sep 25 '22 06:09

Víctor Romero


I've made a training on MuleSoft "MuleSoft.U Developer Essentials" and all the flows they named was like that: nameOfTheFlow. So the first character was always at lower case and the name always ended with "Flow". Also, the first word was always what the flow was doing, for example: "getPermissionsFlow" or "postUserFlow". So, based on my experience, that was the convention the course brought to me.

like image 21
Gabriel Avatar answered Sep 26 '22 06:09

Gabriel


There is no specific naming convention thumb rules. Java naming style would be good. Most of the case the enterprise for whom your are developing the application will hold their own naming convention standard.

Based on my experience naming conventions with a defnite symantics eg MF_Employee_RegService were MF is mule flow , Employee department , Registration service

camel-case is also a good option.

like image 26
ARUN KUMAR Avatar answered Sep 22 '22 06:09

ARUN KUMAR


You can define your own There is no compulsion. For better maintainability and readability you can prefix targetSystemName for the flows which Hits the endpoint fallowed by the activityName that the flow accomplishes example:crm_fetchCustomerDetails, you can prefix common or util fro the flows which are common across your project.

like image 40
Bachu Arjun Avatar answered Sep 24 '22 06:09

Bachu Arjun