Skip to content
flowon.com

Case management · Part 7 of 7

Deploy

Export the Case Management project with the Logic Fabric CLI, give the test environment its own settings with data map files, import it, and outline a release pipeline.

Everything you built so far lives in your development environment. In this last part you move it to a test environment as one unit. You export the Case Management project and its managed solution with the Logic Fabric CLI. You extract the project’s data map files and fill in the values that must differ in test: a shorter SLA so testers see escalations quickly, the test escalation mailbox, and the IDs of the four teams in the test environment. Then you import everything with one command, check the result, and see how the same commands become a release pipeline.

  • Complete Part 6: Expose it, or at least parts 1 to 5.
  • The Logic Fabric CLI is installed on your machine. See Installation.
  • A test environment with the same Logic Fabric solutions installed as development.
  • The teams Service Triage, Tier 2 Support, Service Managers and Support Supervisors exist in test, with members.
  • Connection strings for both environments, stored in the variables DEV_CONNECTION and TEST_CONNECTION.
  1. Check the exact project name:

    Terminal window
    flowon-dynamics projects -c "$DEV_CONNECTION"
  2. Export the project package and its managed solution:

    Terminal window
    flowon-dynamics export \
    -c "$DEV_CONNECTION" \
    --project-name "Case Management" \
    --solution-managed \
    --output-directory ./artifacts
  3. Check the output. The folder holds Case_Management.flop (spaces in the project name become underscores) and the managed solution, named after the solution’s unique name, for example ContosoService_managed.zip.

The package contains the project’s logic blocks, flows, recipe, business process, API with its versions, configuration values and localized resources. See Export.

  1. Extract the data map files from the package. No connection is needed:

    Terminal window
    flowon-dynamics generate-mappings \
    --project-file-path ./artifacts/Case_Management.flop \
    --output-directory ./mappings/test
  2. Open ./mappings/test/configuration.datamap.xml. Each configuration value has a Source, the value in the package, and a Target, the value to use in test. Change only the Target values:

    Configuration Source Target in test
    SlaResponseDaysHigh 1 0
    SlaResponseDaysStandard 3 1
    EscalationTeamEmail support-escalations@contoso.com test-escalations@contoso.com

    With 0 days, high-priority triage is due as soon as the case is created, so testers see the escalation from part 5 without waiting.

  3. Open ./mappings/test/entity.datamap.xml. It lists the records your logic refers to, including the four teams. For each team, set the Target name and id of the matching team in test:

    <Map type="Entity">
    <Entity logicalName="team" primaryNameAttribute="name">
    <Record>
    <Source name="Service Triage" id="0f8e2c1a-4b3d-4e5f-8a9b-1c2d3e4f5a6b" />
    <Target name="Service Triage" id="7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d" />
    </Record>
    <!-- Tier 2 Support, Service Managers, Support Supervisors -->
    </Entity>
    </Map>

    Leave the Source values and the attributes as generate-mappings wrote them.

  4. If your test users need different message texts, edit localizedresources.datamap.xml the same way. Otherwise leave it out of the import.

  5. Commit the mappings/test folder, so the next release uses the same values.

See Data mapping for every file format.

  1. Run the import:

    Terminal window
    flowon-dynamics import \
    -c "$TEST_CONNECTION" \
    --solution-file-path ./artifacts/ContosoService_managed.zip \
    --package-file-path ./artifacts/Case_Management.flop \
    --map-file-path ./mappings/test/configuration.datamap.xml ./mappings/test/entity.datamap.xml
  2. Check that it ends with Import completed in … seconds. and exit code 0.

The import always runs the solution first, then the package with the data map files applied, and stops at the first step that fails. A managed solution whose version is already installed in test is skipped, so increase the solution version for every release. See Import.

In the test environment:

  1. Open the configuration SlaResponseDaysHigh. It shows 0 and opens read-only, because the project’s solution is managed in test.

  2. Create a case without a Case Type. The save is refused with Choose a case type.

  3. Create a complete high-priority case. Shortly afterwards it is owned by the test Service Triage team, the email is copied to test-escalations@contoso.com, and a Case handling instance starts.

  4. Wait for the next run of the Escalation Monitor. The Triage stage escalates to Support Supervisors.

If the case is not assigned, check entity.datamap.xml: a team Target that does not match a team in test makes the flow fail. To fix a value after the import, edit the file and apply it without importing the package again:

Terminal window
flowon-dynamics apply-mappings \
-c "$TEST_CONNECTION" \
--project-name "Case Management" \
--map-file-path ./mappings/test/entity.datamap.xml

Two more items depend on who runs them in test: ask the team that runs the API host to serve the Customer Portal API from test, and, on Dataverse, ask your administrator to restart Logic Conductor for the test environment so that get_case_sla is available there.

The commands you just ran are the release pipeline. A typical outline:

Stage Commands Result
Build (development) increment-solution-version, publish-api, export Managed solution and package as a build artifact
Deploy to test import with mappings/test/*.datamap.xml Test updated
Deploy to production (after approval) import with mappings/prod/*.datamap.xml Production updated

Keep the connection strings in the pipeline’s secret store, and add an approval before production. Every command exits with 1 on failure, so the pipeline stops at the first problem. Pipelines has complete Azure DevOps and GitHub Actions examples you can adapt.

You have built and deployed a complete case management solution. To go further:

Back to the Tutorials overview.