Loading...

Creating a Business Logic Workflow

You can create a business logic workflow to intercept a request sent to the server or a response sent from the server. Inside the business logic workflow, you identity the request or response to intercept, the action to perform, and how to proceed. The output of the business logic workflow 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 how the administrator responds determines how to proceed. 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 the workflow to the XML message, you must have the root element from the XML message. For example, the root element in the XML message 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 feature to generate an XML file.

Procedure

  1. From the CommCell Browser, go to Workflows.
  2. Right-click Workflows and click All Tasks > New > Business Logic Workflow.
  3. From the New Workflow window, go to the Workflow Properties pane.
  4. On the General tab, enter the following information:
    • In the Value column for the Message Name property, type the top-level element for the XML message you want to connect to the workflow.

      For example, to connect the workflow to the XML message used to create a user, type App_CreateUserRequest.

    • In the Value column for the Execute When property, select one of the following:
      • Request - Runs the workflow when the XML message is sent to the server.
      • Response - Runs the workflow when the XML message is returned by the server.
  5. From the New Workflow window, design your workflow.

    For information on workflow activities, see Workflow Activities.

  6. Add a WorkflowEnd activity to your workflow and configure the Workflow Outputs tab:
    • returnCode - Informs the server how to proceed after the workflow runs. Valid values are:
      • 1, allow the XML message to proceed.
      • 2, allow a modified XML message to proceed. The modified XML message is the value in outputXML.
      • 3, do not allow the XML message to proceed.
    • returnString - If the value for returnCode is 3, displays the user-defined string. For example, displays an error message explaining why the XML message cannot proceed.
    • outputXML - If the value for returnCode is 2, passes an alternative XML message back to the server to run.
  7. Save and deploy your workflow.

    For information on deploying your workflow, see Deploying a Workflow.

Examples

  • DeleteClientAuthorization Workflow

    The DeleteClientAuthorization business logic workflow is triggered when a delete client request is submitted to the server (App_DeleteClientRequest). The workflow stops the delete client request and sends an authorization request email to users who are members of the master user group. If a member of the master user group approves the delete client request, the request is allowed to proceed and the client is deleted. If a member of the master user group denies the delete client request, the request does not proceed and the client is not deleted.

    To review the properties and activities of the DeleteClientAuthorization workflow, import the workflow into your CommCell Console. After you import the workflow, you can clone it and then update the clone to test other business use cases you may have.

  • Client Registration Workflows

    You can create a workflow to manage and monitor clients that want to join your CommCell environment. For more information, see Creating Workflows for Managing and Monitoring Client Registrations.