Assign Instances to a Participant

Is it possible to assign an instance to a participant within PBL code or is that something that is only done with the Workspace?

Yes. Here's an example of how to assign the instance to the participant that created the instance:
participant.next = creation.participant This logic just needs to be in an Automatic activity upstream of the Interactive activity.
If all you have is the participant's name, you might do this using logic like this:
// this assumes that "participantName" is a string that has already been set
part as Participant
// Using this name, find the participant and set it to the "part" object
find Participant
  using name = participantName
  returning part
// Now use the "part" object to set the predefined variable for
//   next participant
participant.next = partDan

Similar Messages

  • How to assign Activity to Participant with less assigned Instances??

    Hi!
    I'm trying to automatically assign the next Interactive Activity to the participant who has less assigned instances.
    I already know how to get a list of the participants who have the corresponding role, but I don't know how to get the number of assigned instances of a determined process that each participant has.
    Any ideas?? Thanks in advance!

    OK, I finally managed to do it :^O
    I get all participants with the Role "Iniciador", then get how many instances of the process they have assigned. And finally I send this instance to the participant with less work.
    logMessage("AutoAssign - Entering...");
    DirectorySession dirSession = DirectorySession.currentEngineSession;
    DirOrganizationalRole role = DirOrganizationalRole.fetch(session : dirSession, id : "Iniciador");
    Fuego.Fdi.DirHumanParticipant[] participants = role.fetchAssignedParticipants();
    BusinessProcess.connectTo(url : Fuego.Server.directoryURL, user : "redscare", password : "redscare", process : activity.process.name);
    String nombre="";
    int c=0;
    logMessage("AutoAssign - Entering foreach");
    foreach (element in participants) {
         filtro = InstanceFilter();
         filtro.create(processService : BusinessProcess.processService);
         filtro.searchScope = SearchScope(participantScope : ParticipantScope.ALL, statusScope : StatusScope.ONLY_INPROCESS);
         filtro.addAttributeTo(variable : VarDefinition.PARTICIPANT_ID, comparator : Comparison.IS, value : element.id);
         instances = BusinessProcess.getInstancesByFilter(filter : filtro);
         if(nombre=="" || instances.length()<c){
              nombre=element.id;
              c=instances.length();
    logMessage("AutoAssign - Exiting foreach");
    participant.next = Participant.find(name : nombre);
    participant.sticky = true;
    logMessage("AutoAssign - Exit. Participant.next= "+participant.next.name);

  • Assign instances in a big organization

    Hi,
    I have a questions about how do you implement a big organizational unit with Fuego BPM.
    For example,
    - A bank with some offices (Example: 50 offices)
    - With Director and Subdirector (Different Roles)
    When I want to send an instance to the Director of the Office number 70, How can I send this instance to the correct Director?
    I can't use parametric roles, because the customer don't want to update all the changes in their offices manually.
    The customer wants to read all participants from an active directory and update these attributes in a oracle fdi.
    It's similar to re-assign by role, or re-assign by role and participant.
    I suppose that this problem has been solved in some big customers.
    Thanks in advance

    To model your organization you have basically 2 dimensions:
    1) Organizational Units (OUs)
    2) Roles
    you can plan a layout of both concepts so that you can implement the functionality you need. Basically OUs define visibility of processes and Roles define the permissions on them.
    Take a look at the concepts in the documentation to learn more about them.
    Mariano

  • Assign to a specific participant

    Hello,
    I'm new to Oracle BPM suite. I have designed my process. what i'd like to do now, is for example an activity would be assigned to a participant and not to a role. which means an activity would be shown in the task list of a specific participant, and not in the list of other members of the role.
    thanks for ur help

    Hello, Thank you very much for your help.
    It seems to be exactly what i'm looking for, but i tried it and it didn't work. i'dont know if there is something else i should do?
    what i did is :
    i have two inetractive activities in two differents roles, in the first interactive activity, i choose a participant who have the second role, and the goal is that the task would be assigned only to that participant.
    i copied the code : Participant.next=Participant(idParticipant) inside an automatic activity. and i tried putting it before and after the first interactive activity. and before the second. and also inside the two interactive activities and it didn't work.
    thanks

  • ClassCastException during Deserialization : Assigning instance of class...

    Hi All,
    I'm writing a client-server application.
    The server sends serializable objects to the client via a socket.
    When the client try to deSerialize the Object( in.readObject() ),
    I got Exception:
    java.lang.ClassCastException: Assigning instance of class java.io.ObjectStreamClass to field seda.sandStorm.lib.http.httpResponse#contentType
    at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2266)
    at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:514)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1407)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
    at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2258)
    at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:514)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1407)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
    at seda.Dseda.internal.ObjectReader.readObj(ObjectReader.java:96)
    at seda.Dseda.internal.ObjectReader.readPacket(ObjectReader.java:77)
    Both client and server have exactly the same copy of the classes.
    Any help would be apprciated.
    Thanks, Gil.

    Hi,
    I hava managed to solved the problem:
    The ObjectOutputStream need to be reset after every write(..).
    Gil.

  • Create Value assignment instance in CG02

    Hello All,
    I am trying to create a Value assignment instance in CG02 transaction using BAPI 'BAPI_BUS1077_CREATE'.
    I dont get any error in my execution. However, the instance is not getting saved in databse.
    FYI, I have used BAPI 'BAPI_TRANSACTION_COMMIT' and 'BAPI_BUS1077_SAVEFROMBUFFER' to save the data.
    Does anybody have any idea?
    Thanks.

    Hello All,
    I am trying to create a Value assignment instance in CG02 transaction using BAPI 'BAPI_BUS1077_CREATE'.
    I dont get any error in my execution. However, the instance is not getting saved in databse.
    FYI, I have used BAPI 'BAPI_TRANSACTION_COMMIT' and 'BAPI_BUS1077_SAVEFROMBUFFER' to save the data.
    Does anybody have any idea?
    Thanks.

  • How to assign instances within an OU?

    Hi,
    I have two OU's as follows:
    OU1
    |
    +-Sales_1
    |
    +-Infrastructure_1
    OU2
    |
    +-Sales_2
    |
    +-Infrastructure_2
    Right now if a Sales_1 participant generates an instance, both, Infrastructure_1 and 2 can see the instance in their inbox.
    What i need is: if the Sales_1 participant generates an instance, this instance must be only in the Infrastructure_1 participant's Inbox, and the same behavior if the instance is created by Sales_2 -Infrastructure_2. Is it possible to do this?
    Regards!!

    Hi,
         Essentially, the access to business process is determined by these 2 artifacts: OU and roles.
         For a person to have access to an activity in a process, this participant should belong to the Organizational Unit in which the process has been deployed as well as having the right roles assigned to him/her.
         In the event of a process connecting to a sub-process, the instance will be created without any problem even when the main process and sub-processes are deployed to different Organizational Units. The only problem may be that if the sub-process is deployed to a different Organizational Units, it will ONLY be visible by participants in the sub-process Ous and with the right roles assigned.
              eduardoc.

  • Re-assign Instances in Bulk

    Hi,
    In our project we have a requirement of reassigning the instances which are currently pending with user to another user from a screenflow. An admin user will enter a ID of a user and also provide the ID of the user the requests need to be assigned to. Then all the instances that are pending with one user would be reassigned to the other user. Can anyone please help me with a way of designing this functionality.
    Thanks!

    Hi Sree,
    Here's logic I use to automatically reassign instances in bulk.
    It assumes that the participant that you're assigning the instances to ("instanceToActOn.participantId" in the logic below) is a valid participant for the activity you're assigning him to.
    Note also for this to work, the process has to have a Grab activity (called GrabAutomatic" in this example) with its property set to "From all / To all". The participant "AUTOCLIENT" has to be assigned the role where the Grab activity is located. I use an "AutomaticGrab" because not all activities have their "Assignable" property set.
    Use your own logic to search and populate the list of instances to reassign ("instf" variable in the logic below).
    <pre class="jive-pre"><p /> logMessage "PapiHelper: actionAssign: Entry: instance: " + instanceToActOn.instanceIn
    using severity = DEBUG
    logMessage "PapiHelper: actionAssign: participant: " + instanceToActOn.participantId
    using severity = DEBUG
    bp as BusinessProcess
    instF as InstanceFilter = InstanceFilter()
    instances as Fuego.Papi.Instance[]
    instanceDescription as String
    connectTo bp
    using url = Fuego.Server.directoryURL,
    user = "AUTOCLIENT",
    password = "P",
    process = "/" + processName
    logMessage "next is prc id"
    create(instF, processService : bp.processService)
    instF.searchScope = SearchScope(participantScope : ParticipantScope.ALL,
              statusScope : StatusScope.ONLY_INPROCESS)
    addAttributeTo instF
    using variable = VarDefinition.INSTANCE_NUMBER,
    comparator = Comparison.IS,
    value = instanceToActOn.instanceIn
    instances = getInstancesByFilter(bp, filter : instF)
    logMessage "instances" using severity = DEBUG
    for each inst in instances do
    logMessage "Found it: " + inst.id
    do
    logMessage "Select: " + inst.selected
    if inst.selected then
    logMessage "instance selected"
         unSelect inst
    end
    logMessage "instance selected"
    reasign(inst, participant : instanceToActOn.participantId)
    logMessage "assigned it to " + instanceToActOn.participantId
    on e as Exception
    logMessage "Exception: ->" + e.message
    description as String = String(getVar(inst, var : "PREDEFINE_DESCRIPTION"))
    logMessage "Trying grab for " + description
    do
    grab inst
    using grabActivity = "GrabAutomatic"
    logMessage "Grabbed Instance Status: " + inst.grabbed
    using severity = DEBUG
    runTask inst
    using activity = "GrabAutomatic"
    logMessage "Ran Grab " + inst.grabbed
    using severity = DEBUG
    route inst
    using activity = instanceToActOn.activityName
    logMessage "Routed back"
    using severity = DEBUG
    reasign(inst, participant : instanceToActOn.participantId)
    logMessage "reassigned it to " + instanceToActOn.participantId
    on e1 as Exception
    logMessage "Exception w/i exception: " + e.cause
    errors = errors + "Instance: " + description + " could not be reassigned\n\n"
    logMessage "Errors: " + errors
    end
    end
    end
    disconnectFrom bp
    logMessage "PapiHelper: actionAssign: Exit: instance: " + instanceToActOn.id
    using severity = DEBUG</pre>
    Hope this helps,
    Dan

  • Error while creating concurrent workflow instances with dynamic participant

    Hi All,
    I have a workflow which has 3 interactive activites. The second interactive activity has requires approval of atleast 3 users to proceed. The participants are also not known in advance and are created dynamically by creating the directory session. The workflow is instantiated using an external trigger. The approval for interactive activities is also provided by an external trigger (API call).
    Now, there is a scenario where i have 1000 requests coming in to ALBPM and workflow instance should be created for each of them. But only one instance is created and for the rest i get the following exception. This also happens with just 2 requests. I also tried calling the API in a synchronized way but didnt help.
    Is anybody aware why is this error encountered anf how it can be resolved?
    java.lang.IllegalStateException: Cannot set the directory Connector Service while connector service is started
    at fuego.connector.CompositeConnectorService.setDirectoryConnectorService(CompositeConnectorService.java:97)
    at fuego.connector.CompositeConnectorService.restartDirectoryConnectorService(CompositeConnectorService.java:52)
    at fuego.directory.DirectoryConfigurationManager.loadDirectoryConfiguration(DirectoryConfigurationManager.java:265)
    at fuego.directory.DirectoryConfigurationManager.getDirectoryConfiguration(DirectoryConfigurationManager.java:217)
    at fuego.directory.DirectoryConfigurationManager.getDirectoryConfigType(DirectoryConfigurationManager.java:199)
    at fuego.directory.provider.Factory.getDirectoryFactory(Factory.java:214)
    at fuego.directory.Directory.fillPassport(Directory.java:122)
    at fuego.directory.DirectoryPassport.fillPassport(DirectoryPassport.java:274)

    Hi Dan,
    Thanks for replying and giving attention. I have the following scenario :-
    1. I am getting a list of identifiers(some number) from a third party application along with the users/participants who are liable to approve the workflow instance.
    2. I create a workflow instance using this identifier through PAPI using process service session and also create the user/participant through PAPI by using the following code. Please note that i dont create participant in ALBPM instead i do it programatically in java using the PAPI :-
    DirectorySession directorysession = null;
    if (userVO != null && userVO.getUserId() != null && !userVO.getUserId().trim().equals(""))
    +{+
    +     directorysession = this.createFDISession();+
    +     List<RoleAssignment> roleAssignmentList = new ArrayList<RoleAssignment>();+
    +     try {+
    DirOrganizationalRole[] dirOrganizationalRoleArray = DirOrganizationalRole.fetchAll(directorysession);
    for(int i=0; dirOrganizationalRoleArray!=null && i<dirOrganizationalRoleArray.length; i+) {+
    +DirOrganizationalRole role = dirOrganizationalRoleArray;+
    +}+
    int permissions = -1;
    permissions
    += 0 |+
    DirHumanParticipant.getPermissionValue("X") |
    DirHumanParticipant.getPermissionValue("R") |
    DirHumanParticipant.getPermissionValue("S") |
    DirHumanParticipant.getPermissionValue("A") |
    DirHumanParticipant.getPermissionValue("D") |
    DirHumanParticipant.getPermissionValue("E") |
    +0;+
    +String[] whichRoles = new String[]{+
    +"Approver",+
    +"Requestor",+
    +};+
    +DirHumanParticipant.RoleAssignment[] roleAssignments = new DirHumanParticipant.RoleAssignment[whichRoles.length];+
    for(int i=0; i<whichRoles.length; i+) {+
    +roleAssignments[i] = new DirHumanParticipant.RoleAssignment(whichRoles[i], permissions, DirOrganizationalRole.fetch(directorysession, whichRoles[i]).getIn());+
    +}+
    +     String organizationUnit = configuration.getProperty("ORGANIZATION_UNIT");//fuegoFileProperties.getProperty(BVIDConstants.FUEGO_CONNECTIVITY_KEY_ORGANIZATION_UNIT);+
    +     String newUserPwd = configuration.getProperty("FUEGO_FDI_NEW_USER_PASSWORD");//fuegoFileProperties.getProperty(BVIDConstants.FUEGO_CONNECTIVITY_KEY_FDI_PWD);+
    +     DirOrganizationalUnit orgUnit = DirOrganizationalUnit.fetch(directorysession,organizationUnit);+
    +     DirHumanParticipant user = DirHumanParticipant.create(directorysession, userVO.getUserId(), userVO.getFirstName(), userVO.getLastName(),+
    +                              userVO.getFirstName(), userVO.getEmail(), userVO.getPhone(), "",+
    +                              newUserPwd, orgUnit,roleAssignments, true);+
    +     user.update();+
    +     }+
    +     finally+
    +     {+
    +               log.info("diconnecting the directory session created for creating participant");+
    +               directorysession.disconnect();+
    +     }+
    +}+
    3. The workflow instance then waits at interactive activity to get the next trigger with the same identifier to move the workflow ahead.
    4. Now the case is that i can get 1000 such identifiers at a time in a file which i ll read for which i need to create 1000 workflow instances parallely. During this process i get the following exception : -
    java.lang.IllegalStateException: Cannot set the directory Connector Service while connector service is started
    at fuego.connector.CompositeConnectorService.setDirectoryConnectorService(CompositeConnectorService.java:97)
    at fuego.connector.CompositeConnectorService.restartDirectoryConnectorService(CompositeConnectorService.java:52)
    at fuego.directory.DirectoryConfigurationManager.loadDirectoryConfiguration(DirectoryConfigurationManager.java:265)
    at fuego.directory.DirectoryConfigurationManager.getDirectoryConfiguration(DirectoryConfigurationManager.java:217)
    at fuego.directory.DirectoryConfigurationManager.getDirectoryConfigType(DirectoryConfigurationManager.java:199)
    at fuego.directory.provider.Factory.getDirectoryFactory(Factory.java:214)
    at fuego.directory.Directory.fillPassport(Directory.java:122)
    at fuego.directory.DirectoryPassport.fillPassport(DirectoryPassport.java:274)
    Please let me know if you need any more information. awaiting your help
    Thanks,
    Anand

  • PBL to retrieve all instances assigned to a participant

    Hi there,
    I have a requirement to print a series of work items as a single PDF. I think i may have a solution but struggling with the PBL - any help much appreciated. My solution is this..
    * Participant will take a number of work items using bulk actions -> assign to me
    * Use a Global Interactive to call a screen flow
    * Screen flow activity includes PBL to retrieve all work items assigned to the current user
    * Take all the required data from the work items and pass to a PDF generation service as one print item.
    Could anyone please help with how I would retrieve all instances assigned to the current user in PBL? I am using Oracle BPM 10.3.
    thanks
    Neil
    Edited by: user13297570 on Jul 2, 2010 9:32 AM

    Neil - try something like this to get a list of instances assigned to the current participant:
    busProcesses as BusinessProcess
    instanceFilter as InstanceFilter
    instance as Fuego.Papi.Instance
    processName as String = "/" + "<your process Id here>"
    connectTo(busProcesses, url : Fuego.Server.directoryURL,
       user : "<a Participant's name that is used for API access here>",
       password : "<the password here>", process : processName)
    create instanceFilter
        using processService = busProcesses.processService
    instanceFilter.searchScope = SearchScope(participantScope : ParticipantScope.ALL,
    statusScope : StatusScope.ONLY_INPROCESS)
    addAttributeTo instanceFilter
        using variable = VarDefinition.PARTICIPANT_ID,
              comparator = Comparison.IS,
              value = Participant.id
    // list the instances
    for each inst in getInstancesByFilter(busProcesses, filter : instanceFilter) do
    endDan

  • Retrieving all the instances assigned to a participant

    Hi all,
    I need to show in a task of a process all the instances of other processes assigned to the current participant or to all participant of a group.
    How can I do it? Which properties of these instances can I retrieve?
    Thank you,
    petitit

    I tried this :
    InstanceFilter instF;
    instF = InstanceFilter();
    comparator = Comparison.IS;
    instF.addAttributeTo(variable : VarDefinition.authorid, comparator : comparator , value : this.participant.id);
    listeInstances = ProcessService.getInstancesByFilter(filter : instF);
    But the process stay blocked while executed this task, although there is no loop... :S
    Any idea please?

  • Sending the process instance to a particular participants workspace

    Hi All,
    I am a bit new to Aqualogic BPM. I have to design a process, the requirements of which are as follows:
    The process has three roles:
    - Super Users
    - Supervisor
    - Primary Users
    Super User and Supervisor will have one participant each but the role Primary Users can have multiple participants. The process will be initiated by the Super User, which will go in the Supervisors workspace. Now, the supervisor should have the flexibilty of assigning this intance to any one of the participant in the Primary User role.
    The Approach that i am following (from Supervisor onwards):
    Supervisor will see a presentation where he'll have all the participants of Primary Users in a drop down, from where he can select the participant to whom he wants to assigned. Then i am assigning it to Participant.next but unfortunately when taking the log, Participant.next is coming null.
    I have following queries:
    - Why Participant.next is still coming null?
    - Can't we assign anything to Participant.next?
    - Can we direct the instance to any Participant which is from a different role (just after the role from where we are assigning)?
    - Is there any other approach that can resolve this issue?
    Thanks,
    Akshay

    Have you tried using the lower case version "participant.next" instead? Also, I think this is only available to automatic activities.
    TP

  • Assigning an interactive activity  by excluding a specific participant

    Hi,
    I'm trying to implement an approval process using ALBPM 6.0, and have a problem couldn't solve effectively.
    There is an interactive activity (let's call it actA) assigned to roleA, a second activity(actB) assigned to roleB. actB executed after actA and an unconditional transition placed between them. Both roleA and RoleB have some common participants. The problem is, both activities shouldn't be assigned to the same participant. How can I guarantee that a participant who has assigned to roleA and roleB does not see actB in his inbox if he executed actA?
    Do you have any suggestions or a solution?
    Thanks.

    Here's the logic that does a "round robin" assignment, but excludes a specific participant.
    role as Role = Role.find(name : "Employee")
    parts as Participant[] = role.participants
    indexStored as String = retrievePropertyFor(Fuego.Server,
                                        application : "RoundRobin",
                                        name : "LastParticipantIndex")
    lastIndex as Int
    finished as Bool = false
    excludedParticipant as String = creation.participant.name
    if indexStored = null or indexStored.empty then
        lastIndex = -1
        // we will start from zero
    else
        lastIndex = Int(indexStored)
    end
    while not finished do
        lastIndex = lastIndex + 1
        if lastIndex >= length(parts) then
            lastIndex = 0
        end
        if parts[lastIndex].name != excludedParticipant then
            finished = true
            participant.next = parts[lastIndex]
            logMessage "This instance is assigned to " + participant.name +
                ", lastIndex = " + lastIndex + ", indexStored = " + indexStored
        end
    end
    storePropertyFor Fuego.Server
        using application = "RoundRobin",
              name = "LastParticipantIndex",
              value = String(lastIndex)Hope this helps,
    Dan

  • Assigning an instance to someone else

    Hi All
    Assume there are two roles "Employee" and "Manager" and four participants say E1, E2, E3 and M1
    E1,E2,E3 have Employee role
    M1 has Manager role
    Suppose there are two instances I1 and I2 assigned to E1.
    Now E1 goes on leave or leaves the company. M1 decides to take those instances from E1's queue and assign them to E2 or E3.
    How can we achieve this?
    Thanks
    Satinder

    Hi Satinder,
    You're right. My answer was underwhelming (using the Process Administration tool).
    Here's an approach to reassigning a batch of instances from one participant. You'll often run into problems reassigning instances because either the Interactive activity where the instance is located does not have its "Assignable" property checked or the supervisor does not have the role assigned. This logic overcomes both of these shortcomings.
    1) place this logic inside a Global Interactive activity in a role. This role should only be assigned to people who you want to be able to reassign instances from one participant to another.
    2) Add a new participant "AUTOCLIENT" and assign it to the new role
    3) Add a new Grab activity called "GrabAutomatic" (see the logic below) and define its property as "From all / To all". If you have a method for the Grab, you won't need the "on ie as Exception" catch block.
    4) the "input" statement is just so you can see an example working from this logic. Replace this with your own UI.
    Although this reassigns ALL of the instances assigned to a specific participant, you could use the search filter to return a list of instances and then let the supervisor pick which ones should be reassigned.
    fromPart as String
    toPart as String
    bp as BusinessProcess
    input "Name of the person to reassign from: " : fromPart,
          "Name of the person to reassign to: " : toPart
        using title = "title",
              buttons = ["Ok", "Cancel"]
        returning selectedButton = selection
    do     
        instF as InstanceFilter = InstanceFilter()
        instances as Fuego.Papi.Instance[]
        instanceDescription as String
        connectTo bp
            using url = Fuego.Server.directoryURL,
                  user = "AUTOCLIENT",
                  password = "P",
                  process = "/" + processName
        logMessage "next is prc id"
        create(instF, processService : bp.processService)
         instF.searchScope = SearchScope(participantScope : ParticipantScope.ALL,
              statusScope : StatusScope.ONLY_INPROCESS)
        addAttributeTo(instF, variable : VarDefinition.PARTICIPANT_ID, comparator : IS, value : fromPart)
        instances = getInstancesByFilter(bp, filter : instF)
        logMessage "instances" using severity = DEBUG
        for each inst in instances do
           logMessage "Found it: " + inst.id
           do
           logMessage "Select: " + inst.selected
           if inst.selected then
              logMessage "instance selected"
                  unSelect inst
           end
           logMessage "instance selected"
           reasign(inst, participant : toPart)
           logMessage "assigned it to " + toPart
           // Throws exception if activity was not assignable
           on e as Exception
              logMessage "Exception: ->" + e.message
              description as String = String(getVar(inst, var : "PREDEFINE_DESCRIPTION"))
              logMessage "Trying grab for " + description
              // determine where activity was before it was grabbed
              backToActivity as String
              backToActivity = inst.activityId
              do
                    grab inst
                         using grabActivity = "GrabAutomatic"
                    logMessage "Grabbed Instance Status: " + inst.grabbed
                        using severity = DEBUG
                     do
                        runTask inst using activity = "GrabAutomatic"
                     on ie as Exception
                        // exception that occurs if there is no logic inside Grab
                     end
                     logMessage "Ran Grab " + inst.grabbed
                        using severity = DEBUG
                       route inst
                          using activity = backToActivity
                     logMessage "Routed back"
                         using severity = DEBUG
                      reasign(inst, participant : toPart)
                      logMessage "reassigned it to " + toPart
               on e1 as Exception
                  logMessage "Exception w/i exception: " + e.message
                  errors as String
                  errors = errors + "Instance: " + description + " could not be reassigned\n\n"
                  logMessage "Errors: " + errors    
               end
           end
        end
    on exit
        disconnectFrom bp
    endHope this helps,
    Dan

  • Assign Role to participant in a group

    have a group sales department
    that has roles sales
    sales has 3 participant
    How can I assign intances to all 3 people using group.
    Please advice

    Hi,
    I uploaded a project that has three processes in it that might help you http://www.4shared.com/file/116789115/542a1afd/AssignWorkToSales.html
    All three use the Group "Sales Department" and the role "Sales" (the role is in the Group).
    1) The process in the project named "Sales Process One" shows the default behavior. When an instance is created in this process it flows to the Interactive activity "1. All Sales People See This" in the Sales role. The instance is not assigned to any of the sales people and can be performed by any of them. The first one to perform the task completes it and the work item instance disappears from all of the sales people's queues.
    To run this,
    a) log into the Workspace as "mike" (the manager)
    b) click the Global Creation activity called "1. Create Order Seen by all Sales People"
    c) log into the Workspace as any of the sales people ("sally", "sam" or "samantha")
    d) note that in the Particpant column, the work item instance is Unassigned. This means that any participant in the Sales Department Group (or Sales role) can click the "Send" link beside the instance. Once this occurs, the instance disappears from the inboxes of all the people assigned to the Sales Department Group
    2) The process in the project named "Sales Process Two" shows a technique to assign the work to each individual participant. When an instance is created in this process it flows to the Multiple activity named "Assign to Specific Sales People". Double click this activity to see how to assign copies of the instance to every participant in Sales Department Group. In this case there are 3 sales people so 3 copies are created and travel to the Interactive activity "2. Only Assigned Sales Person Sees This" in the Sales role.
    To run this,
    a) log into the Workspace as "mike" (the manager)
    b) click the Global Creation activity called "2. Create Order Seen by all Sales People"
    c) log into the Workspace as any of the sales people ("sally")
    d) note that in the Particpant column, the work item instance is assigned to "Sally". This means that only Sally can click the "Send" link beside the instance. Once this occurs, although the instance disappears from her inbox, the inboxes of the other people in the Sales Department Group still have work item instances assigned specifically to each of them in their inboxes.
    e) for this work item instance to successfully reach the End activity of the process, each of the Sales Department participants will need to complete this work item as well.
    3) The process in the project named "Sales Process Three" shows a technique to evenly distribute work item instances to a specific participant in a round robin fashion. When an instance is created in this process it flows to an automatic activity that gets the next participant to assign the work item instance to using the method in the Catalog Ulitliy.RoundRobin.getNextParticipant(). Open this method to see how to assign the instance to a specific participant in Sales Department Group using round robin distribution. In this case there are 3 sales people so the first instance goes to "Sam". When another instance is created the second instance goes to "Samantha". When the third instance is created it is assigned to "Sally". When the 4th instance is created to loop starts over again with "Sam"
    To run this,
    a) log into the Workspace as "mike" (the manager)
    b) click the Global Creation activity called "3. Create Order Assigned to Sales People (Round Robin)". Click this two more times
    c) log into the Workspace as any of the sales people ("sally")
    d) note that in the Particpant column, the work item instance in the activity "3. Work Assigned to Sales Person (Round Robin)" is assigned to "Sally". This means that only Sally can click the "Send" link beside the instance.
    e) Once Sally completes the instance, it goes to the End activity.
    Hope this helps,
    Dan

Maybe you are looking for