# Generating Error mail along with the package name

**URL:** <https://techcommunity.softwareag.com/t/generating-error-mail-along-with-the-package-name/108921>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [June 30, 2006, 12:26am UTC](https://techcommunity.softwareag.com/t/generating-error-mail-along-with-the-package-name/108921 "2006-06-30T00:26:32Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaik.wm](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@shaik.wm](https://techcommunity.softwareag.com/u/shaik.wm)\
**Post date:** [June 30, 2006, 12:26am UTC](https://techcommunity.softwareag.com/t/generating-error-mail-along-with-the-package-name/108921/1 "2006-06-30T00:26:32Z")

</div>

hi all,

i didnt find a suitable forum for this , so im posting my query in webmethidsEDI.

When ever an error comes i need to send generate the mail.  
im generating the mail using smtp builtin service which is already available in webMethods.

In the body of the mail im getting the service name but i want the package name also

packagename.foldername.subfoldername:serviceName

at present how im getting is

foldername.subfoldername:serviceName

pls advice me how do i achive this

thnx

---

<div class="post-metadata">

**Author:** ![pryWM](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@pryWM](https://techcommunity.softwareag.com/u/pryWM)\
**Post date:** [June 30, 2006, 12:37am UTC](https://techcommunity.softwareag.com/t/generating-error-mail-along-with-the-package-name/108921/2 "2006-06-30T00:37:03Z")

</div>

in WM normally if you select the service and copy and paste in the editor it will give you fully qualified name (foldername.subfoldername:serviceName).  
That’s the way it should behave as the folder is the namespace not package.

If you want the package also the you have to do it mannually( add the Package name in front of the fully qualified name to make it as needed by you ‘packagename.foldername.subfoldername:serviceName’)

HTH  
PRY

---

<div class="post-metadata">

**Author:** ![shaik.wm](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@shaik.wm](https://techcommunity.softwareag.com/u/shaik.wm)\
**Post date:** [June 30, 2006, 1:09am UTC](https://techcommunity.softwareag.com/t/generating-error-mail-along-with-the-package-name/108921/3 "2006-06-30T01:09:56Z")

</div>

Hi PRY

I cant hard code all the packge names right.  
Im writing a common service to move files, this common service im calling in my applications. for ex PKG\_A , PKG\_B, PKG\_C  
These three packages are three different applications which use common service moveA2AFiles.

which ever application fails to transfer files , generating the error mail , in the body of the error mail im able to get the service name as i have mentioned before.

In this scenario i think its not advisable to hard code the package name.

any other way to customize this???

---

<div class="post-metadata">

**Author:** ![pryWM](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@pryWM](https://techcommunity.softwareag.com/u/pryWM)\
**Post date:** [June 30, 2006, 3:22am UTC](https://techcommunity.softwareag.com/t/generating-error-mail-along-with-the-package-name/108921/4 "2006-06-30T03:22:26Z")

</div>

normally fully qualified name starts with the top level folder inside the package. In you case foldername.subfoldername:serviceName.

I don’t think is there is any way to get the package name associated to it.

But why do you need the package name as is doenot count to the qualified namespace?

Other thing What I understand is

you are calling a common service(moveA2AFiles) from 3 PKG’s.  
and where do set the said service name ( I Mean foldername.subfoldername:serviceName).

IMO, have a variable as input to this common service.  
whenever you call the common service send the fully qualified name (even the attached package name ) as this input.

In the common service, if you have errors copy the variable contents to the body of the email that u send out.

HTH  
PRY

---

<div class="post-metadata">

**Author:** ![haribabu](https://avatars.discourse-cdn.com/v4/letter/h/9fc29f/32.png) [@haribabu](https://techcommunity.softwareag.com/u/haribabu)\
**Post date:** [June 30, 2006, 5:30pm UTC](https://techcommunity.softwareag.com/t/generating-error-mail-along-with-the-package-name/108921/5 "2006-06-30T17:30:39Z")

</div>

Hi,  
As in webMethods package name will not come under fully qualified name we have to hard cord the package name if required. As it also not possible create one folder under the package with same name and in that package create the package structure which you want to wish… and copy the service name…

Regards,  
Haribabu

---

<div class="post-metadata">

**Author:** ![pryWM](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@pryWM](https://techcommunity.softwareag.com/u/pryWM)\
**Post date:** [June 30, 2006, 7:37pm UTC](https://techcommunity.softwareag.com/t/generating-error-mail-along-with-the-package-name/108921/6 "2006-06-30T19:37:08Z")

</div>

If you can modify the package structure then it would be good idea to have the same name for the package and the top level folder in it.  
By this when you make a copy of the service it will give you the foldername.subfoldername:serviceName (foldername is same as package name). But if you call the common service from 3 pkg’s u still need to pass the varaible (for representing the fully qualified name) as mentioned earlier.

but incase you don’t want to change the package structure then go with my previous post.

HTH  
PRY

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [June 30, 2006, 8:59pm UTC](https://techcommunity.softwareag.com/t/generating-error-mail-along-with-the-package-name/108921/7 "2006-06-30T20:59:16Z")

</div>

Shaik,

When ever you create a new custom packages its best practice to keep the folder interface name same as package name this will accomplish your requirement.This is the standard practice.

PurchaseOrder(packagename)  
—PurchaseOrder(higher folder name same as package name)  
----maps (sub folder name)  
finally PurchaseOrder.maps…

HTH,  
RMG

---

<div class="post-metadata">

**Author:** ![wMusers.Com1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/wmusers.com1/32/170_2.png) [@wMusers.Com1](https://techcommunity.softwareag.com/u/wMusers.Com1)\
**Post date:** [June 30, 2006, 9:14pm UTC](https://techcommunity.softwareag.com/t/generating-error-mail-along-with-the-package-name/108921/8 "2006-06-30T21:14:01Z")

</div>

Well, naming the top-level folder, the same as the package name is one style for naming folders, but I would not call it a best practice or standard practice.

If, however, you are using this style of naming your folders, then you don’t need to do anything special to obtain the package name.

The real question is “why do you think that you need the package name?”. If there’s no good reason, then this whole thread is moot.

Mark

---

<div class="post-metadata">

**Author:** ![pryWM](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@pryWM](https://techcommunity.softwareag.com/u/pryWM)\
**Post date:** [June 30, 2006, 9:33pm UTC](https://techcommunity.softwareag.com/t/generating-error-mail-along-with-the-package-name/108921/9 "2006-06-30T21:33:19Z")

</div>

That’s was one of my doubt’s expressed earlier.

PRY

---

<div class="post-metadata">

**Author:** ![reamon](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@reamon](https://techcommunity.softwareag.com/u/reamon)\
**Post date:** [June 30, 2006, 9:39pm UTC](https://techcommunity.softwareag.com/t/generating-error-mail-along-with-the-package-name/108921/10 "2006-06-30T21:39:08Z")

</div>

> [@mcarlson](#):
>
> Well, naming the top-level folder, the same as the package name is one style for naming folders, but I would not call it a best practice or standard practice.

I’d call it a “very common practice.” I’ve seen it virtually in every project I’ve worked. Granted, I’m the reason the practice is followed in some of the cases 🙂 but the practice seems to me to be so prevalent that it’s more or less a de facto standard.

I think there was a thread on this some time back but it might be worth reviewing the subject again. When would one not want to use this technique? My position is that this technique should be followed always but perhaps I’m being myopic.

---

<div class="post-metadata">

**Author:** ![p\_jenkins](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@p\_jenkins](https://techcommunity.softwareag.com/u/p_jenkins)\
**Post date:** [July 1, 2006, 2:23am UTC](https://techcommunity.softwareag.com/t/generating-error-mail-along-with-the-package-name/108921/11 "2006-07-01T02:23:04Z")

</div>

AFAIK, this naming technique certainly simplifies matters in tracking down services and their dependencies in major projects (containing several packages). The only drawback would be a longer qualified name for a service (due to the highest folder). Think we can live with that. 🙂

---

<div class="post-metadata">

**Author:** ![rajoyjose](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@rajoyjose](https://techcommunity.softwareag.com/u/rajoyjose)\
**Post date:** [July 3, 2006, 8:53pm UTC](https://techcommunity.softwareag.com/t/generating-error-mail-along-with-the-package-name/108921/12 "2006-07-03T20:53:35Z")

</div>

Hi All

I think what Sheik wants is a flowservice that can let him figure out the current running flowservice, so instead of hard coding the flowservice name in each service, he can just call this service and map the output to email body.

I have a similar issue , where I have a common error handling service for a lot of services. I need to figure out the last called flowservice (before the error handler) from this error handling service with out passing the service name to it. Any ideas or am I asking for too much 😃

best regards  
Rajoy

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [July 3, 2006, 10:38pm UTC](https://techcommunity.softwareag.com/t/generating-error-mail-along-with-the-package-name/108921/13 "2006-07-03T22:38:39Z")

</div>

Basically you can use wM JAVA API to get current service name,see this old thread.

[URL=“[wmusers.com](http://www.wmusers.com/forum/showthread.php?t=1701&highlight=get+servicename)”][wmusers.com](http://www.wmusers.com/forum/showthread.php?t=1701&highlight=get+servicename%5B/URL%5D)

HTH,  
RMG

---

<div class="post-metadata">

**Author:** ![rajoyjose](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@rajoyjose](https://techcommunity.softwareag.com/u/rajoyjose)\
**Post date:** [July 4, 2006, 1:06pm UTC](https://techcommunity.softwareag.com/t/generating-error-mail-along-with-the-package-name/108921/14 "2006-07-04T13:06:22Z")

</div>

Thanks for that RMG!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:05pm UTC](https://techcommunity.softwareag.com/t/generating-error-mail-along-with-the-package-name/108921/15 "2021-04-02T15:05:27Z")

</div>


