Groups Task (group) Activiti The role of a workflow

Source: Internet
Author: User
Groups Task (group) Activiti the role of a workflow
1.
/** in the middle of the deployment process definition and initiation process instance, set up the group task of the person, to the Activiti table storage Group and user information * *
identityservice Identityservice = Processengine.getidentityservice ()///Authentication: Save group and user information
Identityservice.savegroup (New groupentity ("department manager")/set up group
Identityservice.savegroup (New Groupentity ("General manager"))//Set up Group
Identityservice.saveuser (New Userentity ("Xiao Zhang") //Create User
Identityservice.saveuser (new Userentity ("Xiao Li"));//create User
Identityservice.saveuser (new Userentity (" Xiao Wang ")); Establish user
identityservice.createmembership ("Xiao Zhang", "department manager")//Establish group and user relationship
identityservice.createmembership ("Xiao Li", "Department manager")//Establish group and user relationship
identityservice.createmembership ("Xiao Wang", "General manager"); Establish group and user relationships
2.
Table Structure Introduction
act_id_group: Role Group table
act_id_user: User table:
act_id_membership: User Role table
    Specify group task handling person
String userId = " Xiao Zhang "//small Zhang, Xiao Li can query the results, Xiao Wang can not, because he is not a department manager role
list<task> List = Processengine.gettaskservice ()//
                . Createtaskquery ()//
                . Taskcandidateuser (userId)//Specify Group Task query
                . List ();


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.