Problem configuring a Conditional Action

Hi all,

This is my first ever posting so apologies in advance for any nube errors.

I am trying to use a conditional action to trigger when the ToDoList for the relevant stage becomes empty but can't get it to work.

The code I'm using on theOnly Start Action If  is: (GetToDoList(ProcessContext.FolderID)==List.Empty)

On testing I have been unable to get this condition to trigger.  I can see that the ToDoList is empty by using the Metastorm Administration page to browse to the relevant process and check the Alert Lists.

The stage has a dynamic role assigned to it's ToDoList and has two actions that loopback removing each the participant from the ToDoList after they have performed either one of the two available actions (Approve or Decline)
I am using Metastorm v9.2.1.2220

Any help or insights gratefully appreciated.

Tagged:

Comments

  • I suspect that this is a relative timing issue between the various components of BPM.

     

    To understand what's likely to be happening here you need to understand what happens when a folder is moved or an action is taken on a folder that causes the ToDo list to be updated. The ToDo list is managed by the Alert Generator and this workload is queued, so on a busy engine there can be a delay between an action completing and the alerts being 'refreshed' as a consequence of that action.

     

    So it may be that when your conditional action is evaluated there are ToDo list alerts remaining but by the time you manually check the alerts they have been updated - and it seems that your conditional action has failed. These kind of timing issues can sometimes cause unexpected behaviour.

     

    I would rework the condition on your action so that it doesn't read the ToDo list but maybe uses the functionality of your dynamic role (i.e. pull back the list of your users directly and not through the ToDo list). This means that you're not dependent on the Alert Generator completing it's work before evaluation of your conditional action.

     

    Hope this helps.

  • Thanks Paul, for other reasons I have been trying to enumerate the users in agiven role but can't seem to find the relevant commands. Could I be cheeky and ask for a pointer on that to please (sorry, complete nube here).

  • After some considerable experimentation I find that I am unable to get even the simplest conditional actions to trigger at all.  Even if I put a simple value of 'true' in the Only start Action if field it still fails to trigger and my folders get stuck at the system stage where the conditional action is associated.  What am I doing wrong?

  • Check your registry

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Metastorm\e-work\Engine\Alert generator

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Metastorm\e-work\Engine\Event manager

     

    What are the values in the above areas?

    NOTE: the above keys are for 64-bit systems, if 32-bit, remove the Wow6432Node

  • [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Metastorm\e-work\Engine\Event manager]
    "Thread count"=dword:00000001
    "Batch size threshhold for thread"=dword:0000000a
    "Disabled"=dword:00000000
    @=""
    "Poll Interval (secs)"=dword:00000000

     

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Metastorm\e-work\Engine\Alert generator]
    @=""
    "Poll Interval (secs)"=dword:00000000
    "Thread count"=dword:00000001
    "Batch size threshhold for thread"=dword:00000005
    "Disabled"=dword:00000000

  • Hi Bill,

     

    Under the properties of the conditional action; is the 'Priority' set higher than the other actions. (ie. a priority of 1)

    This may be an ordering issue of which action to evaluate first.

     

    Cheers.

  • Thanks for all the suggestions.  After carefully reviewing my hand written notes from my foundation training I spotted a note about making a change to the setting of Auto Refresh Alert Lists in the web config file on the Metastorm server from the default value of 0 to 1.  Having made this change and resatarted iis I now have my conditional actions working a treat!

    I do like a happy ending.