I need assistance on how to implement a complex workflow. I can see I need to use BPT to have a human approve a document then have it move to the next person. However I need to make a dynamic workflow will go though a list of people to approve in each stage. I can not figure out how to do this
Below is my goals
Hello Ryan,
You do not necessarily need to specify a user to perform the approval in your flow.
You will define that it is a human activity in that bpt task and parameterize that it will be completed according to the executed method and its respective attributes, as in the example above.
With this, when someone who has the permission to perform that action does it, your flow will continue.
I hope I have helped you.
I may be misunderstanding, but during each approval step I need everyone in the group to approve, not just anyone with permission.
Hi @Ryan Herndon,
You can use the ProcessFlowDB model for your dynamic workflow needs. Let me explain it.
First, set up roles and assign roles to users. You can also create a user management page where admins can define roles and services—like document validation in your case. In the "FlowDefinition" section, decide which service the workflow applies to. Then, in "FlowStages," specify the number of approvers for that service’s workflow. For example, the first approver (level 1) could be a manager to review and approve the document. If you need another approval, add a level 2 with a specific role.
When a request is made, automatically start the workflow. Based on the service ID, fetch the "FlowDefinition" details and create a "RequestFlow" and its "RequestFlowStages." After an approval, check the current step in "FlowStages." If there’s a next step, assign the request to that level’s approver. If no further steps exist, end the workflow with approval.
For a "send back" action, mark the status in "RequestFlowStages" as "sent back." When the user resubmits, trigger a new automatic activity by adding another "RequestFlowStages" entry—but don’t create a new "RequestFlow" record, as each request should have only one "RequestFlow" for mapping. Then, in the automatic activity, check if the roles in "FlowStages" allow bypassing the "send back" request. If yes, assign it to the approver who needs to review it next.
I hope this helps with your use case!
I have written DB model JSON below for your refernce. So, it will be easier for you to create similar entities -
{
"Role": {
"ID": "LONG INTEGER",
"Name": "TEXT",
"DisplayName": "TEXT",
"UserType": "TEXT",
"IsActive": "BOOLEAN",
"CreatedBy": "USER IDENTIFIER",
"CreatedOn": "DATE TIME",
"ModifiedBy": "USER IDENTIFIER",
"ModifiedOn": "DATE TIME"
},
"User": {
"ID": "INTEGER",
"Username": "TEXT",
"Password": "TEXT",
"Email": "EMAIL",
"MobilePhone": "PHONE NUMBER",
"ExternalID": "TEXT",
"CreationDate": "DATE TIME",
"LastLogin": "DATE TIME",
"IsActive": "BOOLEAN"
"UserRoleAssignment": {
"RoleID": "ROLE IDENTIFIER",
"UserID": "USER IDENTIFIER",
"FlowDefinition": {
"ServiceID": "TEXT",
"FlowStages": {
"FlowDefinitionID": "FLOW DEFINITION IDENTIFIER",
"Level": "INTEGER",
"CanBypass": "BOOLEAN",
"RequestFlow": {
"ApplicationID": "TEXT",
"RequestFlowStages": {
"RequestFlowID": "REQUEST FLOW IDENTIFIER",
"EntityID": "TEXT",
"Status": "FLOW STATUS IDENTIFIER",
"Action": "FLOW STATUS IDENTIFIER",
"Remarks": "TEXT",
"FlowStatus": {
"Code": "INTEGER",
}