Filter for workitem

Which IIQ version are you inquiring about?

8.4p1

Share all details about your problem, including any error messages you may have received.

I have a “Inactive User Work Item forwarding rule” where I want to forward certification items to a workgroup when a manager becomes inactive after a certification campaign has kicked off. When I run the “perform certification maintenance” task, I realized none of the workitems are of “certification” type. Thats a condition in my rule because I want to be sure I dont mess with all the workitems. I have attached my rule and certification work item object.

Inactive User Work Item Forwarding rule.xml (2.3 KB)

certification workitem object.xml (731 Bytes)

Hi @dmaan,

There are two things I believe you can do.

Firs of all, your “Inactive User work item test” rule is returning an Identity object while it is supposed to return a string. To solve this, instead of:
return newOwner
use:
return newOwner.getName()

Secondly, the “item” passed to your rule is actually a Notifiable object, not a WorkItem or CertificationItem. I woud then use:

String id = item.getId();
WorkItem = context.getObjectById(WorkItem.class, id);

//Rest of your code to check the item type is ok

Hope it helps you

hi @angelborrego ,

thanks for your response. I made the change you suggested. However, I am still getting the same results. I dont see any “certification” type workitem in my logs. all of them are “form”.

Hi,

Could you provide more details on what the “Perform Certification Maintenance” task does in your environment?

I suspect that this task might not be responsible for checking certification WorkItems. That could explain why you’re only seeing Form types in the logs instead of Certification.

Also, try this:
Testing Certification Reminders and Escalations - Compass
You might find that resource helpful for testing escalation rules in certifications.

Let me know what you find!

image
I have checked “forward inactive user work items”. Since this is a “perform certification maintenance” task , I would assume it would be for certifications.

Also ,the reason I am going this route is so I can run this task ad hoc. Escalation rule only triggers as per the schedule.

Hi @dmaan,

I finally understood. The problem is that the “Forward inactive user work items” option only affects the following Types of Work Items.

Certification type isn’t one of them, which is the reason why your rule didn’t catch any. I would suggest to create a schedule task that runs a rule like the following one:

  QueryOptions qo = new QueryOptions();
  qo.add(Filter.eq("type", "Certification"));
  qo.addOrdering("modified",false);							//To order them by date recent to older (not necessary)
  List wItems = context.getObjects(WorkItem.class, qo);

  if(wItems != null && wItems.size()>0){

    for(int i=0; i < wItems.size(); i++){

      WorkItem item = wItems.get(i);
      Identity owner = item.getOwner();
      if(owner != null && owner.isInactive()){
        
        //YOUR CODE
        
      }

    }
  }

This rule looks up the active workItems of “Certification” type and checks wether the owner is inactive or not.

Hope this solves your problem!

hi @angelborrego ,

I queried the database to see if it also had “certification” as the type in the spt_work_item table. Those workitem are there. I can certainly try what you are suggesting but to me it makes no sense that an option available in the “Perform Certification Maintenance” would not have "certification’ work items.

sorry for the confusion. Apparently, there is no such task as “Perform Certification Maintenance”. Turns out someone duplicated the perform maintenance task and renamed it so I thought it was an OOTB task. But still its strange that I see the “certification” type work item in database but not in the rule.

Yes, the task should consider certification work items, but as stated in the documentation, it does not. The most viable solution I see is to schedule a task using the code I provided earlier.

If you end up using the suggested code and it works correctly, I would appreciate it if you could mark it as the solution

Thanks in advance

Hi @dmaan,

Just checking in to see if my response helped with your issue or if you found any other workaround. Let me know if you need further assistance!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.