Wednesday, January 21, 2009

Default Task of Monitor Agent

I was running into the issues when somehow emails were not going via Workflow Policy. So as per the general debugging process I started finding the culprit. Here are the steps I followed :

1. Query for S_ESCL_REQ table, whether if the policy get trigger, at all, and I found the record was there with the specific rule_id. The query for this purpose is :

select * from s_escl_req
where rule_id = "WF Policy RowId"


2. Since the "Duration" was set to "0" (Zero), then there is no question of record getting created in S_ESCL_STATE. So I skipped that step to check whether the record exist in S_ESCL_STATE.

3. Now, uptill this point, I can make out that WF Policy is doing its job absolutely fine as it is getting triggered and record gets created in S_ESCL_REQ table, but it is "WF Policy Monitor Agent" which is not processing it, and could be the culprit.

4. Then I extend my search to find out what is the that monitor agent who is responsible to process these record. For that I checked the "WF Policy Group Name" which is associated with the WF Policy. Then I went to "Administration - Server Configuration -> Enterprises -> Component Definitions" view and in Components applet query for :
Component Type : Workflow Monitor Agent
to find out the monitor agent name associated with Policy Group

5. Now in Component Parameter Applet, query for Parameter = "Group Name". Scroll down the component list unless you find the desired WF Policy Group Name in the bottom applet.

6. I found the expected Monitor Agent name and now the next step is to check whether this monitor agent is running or not.

7. I naviagated to "Administration - Server Management -> Enterprises" and Query for the Server Name on which all the monitor agents run. In the Component applet, I was surprised to see that Monitor agent was in running state. This was really strange for anyone, if everything is running fine then why the email was not going.

8. To dig it more, I drilldown on Monitor Agent name to check for its task in running state and there I found something strange that "No Task was there". And most of the time it happens that if Monitor Agent is not processing anyting it generally shows the task status as "Sleeping for 30 seconds" or something like that.

9. So, here is the point when I got to know what the exactly issue is. If no task is showing in the Task applet that means the "Default Task" parameter of that WF Policy Monitor Agent is set to 0 (Zero), which is required to change to 1 (One).

10. So I just navigated back to "Administration - Server Configuration -> Enterprises -> Component Definitions" view , query for the Monitor Agent and in the bottom Parameters applet, just change the "Default Task" from 0 (Zero) to 1 (One).

11. Restarted the Monitor Agent once and it started processing the request.

hoooooooooo
, what a great relief, everything seems working fine now.

4 comments:

  1. Hai gaurav iam pragany .
    my issue is that i need to populate the picklist field that if chosen state then country need to populated please give me some idea how to that .

    ReplyDelete
  2. @Pragany : Please refer the below link to answer you query and search for "How to create a Constraint PickList?"

    http://siebelmantra.blogspot.com/search/label/Configuration

    ReplyDelete
  3. Thank you soo much
    your post helped me

    ReplyDelete
  4. Thank you so much
    your post helped me

    ReplyDelete