Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Guys,
I was wondering if we have a possibility to be able to Email the output of the complete filter.
I have a situation where I am creating a Volume and multiple qtree's with custom Quote per Qtree and then email all the qtree's within the volume so that we can have mount information for newly provisioned Shares.
I would really appreciate any suggestation or examples on this subject.
Thanks,
Sheel
Solved! See The Solution
1 ACCEPTED SOLUTION
sheelnidhig has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See my filter and the command code I've used. You being the WFA workflow designer, you must see the command code to understand how it works. Also read the WFA Develper's guide and REST Primer.
Parameters to filters are passed like:
http://localhost/rest/filters/<filter_uuid>/test?param1=val1¶m2=val2
Try it on your browser.
sinhaa
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
13 REPLIES 13
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you have a filter that currently works for what you are doing?
You may know this already, but that filter is nothing more than just a mySQL query. You could create a new custom powershell command to send the email, and use the 'invoke-mysqlquery' command to invoke a query against the WFA database to get the results you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks,
Is it posible to create an array element from a loop or repeating row (from filter [member of a group]).
And then email the complete array element !
,Sheel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another way.
Dump it in a file/playground.
Send email by retrieving the data from file/playgournd.
Regards
Abhi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I haven't tested it, but you may be able to do it within the commands by using the 'Add-WfaWorkflowParameter' command
$qtreedata =@()
$qtreedata += get-wfaworkflowparameter -name 'filesystemData'
$qtreedata += $Your_Qtree_Data_From_This_Command
add-wfaworkflowparameter -name 'filesystemData' -value $qtreedata
Then when you get to the last step you would use " get-wfaworkflowparameter -name 'filesystemData'" to get your data you wanted.
I haven't actually tried to overwrite an existing workflow parameter. Let us know how it goes if you go down this route.
abhit's suggestion would work as well. I have done that in the past where I dumped data out to a temp directory in a csv format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Answering to the original question.
I have n alternate solution as well. Its a filter, so you must know that a filters are available at WFA REST interface. Now I can excute them and get data in my command.
Attaching here a fully functional sample workflow here.
- It gets data from REST Apis executing the filter.
- Prepares html rows as would appear in testing the filter.
- Send this data as email.
1. Import the Data Source type, and then create a Data Souce out of it. It will get you data you need.
2. Import the filter. This is the filter I'm using
3. Import the workflow.
sinhaa
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Sinhaa,
This was really helpfull.
Just a follow up question with the Filter ULR.
How can i possibily provide an input to the Filer ULR, because if i dont provide an URL, i get the following error:
WfaException{Message: Missing filter parameter 'effective_cluster_version', Cause: javax.ejb.EJBTransactionRolledbackException: Missing filter parameter 'effective_cluster_version'}
and the URL I am ussing is : http://localhost/rest/filters/629d7946-3008-4938-917d-290aa085a8ee/test?IP=127.0.0.1
Thanks,
Sheel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I didn't get what are you asking here.
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
When we run any filter, we need to provide some inputs like cluster name or volume.
Like:
SELECT
volume.name,
vserver.name AS 'vserver.name',
cluster.primary_address AS 'vserver.cluster.primary_address'
FROM
cm_storage.volume,
cm_storage.vserver,
cm_storage.cluster
WHERE
vserver.id = volume.vserver_id
AND cluster.id = vserver.cluster_id
AND volume.name LIKE '${vol_name}%'
AND vserver.name = '${vserver_name}'
AND (
cluster.name = '${cluster_name}'
OR cluster.primary_address = '${cluster_name}'
)
In this case, if i access the filter via Rest APi, it will throw an error
WfaException{Message: Missing filter parameter 'cluster_name', Cause: javax.ejb.EJBTransactionRolledbackException: Missing filter parameter 'cluster_name'}
So is there any way to test the filter with Rest API and user input !
Not sure if I am able to explain my question 😞
,Sheel
sheelnidhig has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See my filter and the command code I've used. You being the WFA workflow designer, you must see the command code to understand how it works. Also read the WFA Develper's guide and REST Primer.
Parameters to filters are passed like:
http://localhost/rest/filters/<filter_uuid>/test?param1=val1¶m2=val2
Try it on your browser.
sinhaa
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sinhaa,
I cannot import your dar files, i get the below error:
"Dar of a higher version '3.0.0.41.1_dhansak' cannot be imported into a lower version '3.0.0.39.1_dhansak' of WFA."
Can you please provide a text version of the files so i can create my own?
Thanks
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Raj
you are getting the error because the .dar files are created on WFA3.1P1 and you likely have a WFA version older than that. Please Upgrade your WFA version to WFA3.1P2. Its has many enhancements and bugfixes over the older one.
Providing text version... will take time.
sinhaa
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sinhaa,
I was able to get the command working. However, i have an issue with running built-in Mysql function in a Filter, like 'sec_to_time' mysql function. I can run it fine on the DB directly but it fails on the Filter. How can we use Mysql functions in filters?
Thanks
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Raj, how do you assume I can debug anything if all you say is "it fails". A filter query can fail in 100s of ways.
So you need to provide what error is thrown.
Using a function in a filter query is works same as when used outside of it. I've tried many functions including sec_to_time and it works just as expected. So there is no special way. A filter afterall is just another SQL query with some added WFA dictionay rules of natural keys to be selected. That's all.
So if as you say it works outside of WFA but fails when in a WFA filter, it most likely due to the need for selecting all natural keys.
can you export your WFA filter that is failing and attach here?
sinhaa
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
