Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Scheduled Job Privileges (IDAPI)
al91206
We're trying to automate scheduled job inputs with an IDAPI program, but are unable to find how to add privileges to the job. This is the main priority.
As a side-note we are also unable to find out how to uncheck "Wrap Text" in the xls output via IDAPI as well.
Any help is appreciated - code is attached.
Thanks!
Al
Find more posts tagged with
Comments
averma
Hi Al,
You can set privileges using the NewFile.setACL() method.
The conversion output options are passed in as part of the ParameterValues array in the SubmitJob idapi in addition to the report's regular parameters. To disable text wrapping set $$$AC_CONVERSION_OPTION_rptdesign_XLS_TextWrapping to false.
Ashwini
al91206
<blockquote class='ipsBlockquote' data-author="'averma'" data-cid="66788" data-time="1280260372" data-date="27 July 2010 - 12:52 PM"><p>
Hi Al,<br />
You can set privileges using the NewFile.setACL() method.<br />
The conversion output options are passed in as part of the ParameterValues array in the SubmitJob idapi in addition to the report's regular parameters. To disable text wrapping set $$$AC_CONVERSION_OPTION_rptdesign_XLS_TextWrapping to false.<br />
<br />
Ashwini<br /></p></blockquote>
<br />
Ashwini ... we have a couple of problems with this.<br />
<br />
1. The privileges are set to the output file ? not the job ? meaning if it is a recurring job, those same privileges are not passed to the 2nd output file unless we have it overwrite the first one always.<br />
<br />
2. The privileges are set after the file is written meaning the notification goes out without an attachment because the privileges are not yet applied to the file. <br />
<br />
We cannot be the only ones who have asked how to assign privileges to a job in IDAPI ? there must be a way we?re missing to associate privileges to the job (not the file) just as the management console does.<br />
<br />
Thanks!<br />
<br />
Alfred
averma
Hi Alfred,
I don't think the product documentation spells out every attribute for IDAPI calls. The easiest way to get all required options for a single operation is to attach a tcp tunnel to the iServer soap port and perform the desired operation in Management Console to see what message it sends to iServer and construct your IDAPI call accordingly.
Ashwini
al91206
I wonder if anyone has successfully scheduled a job using IDAPI where the job has privileges and the output file is attached? If so - can you please provide the example code?
If not - has anyone scheduled a job using IDAPI and that scheduled job sent the output file as an attachment (regardless of privileges)? If so - can you please provide the example code?
These are both using iServer Express.
I'm hoping this is possible.
Thanks,
Al
Serguei
I looked at the attached code and I think the reason for why email is delivered without attachment is no privileges set on the output file. Whether user receive attachment or not depends on whether this user has sufficient privileges on the output file. If privileges are insufficient the user will receive email without attachment. Note that Read (R) privilege is required in order to get the attachment.
Please see the following example request. Notice the <ACL>:
<SOAP-ACTU:SubmitJob xmlns:SOAP-ACTU="
http://schemas.actuate.com/actuate11">
;
<JobName>test</JobName>
<Priority>500</Priority>
<InputFileName>/test.rptdesign;1</InputFileName>
<RunLatestVersion>false</RunLatestVersion>
<RequestedOutputFile>
<Name>/Home/administrator/test.rptdocument</Name>
<ReplaceExisting>false</ReplaceExisting>
<MaxVersions>0</MaxVersions>
<ACL>
<Permission>
<RoleName>Role1</RoleName>
<AccessRight>RW</AccessRight>
</Permission>
<Permission>
<UserName>kushal</RoleName>
<AccessRight>RV</AccessRight>
</Permission>
</ACL>
</RequestedOutputFile>
<Operation>RunReport</Operation>
<NotifyUsersByName>
<String>Administrator</String>
<String>kushal</String>
</NotifyUsersByName>
<NotifyGroupsByName/>
<NotifyChannelsByName>
<String>channel1</String>
</NotifyChannelsByName>
<RetryOptions>
<RetryOption>VolumeDefault</RetryOption>
<MaxRetryCount>0</MaxRetryCount>
<RetryInterval>0</RetryInterval>
</RetryOptions>
<AttachReportInEmail>true</AttachReportInEmail>
<SendEmailForSuccess>true</SendEmailForSuccess>
<SendEmailForFailure>true</SendEmailForFailure>
<SendSuccessNotice>true</SendSuccessNotice>
<SendFailureNotice>true</SendFailureNotice>
<EmailFormat>PDF</EmailFormat>
<OverrideRecipientPref>true</OverrideRecipientPref>
</SOAP-ACTU:SubmitJob>
Serguei
I want to clarify some points:
1) Currently you cannot send an email notification to an arbitrary email address. You can send a notification to a user or a group. This is due to security considerations.
2) You can notify a user without any privileges on the output file via email, but the output file will not be attached to the email. Also the link usually included in the email will require authentication anyway.
3) You can set privileges (ACL) on output file right in the same SubmitJob request, so they will be applied to all versions of the output file in case of a recurrent schedule.