BPM, Workflow, and Case

Expand all | Collapse all

Ad-hoc activity do not start when using precondition

  • 1.  Ad-hoc activity do not start when using precondition

    Posted Wed September 29, 2021 05:00 PM
    Hi All,

    I'm trying to add a user-startable ad-hoc human task to my process:
    There is no problem when I don't set precondition, but when I set, the activity is never startable, even when the condition is met. Plus, I can set the precondition only in JavaScript mode, because the variable picker do not select any variable in traditional mode.

    Is there any restriction to set precondition for an ad-hoc activity? Or a trick to solve the problem?

    The diagram looks like this:

    Dirty check is a standard task, Ad-hoc Dirty check is the preconditioned ad-hoc activity. The precondition use a process variable (adHocDirtyCheckEnabled, boolean) which is set to true in the Pre Assignments when the token arrives to the upper Dirty check activity and is set to false in the Post Assignments of it when the activity ends.

    The precondition for the ad-hoc activity looks like this:
    So, when the token arrives to the upper Dirty check activity, the process variable is set to true, but the ad-hoc activity is not enabled. Why?
    Note: Selecting "A variable is updated" event and adding the variable to the list of variables has no effect, the activity is still not enabled.

    The other problem is that I can't set the condition in the traditional way:
    because selecting the variable has no effect, the first field remains empty (and we cannot enter any text, we must use the picker).

    What's wrong? How could I specify a working condition to enable the ad-hoc activity corresponding to say a variable?


    Laszlo Kertesz

  • 2.  RE: Ad-hoc activity do not start when using precondition

    Posted Thu September 30, 2021 03:39 AM
    Hi Laszlo,

    On variable selection in the precondition: that should not behave like that, variable should be selectable. I used that in lower BAW versions, till without any issues. That's definitely a product bug. In fact, I used the precondition expression along with the precondition event whiteout any issues of selection.

    On starting your ad-hoc activity: If you select "Manually by the user", the activity will not be started even if the preconditions are met. It must be set as "Automatically by the system" in order to start the activity by the system when the preconditions are met. 
    There are different ways of starting an ad-hoc activity when started manually by the user, please refer to - Starting Ad-Hoc (Unstructured) activity in IBM BAW/BPM

    Atanu Roy
    Solution Architect
    Salient Process