You can create a business logic workflow to intercept a request sent to the server or a response sent from the server. A business logic workflow identifies the request or response to intercept, the action to perform, and how to proceed.
The business logic workflow output can be any of the following actions:
Allow the request or response to proceed
Allow an alternative request or response to proceed
Do not allow the request or response to proceed
For example, you can require an administrator to approve or deny the deletion of a storage policy. In this example, the App_DeleteStoragePolicyReq request stops, the administrator receives an email, and the response from the administrator determines whether the request proceeds. If the administrator approves the action, the App_DeleteStoragePolicyReq request proceeds. If the administrator denies the action, the App_DeleteStoragePolicyReq request does not proceed.
Before You Begin
To connect a workflow to an XML message, you must have the root element from the XML message.
For example, the root element in the XML message that is used to delete a storage policy is App_DeleteStoragePolicyReq.
To find the root element you need, review the XML templates in the Command Line Interface documentation or use the Save As Script function to generate an XML file.
From the navigation pane, go to Developer tools.
The Developer tools page appears.
Click the Workflows tile.
The Workflows page appears.
In the upper-right corner of the page, from the All tasks list , select New Business Logic Workflow.
The workflow editor opens in a new browser tab.
Click the workflow design area to open the workflow properties.
On the General tab, enter the following information:
In the Message name box, enter the top-level element for the XML message that you want to connect to the workflow.
For example, for the XML message that creates a user, enter App_CreateUserRequest.
From the Execute When list, specify when to run the workflow:
Request: Run the workflow when the XML message is sent to the server.
Response: Run the workflow when the XML message is returned by the server, select this option.
Design the workflow:
From the Activities pane, go to Control Flow, and then drag the WorkflowEnd activity into the workflow design area.
Select the WorkflowEnd activity.
On the Workflow outputs tab, enter the following:
In the returnCode box, enter the value to specify how the server proceeds:
Allow the XML message to proceed.
Allow a modified XML message to proceed. The modified XML message is the value in outputXML.
Do not allow the XML message to proceed. When the XML message is blocked, you can add an informational message for the user in outputXML.
In the returnString box, enter a message for returnCode 3. If the value for returnCode is 3, you can display the user-defined string. For example, display an error message that explains why the XML message cannot proceed.
In the outputXML box, enter a message for returnCode 2 to pass an alternative XML message back to the server to run. If the value for returnCode is 3, display an informational message to the user.
Save and deploy the workflow.