Topic
  • 6 replies
  • Latest Post - ‏2013-01-12T18:57:40Z by jmac_EmeriCon
SystemAdmin
SystemAdmin
7615 Posts

Pinned topic Ad-Hoc event to cancel process

‏2012-10-15T05:38:40Z |
Hi,
I have a requirement to provide a facility to User to cancel execution of the process anytime.
I have created a Human Service and handling logic which has to be fulfilled to cancel process execution. I am calling ad-hoc event and then connecting service to task.
My problem is:
I want ad-hoc event option to be visible to dynamic assignees. As per default configuration, its available to group configured in xml file which is static in nature. Is there any way by which I can get this working?

Thanks in advance,
Updated on 2013-01-12T18:57:40Z at 2013-01-12T18:57:40Z by jmac_EmeriCon
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Ad-Hoc event to cancel process

    ‏2012-10-15T14:36:19Z  
    What do you mean by "Dynamic" in this context. That is to say, do you mean that each instance would have a different list?

    Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Ad-Hoc event to cancel process

    ‏2012-10-16T04:11:54Z  
    What do you mean by "Dynamic" in this context. That is to say, do you mean that each instance would have a different list?

    Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
    Thanks for reply.
    Yes, each instance will have different list. I want Initiator to have an option to cancel process instance at any point of time.
    Regards,
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Ad-Hoc event to cancel process

    ‏2012-10-16T15:27:54Z  
    Thanks for reply.
    Yes, each instance will have different list. I want Initiator to have an option to cancel process instance at any point of time.
    Regards,
    Do the changes in 100Custom.xml to allow tw_allUsers or any high level company defined group, to send the Adhoc event
    In your BPD, You can select the option under Adhoc Start Event -> Implementation -> Event Visibility -> Restrict the visibility of this event -> Swimlane (check) and that will restrict the visibility to the participant group. You can use JSAPI to add the list of users for every instance and manipulate the participant group every time.

    One issue with the dynamic participant group approach is there will be new participant group created in BPMDB for each instance and they never get deleted even if the instance is removed.

    Hope this helps
    Manish
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Ad-Hoc event to cancel process

    ‏2012-10-16T21:18:41Z  
    Do the changes in 100Custom.xml to allow tw_allUsers or any high level company defined group, to send the Adhoc event
    In your BPD, You can select the option under Adhoc Start Event -> Implementation -> Event Visibility -> Restrict the visibility of this event -> Swimlane (check) and that will restrict the visibility to the participant group. You can use JSAPI to add the list of users for every instance and manipulate the participant group every time.

    One issue with the dynamic participant group approach is there will be new participant group created in BPMDB for each instance and they never get deleted even if the instance is removed.

    Hope this helps
    Manish
    Participant groups are "global" with respect to the snapshot, so if you change the participant group then the it would change the membership for all instances of the BPD on a given snapshot, not a single instance. If you are looking for a functionality to control exposure of something on a per instance basis, I don't think there is a way to meet that use case easily today.

    You could create a task on the BPD and dynamically change the assignment of that task based off of the correct logic, but this would be an entirely different approach from the one you are currently pursuing.

    Opening up the Ad Hoc's to "All users" might get you what you need as the user would still need to be able to find the instance to issue the Ad Hoc command, and that is governed by the portal visibility rules. The problem with that is that the rules don't project forward, so current and past participants would be able to use this, but future participant would not. Not sure exactly what your requirements are.

    Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Ad-Hoc event to cancel process

    ‏2013-01-12T18:26:27Z  
    Thanks for reply.
    Yes, each instance will have different list. I want Initiator to have an option to cancel process instance at any point of time.
    Regards,
    hi ,

    iam also having same requirement that the originator of the instance can only cancel the process any suggestions plz

    thanks
  • jmac_EmeriCon
    jmac_EmeriCon
    279 Posts

    Re: Ad-Hoc event to cancel process

    ‏2013-01-12T18:57:40Z  
    hi ,

    iam also having same requirement that the originator of the instance can only cancel the process any suggestions plz

    thanks
    If I had to do this I would likely use an Event Subprocess to cancel the Instance. Sending the message via a UCA from a human task is trivial, the issue is how are you going to know who the originator of the Instance was? If I recall correctly, this is not something that is stored for the BPMN engine, the BPEL engine does store the Process Starter. If you have a way of specifying the starter then you should not have a problem.

    Good Luck,

    John


    _______________________________________________________________________

    John McDonald

    EmeriCon, LLC