dk0200
(Diwas Karki)
August 7, 2024, 2:20pm
1
Which IIQ version are you inquiring about?
IIQ 8.4p1
Share all details related to your problem, including any error messages you may have received.
I am calling a workflow from a rule to open work items. How do I add comment to the workitems?
Currently I added comment postscript but that does not seem to work.
workflow - Generate Manual Revoke Access Workflow.xml (9.9 KB)
Hi @dk0200
Can you try this in your approval step?
Arg name=“workItemComments” value=“workitems for certification revocation”
dk0200
(Diwas Karki)
August 7, 2024, 7:09pm
3
I tried passing in it like this. It wouldnt save. Is this how you meant?
@dk0200 I don’t see workItemForm in your approval logic. Can you check ?
ashutosh08
(Ashutosh Singh)
August 8, 2024, 5:17am
5
Hi @dk0200 ,
Can you try below snippet after adding in the approval.
Also save object and commit is option if it is not saving.
<InterceptorScript>
<Source>
import java.util.ArrayList;
import java.util.List;
import sailpoint.object.Comment;
import sailpoint.object.WorkItem;
if (Workflow.INTERCEPTOR_OPEN_WORK_ITEM.equals(method)) {
List comments=new ArrayList();
Comment cmt=new Comment("Test Comments ","username");
comments.add(cmt);
item.setComments(comments);
context.saveObject(item);
context.commitTransaction();
}
</Source>
</InterceptorScript>
Let us know if it solves purpose.
Thanks
I guess, in your workflow your are using the incorrect argument name, it should be workItemComments
dk0200
(Diwas Karki)
August 8, 2024, 2:15pm
7
I am not using any forms here. I am calling the workflow from this rule.
Generate manual work items Prod.xml (9.5 KB)
dk0200
(Diwas Karki)
August 8, 2024, 2:20pm
8
@ankush-shirbhate that worked. Thank you
system
(system)
Closed
October 7, 2024, 2:20pm
9
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.