Contributor.. Gerard_K Contributor..
Contributor..
904 views

Is it possible to trigger a workflow report to print to PDF with PowerShell? [CM9.1]

Jump to solution

Basically, what I want to be able to do is trigger a WorkFlow PDF report with Powershell and have it save into the workflows default container.
I think I am on the right track with this object, but I can't seem to call it properly with powershell.

Add-Type -Path "D:\Hewlett-Packard\HP Records Manager\HP.HPTRIM.SDK.dll" #SDK PATH
$trimdb = New-Object HP.HPTRIM.SDK.database #define a database object
$trimdb.id = 'PP' #assign the database object a dataset identifier 
$Search = New-Object HP.HPTRIM.SDK.TrimMainObjectSearch($trimdb,[HP.HPTRIM.SDK.BaseObjectTypes]::Workflow) 

$Search.setsearchstring("doneOn:This Week")
foreach($WF in $Search){

<Report Generation Code using HP.HPTRIM.SDK.Report />

<Save Report to $WF.defaultContainer  />

}

Anything to point me in the right direction would be appreciated.

Kind Regards,
Gerard_K

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
EWillsey Acclaimed Contributor.
Acclaimed Contributor.

Re: Is it possible to trigger a workflow report to print to PDF with PowerShell? [CM9.1]

Jump to solution

Yes, you can!

---------
Erik
CMRamble.com
2 Replies
Highlighted
EWillsey Acclaimed Contributor.
Acclaimed Contributor.

Re: Is it possible to trigger a workflow report to print to PDF with PowerShell? [CM9.1]

Jump to solution

Yes, you can!

---------
Erik
CMRamble.com
Contributor.. Gerard_K Contributor..
Contributor..

Re: Is it possible to trigger a workflow report to print to PDF with PowerShell? [CM9.1]

Jump to solution

This is fantastic!

Thank you.

Gerard_K

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.