Highlighted
Absent Member.
Absent Member.
226 views

Unable to get the "Manager" full name in email Activity


Hi,

At the end of a workflow, we send an email with different informations
about the modified user (target).

The email activity works fine, but we are unable to get the full name of
the manager of the user.

We can get the CN of the manager, with the following :

var vManager=IDVault.get(flowdata.get('start/request_form/target') ,
'user', 'manager')
if (vManager != ""){
vManager}
else{" - "}

Result in the mail is : Manager : cn=jmiller,ou=users,o=data

But now if we want to get the FullName of the Manager, this gives an
error in the trace and the result is empty:

var vManager=IDVault.get(flowdata.get('start/request_form/target') ,
'user', 'manager')
if (vManager != ""){
IDVault.get(vManager , 'user', 'FullName')}
else{" - "}


Error in the server log:

2013-02-20 14:48:18,421 INFO [STDOUT] (pool-13-thread-8) WARN [RBPM]
[com.novell.soa.af.impl.core.WorkflowNotification:evaluateMappi
ngs] Script error evaluating expression [var
vManager=IDVault.get(flowdata.get('start/request_form/target') , 'user',
'manager');
if (vManager != ""){
IDVault.get(vManager , 'user', 'FullName')}
else{" - "}] .

Any idea ??

Thanks

Sylvain


--
sma
------------------------------------------------------------------------
sma's Profile: https://forums.netiq.com/member.php?userid=174
View this thread: https://forums.netiq.com/showthread.php?t=46888

Labels (1)
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

Re: Unable to get the "Manager" full name in email Activity

On 02/20/2013 08:54 AM, sma wrote:
>
> Hi,
>
> At the end of a workflow, we send an email with different informations
> about the modified user (target).
>
> The email activity works fine, but we are unable to get the full name of
> the manager of the user.
>
> We can get the CN of the manager, with the following :
>
> var vManager=IDVault.get(flowdata.get('start/request_form/target') ,
> 'user', 'manager')
> if (vManager != ""){
> vManager}
> else{" - "}
>
> Result in the mail is : Manager : cn=jmiller,ou=users,o=data
>
> But now if we want to get the FullName of the Manager, this gives an
> error in the trace and the result is empty:
>
> var vManager=IDVault.get(flowdata.get('start/request_form/target') ,
> 'user', 'manager')
> if (vManager != ""){
> IDVault.get(vManager , 'user', 'FullName')}
> else{" - "}
>
>
> Error in the server log:
>
> 2013-02-20 14:48:18,421 INFO [STDOUT] (pool-13-thread-8) WARN [RBPM]
> [com.novell.soa.af.impl.core.WorkflowNotification:evaluateMappi
> ngs] Script error evaluating expression [var
> vManager=IDVault.get(flowdata.get('start/request_form/target') , 'user',
> 'manager');
> if (vManager != ""){
> IDVault.get(vManager , 'user', 'FullName')}
> else{" - "}] .
>
> Any idea ??
>
> Thanks
>
> Sylvain
>
>

Greetings,
This works correctly for me. I did a "quick" test using the
standard "Provisioning Notification" template in the email activity. I
then used the 'requestStatus' field. Here is the quick code that I used
to prove this works:

function getManagerFullName(){
var sMan = IDVault.get(recipient , 'user', 'manager');
if (sMan){
var sManFullName=IDVault.get(sMan , 'user', 'FullName');
return sManFullName;
}else{
return 'no manager';
}
};
getManagerFullName();





--

Sincerely,
Steven Williams
Lead Software Engineer
NetIQ
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Unable to get the "Manager" full name in email Activity


Actually it works fine with your code :

function getManagerFullName(){
var sMan = IDVault.get(flowdata.get('start/request_form/target') ,
'user', 'manager');
if (sMan){
var sManFullName=IDVault.get(sMan , 'user', 'FullName');
return sManFullName;
}else{
return 'no manager';
}
};
getManagerFullName();

Don't understand why my code did not work, but anyway, it's ok now.

Thanks a lot for your help.

Sylvain

Steven Williams;225761 Wrote:
> On 02/20/2013 08:54 AM, sma wrote:
> >
> > Hi,
> >
> > At the end of a workflow, we send an email with different

> informations
> > about the modified user (target).
> >
> > The email activity works fine, but we are unable to get the full name

> of
> > the manager of the user.
> >
> > We can get the CN of the manager, with the following :
> >
> > var vManager=IDVault.get(flowdata.get('start/request_form/target') ,
> > 'user', 'manager')
> > if (vManager != ""){
> > vManager}
> > else{" - "}
> >
> > Result in the mail is : Manager : cn=jmiller,ou=users,o=data
> >
> > But now if we want to get the FullName of the Manager, this gives an
> > error in the trace and the result is empty:
> >
> > var vManager=IDVault.get(flowdata.get('start/request_form/target') ,
> > 'user', 'manager')
> > if (vManager != ""){
> > IDVault.get(vManager , 'user', 'FullName')}
> > else{" - "}
> >
> >
> > Error in the server log:
> >
> > 2013-02-20 14:48:18,421 INFO [STDOUT] (pool-13-thread-8) WARN

> [RBPM]
> > [com.novell.soa.af.impl.core.WorkflowNotification:evaluateMappi
> > ngs] Script error evaluating expression [var
> > vManager=IDVault.get(flowdata.get('start/request_form/target') ,

> 'user',
> > 'manager');
> > if (vManager != ""){
> > IDVault.get(vManager , 'user', 'FullName')}
> > else{" - "}] .
> >
> > Any idea ??
> >
> > Thanks
> >
> > Sylvain
> >
> >

> Greetings,
> This works correctly for me. I did a "quick" test using the
> standard "Provisioning Notification" template in the email activity. I
> then used the 'requestStatus' field. Here is the quick code that I
> used
> to prove this works:
>
> function getManagerFullName(){
> var sMan = IDVault.get(recipient , 'user', 'manager');
> if (sMan){
> var sManFullName=IDVault.get(sMan , 'user', 'FullName');
> return sManFullName;
> }else{
> return 'no manager';
> }
> };
> getManagerFullName();
>
>
>
>
>
> --
>
> Sincerely,
> Steven Williams
> Lead Software Engineer
> NetIQ



--
sma
------------------------------------------------------------------------
sma's Profile: https://forums.netiq.com/member.php?userid=174
View this thread: https://forums.netiq.com/showthread.php?t=46888

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Unable to get the "Manager" full name in email Activity

On 02/21/2013 04:04 AM, sma wrote:
>
> Actually it works fine with your code :
>
> function getManagerFullName(){
> var sMan = IDVault.get(flowdata.get('start/request_form/target') ,
> 'user', 'manager');
> if (sMan){
> var sManFullName=IDVault.get(sMan , 'user', 'FullName');
> return sManFullName;
> }else{
> return 'no manager';
> }
> };
> getManagerFullName();
>
> Don't understand why my code did not work, but anyway, it's ok now.
>
> Thanks a lot for your help.
>
> Sylvain
>
> Steven Williams;225761 Wrote:
>> On 02/20/2013 08:54 AM, sma wrote:
>>>
>>> Hi,
>>>
>>> At the end of a workflow, we send an email with different

>> informations
>>> about the modified user (target).
>>>
>>> The email activity works fine, but we are unable to get the full name

>> of
>>> the manager of the user.
>>>
>>> We can get the CN of the manager, with the following :
>>>
>>> var vManager=IDVault.get(flowdata.get('start/request_form/target') ,
>>> 'user', 'manager')
>>> if (vManager != ""){
>>> vManager}
>>> else{" - "}
>>>
>>> Result in the mail is : Manager : cn=jmiller,ou=users,o=data
>>>
>>> But now if we want to get the FullName of the Manager, this gives an
>>> error in the trace and the result is empty:
>>>
>>> var vManager=IDVault.get(flowdata.get('start/request_form/target') ,
>>> 'user', 'manager')
>>> if (vManager != ""){
>>> IDVault.get(vManager , 'user', 'FullName')}
>>> else{" - "}
>>>
>>>
>>> Error in the server log:
>>>
>>> 2013-02-20 14:48:18,421 INFO [STDOUT] (pool-13-thread-8) WARN

>> [RBPM]
>>> [com.novell.soa.af.impl.core.WorkflowNotification:evaluateMappi
>>> ngs] Script error evaluating expression [var
>>> vManager=IDVault.get(flowdata.get('start/request_form/target') ,

>> 'user',
>>> 'manager');
>>> if (vManager != ""){
>>> IDVault.get(vManager , 'user', 'FullName')}
>>> else{" - "}] .
>>>
>>> Any idea ??
>>>
>>> Thanks
>>>
>>> Sylvain
>>>
>>>

>> Greetings,
>> This works correctly for me. I did a "quick" test using the
>> standard "Provisioning Notification" template in the email activity. I
>> then used the 'requestStatus' field. Here is the quick code that I
>> used
>> to prove this works:
>>
>> function getManagerFullName(){
>> var sMan = IDVault.get(recipient , 'user', 'manager');
>> if (sMan){
>> var sManFullName=IDVault.get(sMan , 'user', 'FullName');
>> return sManFullName;
>> }else{
>> return 'no manager';
>> }
>> };
>> getManagerFullName();
>>
>>
>>
>>
>>
>> --
>>
>> Sincerely,
>> Steven Williams
>> Lead Software Engineer
>> NetIQ

>
>

Greetings,
If you were not using it within a function that could be part of the
reason why it was not working for you.

--

Sincerely,
Steven Williams
Lead Software Engineer
NetIQ
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.