Twelve permission controls for transferring a single form to multiple nodes in a process developed by the Web workflow management system

Source: Internet
Author: User

I have previously written an article on permission Control for form and process;ArticleThere is no specific implementation. Practice has proved that the flow of a single form among multiple process nodes is a problem that must be handled by workflows and electronic forms.

 

A single-phase combination of the workflow system and e-table allows different permissions of the same form on each node of the process.

 

For example, a form contains, some information is entered, and some information is reviewed;

 

When the form is inputPartial review informationBlock all;

When the superior reviews,Enter part of the informationYesRead-Only, Which can only be filled in for review;

After the review is completed,All informationChangeRead-OnlyAnd cannot be modified.

 

If all these nodes call the same electronic form, you need to set the controls in the form to read-only, disabled, and hidden Based on the personnel role failure; by setting these properties of the control, the inaccessible permissions of each personnel role can be obtained;

 

However, this layer of control is not enough,You also need to set the control permissions on each node of the process.By setting the access permissions of the control on each action node of the specified processRead-only, disabled, and hidden.

 

Readonly
Disable the corresponding Disabled = "true ";
Hide the corresponding display = "NONE"

Implementation process:
1. When creating an electronic form, set control permissions on each control property page: Set users, roles, groups, and process nodes;
For example:


 

2. the configured control permission attribute (with Control ID) generates an XML format string and stores it in an electronic form.

The XML format is as follows:

<Record ID = 'text3' controltype = 'text'>
<User value = 'usr _ 0000001 '>
<Name> Li Ming </Name>
<Readonly> true </readonly>
<Disabled> false </disabled>
<Display> false </display>
</User>
<Role value = 'rol _ 0000001 '>
<Name> General Staff </Name>
<Readonly> true </readonly>
<Disabled> false </disabled>
<Display> false </display>
</Role>
</Record>

 

The record root node can contain four types of bytes., <User> <role> <group> <flow>

The structure of the User Role group node is the same. There are several more flow nodes.Wf_name, wf_version, action_idNode attributes

Flow node format: <Flow wf_name = 'xx' wf_version = 'X' action_id = 'xxx'> <Name> actionname </Name> <readonly> true </readonly> <disabled> false </ disabled> <display> false </display> </flow>

 

3. When an electronic form is opened, a background event is executed before the form is opened, and the XML string of permissions in the form is loaded to analyze the XML string, generate the attribute string of the HTML control according to the HTML control node, return to the page, act on the HTML control node, to achieve the HTML control node, read-only, disabled, or hidden attributes.

(Background JavaCodeLocated:Cn.com. fcsoft. Report. Ext. eformrole. Java

Public String rolecheck (httpservletrequest req) throws userexception;

)

Analyze the XML string to generate the attribute process of the html control node:
 
1 ). analyze the configured user permissions, analyze roles, and then analyze groups. If your application system has extended functions, such as adding posts and other attributes, you need to add the post analysis code here;
2 ). analyze the permissions of the person to be represented by the current user. A user may act as a proxy for multiple people to execute the business, so the permissions of the agents are analyzed cyclically here. It is also based on the user, role, group analysis. Note: If a property string of the HTML control returned by an agent who does not have the permission to analyze the result, the agent has all the permissions of the control, clear all the HTML control permission attribute strings and jump out of the loop.
 
3) Finally, analyze the node permissions of the Process, obtain the English name, version number, and Action ID of the process, and analyze whether the process node has operation permissions and returns the control's HTML attribute permission string.
 
4). Return the analyzed HTML attribute permissions to the electronic form, and load the HTML control attributes to achieve read-only, disable, hide, and other functions of the control.

 

 

When integrating with the application system, if the permission settings cannot meet the user's needs, more features can be expanded when more personalized customization is required:

Click the permission setting button in the electronic form. The called code is located in the ebsys/fceformext/JS/userfunc. js file.

 

/**
* Open the form Element permission settings window, added by liuxr
* This function is called in the Click Event of the permission setting button in the Properties window.
**/
Function eformactionbuttonclick ()
{

......
}

 

When a form is opened:Ebsys/fceformext/JS/userfunc. JS FileOf

/**
* When the page is running, check the permissions of the form Element Added by liuxr
* This function can be called in a form opening event or as needed.
**/
Function eformcheckroleinfo ()
{

......

}
In this function, Ajax is used to submit to the background to trigger the form opening event in the background:

Cn.com. fcsoft. Report. Ext. eformrole. Java

Public String rolecheck (httpservletrequest req) throws userexception;

 

Return the permission attribute string of the generated HTML control to the page and act on the control of the page.

 

 

 

 

Related links;

Workflow concept in Web Workflow Management System Development

Web workflow management system development 2 workflow engine

Web workflow management system development 3 visualization process designer

Custom forms for Web Workflow Management System Development

Development of Web workflow management system 5 open source osworkflow-user system transformation

Six-form permission and process permission Control for Web Workflow Management System Development

8. Open-source osworkflow Task Management in Web Workflow Management System Development

 

Ten database connections and transaction settings for Web Workflow Management System Development

Interaction between process data and business data during Web Workflow Management System Development

Twelve permission controls for transferring a single form to multiple nodes in a process developed by the Web workflow management system

13 process integration with electronic forms in Web Workflow Management System Development

14 Implementation of the Process designer attribute page in Web Workflow Management System Development

 

 

 

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.