Assign the role, the Group initiated human when task

Hi all
Currently, what connection of the user to the BPM and create the new instance of the task, I can get the roles and this user by programming groups. I want to assign roles to user for this task instance dynamically when the user click on the "SUBMIT" button (because I want to limit the users belong role are able to perform this task, each user belongs to a role and group can do).

Help someone?

Thank you.

Hi Ming
1. If you want to catch all the Actions a task as Save, Submit, approve, reject etc., you can create your own class as MyAppTaskValidationCallback that implements oracle.bpel.services.workflow.task.ITaskValidationCallback and in it, overwrite a method named validateTaskOperation (bunch of parameters). To do this, see API.

In this method, you can get the action performed on the task. You can also get the full charge of the task, including your custom load and the stuff of task standard payload as history, attachments, comments etc. You can write simple XML parser utility methods to get and set attributes in the payload xsd schema. So in your case, in this method, get roles, groups of the logged in user. Verification of the action. If it is not authorized to perform this operation, remove the error of this method. Otherwise, continue your logic. Create first class java as above, add this code snippet and explore data.

Now, just curious. If your condition is really for control actions based on role/user groups, have you tried to use the output of the features and to avoid this custom logic. Say for the BPM Applications, we have the corridors / roles. Only users belonging to that role, can work on this task. Try to use tricks box as much as possible, unless you really need custom logic of assignment.

Thank you
Ravi Jegga

The code snippet to get an idea just to give. But refer to the API online for more information.

public void validateTaskOperation(ITaskValidationCallback.TaskAction taskAction, IWorkflowContext iWorkflowContext, Task task, Map parameters, Locale locale, List errors) {
try {
  Element taskPayload = task.getPayloadAsElement();
  String taskTitle;
  String taskOutcome;
  SystemAttributesType taskSystemAttributes = task.getSystemAttributes();          

  taskTitle = task.getTitle();

  System.out.println("MyAppTaskValidationCallback::validateTaskOperation() Begin For TaskTitle: " + taskTitle + " -> TaskAction: " + taskAction + " -> Parameters:\n" + parameters);

  if(taskAction == TaskAction.ACQUIRE) {
      System.out.println("Inside ACQUIRE");
      //parameters.put("AcquiredBy", iWorkflowContext.getUser());
  } else if(taskAction == TaskAction.OUTCOME_UPDATE) {
    System.out.println("Inside OUTCOME_UPDATE");
  }
} catch (Exception anException) {
  anException.printStackTrace();
}
}

Tags: Fusion Middleware

Similar Questions

  • Bug in the transition from the groups of tabs when the mouse is over a tab

    I use two groups of tabs, each around 3-10 tabs open. I press Ctrl +' to switch between groups of two tabs. Everything works fine except when I have the chance to have the mouse cursor positioned on a tab when I press Ctrl +'. In this case, Firefox seems to get confused and I get an unpredictable mixture of the two groups of tabs tabs. I have to then move mouse tab and then press Ctrl +' twice to the tab group good I tried to move on. It's boring.

    I think it started in FF29, but I'm not sure.

    First of all, I would like to confirm that it is a bug. Secondly, I would like to see it attaches. I tried to find info on this several times without success. Anyone know anything about this?

    Thank you.

    OK nevermind, I did some more research and found a bug in Bugzilla for it. The bug has been fixed and I've confirmed with a night generation. Looking forward from the set in a regular release.

  • Message: Need IPv6 to join the Group of home when he tried to join the group home

    Original title: IPv6

    When I try to join a homegroup on this computer, I get a message that says I need IPv6. I clicked on the adapter and went to proberties and I have IPv6 installed and it has a check mark in the box. So, it should work. When I clik on the link and go to properties and don't look at the IPv6 connection it say no internet. What this means and how to get it to connect. Man this is proving to be a mess.

    Hi billgoodwin,

    Try the steps mentioned by "Novak Wu MSFT, Moderator Monday, November 2, 2009 01:06" and check the result. See IPv6 must join home group

    For reference, see why I can't join a homegroup?

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Assign the role of participant to a group

    have a Group Sales Department
    who does sales roles
    sale participant 3

    How can I assign the entities at all 3 people using Group.

    Please advice

    Hello

    I downloaded a project with three processes which may help you http://www.4shared.com/file/116789115/542a1afd/AssignWorkToSales.html

    All three use the "commercial Service" group and the role of 'Sales' (the role is in the Group).

    (1) the process of 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 sales people and can be done by one of them. One for the task to complete it and the work item instance disappears from all queues popular sale.

    To do this, run
    (a) connect to the workspace as "mike" (the Manager)
    (b) click on the activity of world creation called "1. Create an order seen by all sales people.
    (c) connect to the workspace as all the people of sale ('sally', 'sam' or 'samantha')
    (d) Note that, in the participant column, the work item instance is not affected. This means that any participant in the Group of Department sales (or Sales role) can click on the link 'Send' next to the instance. Once this happens, the body disappears from the Inbox of all persons assigned to the Group of Department sales

    (2) the process of the project named "Sales process Two" shows a technique to assign work to each participant individual. When an instance is created in this process, it flows to the Multiple activity named "assign to specific sales people. Double-click on this activity to see how to assign copies of the Forum to all participants to the Group Sales Department. In this case there are 3 sales people so 3 copies are created and travel activity Interactive "2. Only assigned Sales Person sees this"in the sales role.

    To do this, run
    (a) connect to the workspace as "mike" (the Manager)
    (b) click on the activity of world creation called "2. Create an order seen by all sales people.
    (c) connect to the workspace as the people selling ("sally")
    (d) Note that, in the participant column, the work item instance is attributed to "Sally". This means that only Sally can click the link 'Send' next to the instance. Once this happens, even if the instance is removed from his Inbox, the inboxes of the other people in the Group of the Department sales still have instances of work item assigned specifically to each of them in their Inbox.
    (e) for this instance of work stations to reach successfully the activity at the end of the process, each participant Sales Department must complete this work item as well.

    (3) the process of the project named "sales process three" demonstrates a technique to distribute instances of work item to a player of alternating. When an instance is created in this process, it flows towards an automatic activity that gets the next participant to assign the work item instance using the method in the catalog Ulitliy.RoundRobin.getNextParticipant (). Open this method to see how to assign the instance to a participant group of Department of sales with round robin distribution-specific. In this case, there are 3 sales people if the trial goes to 'Sam '. When another instance is created the second instance goes to "Samantha". In the third instance is created, it is assigned to "Sally". When the 4th instance is created to loop starts over with 'Sam '.

    To do this, run
    (a) connect to the workspace as "mike" (the Manager)
    (b) click on the activity of Global creation called "3. Create order assigned to sellers (Round Robin)". Click this button twice
    (c) connect to the workspace as the people selling ("sally")
    (d) Note that, in the participant column, the item instance to work in activity "3. Assigned to Sales Person (Round Robin) of work"is attributed to"Sally ". This means that only Sally can click the link 'Send' next to the instance.
    (e) Sally from the instance, it goes to the end activity.

    Hope this helps,
    Dan

  • Assignment of roles to the user when creating the user

    Hi all

    I gave a roll deposited (< dsp:input bean = "ProfileFormHandler.value.roles.role" maxsize = "30" size = "30" type = "text" / > on the registration page.) After registration, each field in db except role (table dps_role).
    Pls let me know what I am doing wrong.

    Thank you

    You should not assign roles to the user as 'ProfileFormHandler.value.roles.role' of 's profile. You can link formhandler property to which you can pass the name or id of the role that you want to assign role assignment must always route through safety ATG API in order to properly update the mappings of Homeland Security. Because of these dependencies, you should not try the role of simply call profile.setPropertyValue ('roles',...) The code cannot fail this way, but if you assign the role in this way then it may not work as expected when checking for role based privileges. Here's one possible way to do it:

    1. in your file properties formhandler declare a dependency on the directory of the default user, which by default points to the profile database:

    userDirectory = / atg/userprofiling/ProfileUserDirectory

    So, in the form Manager, you declare corresponding setUserDirectory() and getUserDirectory().

    2 then in the formhandler, get the DirectoryPrincipal objects associated with the user profile and the role you want to assign and then assign the role to the user:

    import atg.userdirectory.UserDirectory;
    import atg.userdirectory.DirectoryPrincipal;
    import atg.userdirectory.User;
    import atg.userdirectory.Role;
    import atg.userdirectory.DirectoryModificationException;
    
    import java.util.Collection;
    import java.util.Iterator;
    
    ..
    ..
    
    private boolean assignRoleToUser(String roleName, String userId) {
    
      UserDirectory userDirectory = getUserDirectory();
      DirectoryPrincipal userPrincipal = userDirectory.findUserByPrimaryKey(userId);
      DirectoryPrincipal rolePrincipal = userDirectory.getRoleByPath(roleName);
    
      User user = (User)userPrincipal;
    
      Collection collection = userDirectory.getRoles();
    
      boolean status = false;
    
      Iterator iter = collection.iterator();
      while(iter.hasNext())
      {
        Object obj = iter.next();
        if(obj instanceof Role) {
          Role role = (Role)obj;
          if(roleName.equals( role.getName() ) && user!=null) {
            try {
              status = user.assignRole(role);    //will return true if the role was added otherwise false
            }
            catch (DirectoryModificationException e) {
           //handle exception
            }
            break;
          }
        }
      }
      return status;
    }
    

    In the code above 'roleName' parameter is the name of the role to be assigned to the profile with the id as "userId". If you want to do the role assignment when creating the user, then you can do the things above in postCreateUser() so that you can get the Principal associated with the profile. For more information about the interfaces and classes used here, you can refer to the documentation of the API of the ATG.

    http://docs.Oracle.com/CD/E26180_01/platform.94/APIDoc/ATG/userDirectory/package-summary.html

  • Assign the radius server to specific groups of VPN 3000

    Last week, I assigned a test Cisco ACS server to be used for authentication and device of accounting for a specific group on a Cisco VPN concentrator 3060. When I looked at ACS, it appears that not only the Group was to go there but others through this way and using the default values on the Cisco Secure ACS. Is it possible that I can make sure only the traffic assigned to this specific group of VPN using the ACS server defined?

    Thank you

    Hello

    Not sure about your implementation. But you must configure the group for this specific ad group map can only authentication.

    In the external group map db, map

    Group ACS VPN---> with<---- ad="" vpn="">

    Any other combination should point to any access group.

    Kind regards

    ~ JG

    Note the useful messages

  • Assigning the role of system administrator

    I am able to create tenants using the SSO account (Administrator @vsphere.local). Is there a way to create the other users or LDAP/AD groups for the System Administrator role account

    Unfortunately, that won't work. I went through a lot of tests on this and in the current versions, there is no way to assign the system administrator role to another user.

    Grant

  • Service Division of Hyperion - assign the existing group to the new group

    Hi all

    In my planning application, I tried to create the new group "G3" through the sharing service and assigned existing groups ("G1", "G2") to the new group "G3". So that all existing group access will be transferred to the new group.

    But when I logged with the user of the G3, I found has insufficient access forms data giving the message.
    "You try to open the data form, but can not because all the required dimensions are not present." Possible causes may be that you do have at least one member of a required dimension, or the selection of members resulted in no Member present. Contact your administrator. "

    I can able to connect and see the dataform with user group G1 and G2.

    What that should I need to change in the settings to avoid this problem?

    Thanks in advance

    When you add a G1, G2 to G3 provisioning of g1 and g2 doesn't apply to the g3. Instead, it's the other way around. G1 and G2 will have some G3 has commissioned.

  • Assign the copy of the instance to the various participants in the role of different

    I got some info about the forum given by Dan to use split and join

    Have a question Dan if you can clarify please


    Responsible for M1 assigns tasks analyst a1

    then I call split so that the Manager M1 and A1 analyst sees same task which is nothing else than my jsp page in struts.

    How do we know that both Manager and analyst are done with task so that they reach the join return?

    Hello

    Once a the Split activity in your example, the Manager and the analyst reached work item instance each would have a copy of the work item in their Inbox because the Split has a transition to activity in the role of Manager and another passage to an activity in the role of the analyst.

    Once the analyst has completed its work, the copy of the work item flows to join activity and executes the logic in the join. Similarly, when the Manager has completed its work, their copy of the work item flows to join activity and implements its logic. Given that the engine keeps track of when all the copies reached the join activity, once the second copy ends the execution of logic in the join, the original work item instance let the join activity and continues downstream in the process.

    All this is done automatically by the engine when running.

    Dan

  • How can I change the group that is assigned to a contact?

    I synchronize contacts on my 2 iPhones, 2 iPads, MacBook Pro and iMac. I would like to change some of my current designations of the group for some of my contacts. How can I change the group that is assigned to a contact?

    Mark,

    First of all, make sure that you deal with iCloud contacts.

    With the help of your MacBook Pro or iMac Contacts open and remove unwanted contacts outside the group. You will be asked "do you want to remove the card for 'XXX' or delete Group 'YYY'.» Choose "remove group.»

    Then go to "All Contacts" and drag the name of the new group.

    If you want to see what the contact belongs to groups, click on the contact and press 'option '. All groups with this name will be highlighted.

  • Watch does not recognize the weight class as exercise-how can you add the duration of activity manually because none of the presets eg elliptical etc. is appropriate. Also does not count calories for example 35 when the rest of the group is around 500

    Look does not recognize the weight class as exercise-how can you add the duration of activity manually because none of the presets etc for example elliptical is appropriate and therefore do not count toward the daily goal. Also does not count calories for example 35 when the average of the others in the group is around 500.

    Hello

    When you use the application of the training session, choose the type of activity that best fits your business. For anything else - like weight - select the other category.

    During the follow-up of one year to the next helps:

    • Activity app will credit the ring of progress of exercise with one minute for every minute of the workout.
    • Active calories will be based on the data recorded by the heart rate sensor or a brisk walk, whichever is greater.

    Note, however, that the heart rate sensor is likely to give better results for the workouts that involve rhythmic (for example running) rather than the irregular movements.

    More information:

    Use of the workout on your Apple Watch - Apple Support

  • The attached VI works when I run it initially to create the XML file, but by pressing once the XML file is created, it is not up-to-date. What I am doing wrong?

    The attached VI works when I run it initially to create the XML file, but when I change the data and run once the XML file is created, it is not updated with new data. What I am doing wrong?

    Thank you.

    It sounds like the logic that has been written in VI

    Internal decision of true / false:

    (file exists: false) write in the file XML, unflatten for display

    (file exists: true) read the XML file, unflatten for display

    At no time when the file exists (true case) is the XML file updated...

  • I reinstalled windows vista, and when I did I must have erased the initial password when you turn on the computer. I was wondering how can I configure the windows logon password?

    I reinstalled windows vista, and when I did I must have erased the initial password when you turn on the computer. I was wondering how can I configure the windows logon password?

    http://pcsupport.about.com/od/windowsvista/HT/nvistapassword.htm

    Info on the link above will help you.

    http://au.Dummies.com/how-to/content/set-up-passwords-in-Windows-Vista.html

    More info on including a password reset disc info.

    See you soon. Mick Murphy - Microsoft partner

  • WebVPN/RADIUS - assign to the Group - Concentrator3005

    Client configuration of a Cisco Concentrator3005 using IPSEC on PC and who authenticate via radius w / ranking in a group is a breeze - more I'm not configure an individual user - and won't.

    But I'm banging my head trying to configure Webvpn to authenticate via radius and assign the user to a group.  The default user is always itself to the core group.  I want to find a way to create a user in a group.

    Everyone dealing with this before?

    THX.

    Robert

    Robert,

    First of all, you must make sure that the Radius Server is your first authentication method configured on the VPN3000, WEBVPN reads the list of servers for authentication from top to bottom and the first on the list is to be chosen, second to assign the user to a group, you must set up the value of the class on your radius server, this value must be equal to the webvpn group you must assign to the user.

  • When I replaced a hard drive, I wanted the same drive letter, but he wants me to take another. How can I assign the drive letter, I replaced?

    When I replaced a hard drive, I wanted the same drive letter, but he wants me to take another. How can I assign the drive letter, that I replaced. The letter is now used by another device?

    Open disk management, find the drive using the drive letter you want to use, change the drive letter of this to 'Z', find the new drive, change the drive letter that you want, and then change the drive letter of the drive you have labeled it 'Z' to a drive letter of your taste.

    Jim

Maybe you are looking for