This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Engaging a Workflow in an Operation
Workflows can be engaged in certain operations such as engaging the approval workflow for the operation of adding a user. This section demonstrates the steps used to do this.Â
- On the Main tab in the Management Console, click Add under Workflows Engagements in the Manage section.
- Fill in the details using the descriptions below as a guide. Use the screen capture below as a guide to enter sample values.Â
Association name: A name to identify the association
Operation category: The category of the operation to be selected to the workflow engagement
Operation name: The operation to be selected
Workflow: The workflow you need to engage for the event. You can use an existing workflow definition or create a workflow definition.
The Application condition:
There are three options which we can use to filter requests which need to be managed by the selected workflow.
Apply to all Requests
If this option is selected, the selected workflow will be triggered for all the requests of the selected operation.
Apply If
If this option is selected, the selected workflow only get triggered if the condition is satisfied. As an example, following configuration will select add user operations where username contains 'sys'. (This option supports simple conditions. If the condition is complex where multiple conditions are evaluated with connectors (and/or) use the Advance section.)
Advanced
If this option is selected, you can define an XPath expression to filter the requests that need to go through the selected workflow. As an example, following configuration will select add user operations where username contains 'sys'.boolean(//*[local-name()='parameter'][@name='Username']/*[local-name()='value']/*[local-name()='itemValue'][contains(text(),'sys')])
- Click Add to finish adding the engagement. You can view, disable or delete the association by navigating to WorkFlows Engagements > List under the Manage Section.
What's Next?
Now that all the configurations are done, when you add a user it won’t be displayed under the users section immediately and the user won’t be able to login. The user will be enabled once the user addition task is approved by a user who has the role of Manager. To try this out, see Managing Human Tasks.