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.
What you’ll build
Section titled “What you’ll build”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.
Before you begin
Section titled “Before you begin”- 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 ManagersandSupport Supervisorsexist in test, with members. - Connection strings for both environments, stored in the variables
DEV_CONNECTIONandTEST_CONNECTION.
Export from development
Section titled “Export from development”-
Check the exact project name:
Terminal window flowon-dynamics projects -c "$DEV_CONNECTION" -
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 -
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 exampleContosoService_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.
Map the settings for test
Section titled “Map the settings for test”-
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 -
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 SlaResponseDaysHigh10SlaResponseDaysStandard31EscalationTeamEmailsupport-escalations@contoso.comtest-escalations@contoso.comWith
0days, high-priority triage is due as soon as the case is created, so testers see the escalation from part 5 without waiting. -
Open
./mappings/test/entity.datamap.xml. It lists the records your logic refers to, including the four teams. For each team, set the Targetnameandidof 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-mappingswrote them. -
If your test users need different message texts, edit
localizedresources.datamap.xmlthe same way. Otherwise leave it out of the import. -
Commit the
mappings/testfolder, so the next release uses the same values.
See Data mapping for every file format.
Import into test
Section titled “Import into test”-
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 -
Check that it ends with
Import completed in … seconds.and exit code0.
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.
Check your work
Section titled “Check your work”In the test environment:
-
Open the configuration
SlaResponseDaysHigh. It shows0and opens read-only, because the project’s solution is managed in test. -
Create a case without a Case Type. The save is refused with
Choose a case type. -
Create a complete high-priority case. Shortly afterwards it is owned by the test
Service Triageteam, the email is copied totest-escalations@contoso.com, and aCase handlinginstance starts. -
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:
flowon-dynamics apply-mappings \ -c "$TEST_CONNECTION" \ --project-name "Case Management" \ --map-file-path ./mappings/test/entity.datamap.xmlTwo 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.
Automate it with a pipeline
Section titled “Automate it with a pipeline”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.
Where to go next
Section titled “Where to go next”You have built and deployed a complete case management solution. To go further:
- Read the Logic Composer best practices and Process Orchestrator best practices.
- On Dataverse, let Logic Insights check whether the
Case handlingSLAs are achievable and where the bottlenecks are. - Keep repeatable test cases for your blocks and flows with Logic Assurance.
- Explore the full flow step reference and expression functions.
Back to the Tutorials overview.