Active IQ Unified Manager Discussions

How to pass pass username

CHRISTIAN_UMREIN
4,532 Views

Hi all,

is there a way to pass the username/id from the user who starts the workflow?

Is the name stored in the database?

Thanks,

Chris

1 ACCEPTED SOLUTION

shailaja
4,532 Views

Hi,

Not sure I totally understood your question.

If you are asking about access to username who triggered the workflow execution during execution, you can get it using the Cmdlet Get-WfaRestParameter in your command code.

The certified command "Send email" has the sample code that uses this Cmdlet. A screenshot depicting the same:

Thanks,

Shailaja

View solution in original post

3 REPLIES 3

shailaja
4,533 Views

Hi,

Not sure I totally understood your question.

If you are asking about access to username who triggered the workflow execution during execution, you can get it using the Cmdlet Get-WfaRestParameter in your command code.

The certified command "Send email" has the sample code that uses this Cmdlet. A screenshot depicting the same:

Thanks,

Shailaja

CHRISTIAN_UMREIN
4,532 Views

Great. That is exactly what I have been looking for.

Thanks Shailaja

yaronh
4,532 Views

Hello Christian,

Shailaja's answer is correct for using it in commands.

Should you need it in user inputs - I am copying from another thread I responded to something similiar:

https://communities.netapp.com/message/95055#95055

In 2.0, if you'd go and define a user input called "$_WFAUser" you'd be able to get that value (Of the user currently logged in to WFA).

It would be a read only input (ie shown on the screen in preview) with a pre-defined tooltip.

You can use it in queries to correlate the logged in user with information from additional tables (Either native ones from the DFM cache

or with proprietary info from the user-specific playground DB).

While admittedly it can use a little more polish - I believe this is very usable and will offer a viable solution to most use cases.

Hope you might find that useful.

Thanks,

Yaron

Public