Some states in the workflow are in a swimlane (lane), and these states can be processed if specific people who participate in workflows have the ability to involve this lane. How to represent an individual's ability to represent an individual? In the workflow system, you can use the organization model data to assign individuals from the organizational model data, such as through the Role role, position (or job), indicating that the individual has the ability. In the workflow definition, the specific individual is rarely defined in the process approval. Most systems will define a role (static and dynamic), position, as long as these conditions can be handled, it can be handled in these links (i.e., after entering the system, the system will handle all the work you can handle). JBPM2.0 uses Swimlane's abstract ability to assign the defined Swimlane to some approval sections. In actual operation, calculate the process participants according to Swimlane's proxy class, and pay attention to this participation. And the system user login ID is different, he can be a user login ID or a role or position. JBPM2.0 is considered at this design very much, only the process engine is provided, and no tissue model is not bound. Users can define their own processes based on their respective organizations. Such as
public class ChiefHandle implements AssignmentHandler {public ChiefHandle () {} public String selectActor (AssignmentContext parm1) {String actorid = parm1.getPreviousActorId (); // can be calculated for example by the participants in the process before step System.out.println actorid ( " --- previous actor id = " actorid); // UserID is the user login name when the process is started, and the login can find the relevant data from the organization model from the organization model //, for example, String firstactorId, such as higher leaders, etc. ( String) PARM1.GETVARIABLE ("UserID"); system.out.println ("--- root actor id =" firstactorid); if (actorid.equals ("US010101")) Return "POS0102"; // Return position Else Return "POS0103" or other else return "POS0103", etc.
So in the user login system, the work list is not only found according to the login ID, but also looks up according to the role or position of this user. I also encountered some problems in the actual project, mention everyone discussed, mainly in some dynamic role calculations, did not find a practical way. For example, how to define: Handle the role of the colleague of the individual of the previous status link, etc., I want to be able to pass the user's unit code, department or project group code (SELECTAACTAC)?