Make a selected user active or inactive
workflowUserID – id of the user
markActive – make the user active or inactive
True – step executed successfully
False – step failed to execute
Let’s build and execute the MakeUserActiveInactiveDef example.
- Create a new definition called “makeUserActiveInactiveDef”
- Select the definition and click the “design” button
- Drag a “getWorkflowUserID” step to the canvas
- Drag a “makeUserActiveInactive” step to the canvas
- Connect the dots between the start, getWorkflowUserID and makeUserActiveInactive step as show in the above graphic
- Define the variable/global to hold the user-id
- Click on the “getWorkflowUserID” step to configure its “Settings” properties. Provide a name for the step. Provide the user name to fetch. Provide the variable/global to hold the user ID after execution.
- Click on the “makeUserActiveInactive” step to configure its “Settings” properties. Provide a name for the step. Provide the variable/global which holds the user ID from the previous steps.
- Alternate, you may provide the workflow User ID value from the User Management page by copy-paste.
- The “Logging” setting configuration is necessary for documentation and also measure the workflow progress and the percent complete. This is acheived by configuring the step state and percent fields individually as shown in the images below. Configure the “Logging” using the following properties.
- Save the process definition, create a new process instance and execute.
- Check the step properties by rendering the process instance. The step configures the user active/inactive as per the configuration.