Skip to content

Configuration for New Entities

Brendon Colburn edited this page Jun 14, 2018 · 15 revisions

When configuring Artifact Management for new entities none of the necessary relationships, Workflows, or SDK Message Processing steps exist. As a result, the process for using Artifact Management is more involved in that the configurer needs to create the elements prior to creating Artifact Rules. Follow these steps to configure Artifact Management for a new Entity:

Adding the Necessary Relationships

The Artifact Management Solution currently works with the assumption that any entity have a 1:N relationship to the artifact entity and a N:1 relationship to the case entity. These relationships must be created for each entity you want to enable for Artifact Management.

Adding the OnCreate Workflow

Figure 1: An example OnCreate Workflow image failed to render

Figure 2: The input parameters of the OnCreate Custom Workflow Activity image failed to render

Out of the box the Artifact Management Framework comes equipped to handle rules based on the creation of Accounts and Cases, as shown in previous figures. In order to configure the framework to run within the context of another entity the following steps must be performed prior to creating associated artifact rules:

  1. Create a new workflow in your Dynamics 365 CE Organization that runs in the context of the entity you wish to use Artifact Management on.
  2. Specify that it executes on create synchronously.
  3. Add the MCS.ArtifactManagement.ProcessingOnCreate Custom Workflow Activity as a step
  4. Click View Properties on the step once it shows.
  5. Specify the schema name of the lookup on the configured entity that points back to a case.
  6. Specify the schema name of configuration entity lookup that lives on the Artifact Entity.
  7. Activate the workflow

Adding the OnUpdate Workflow

Figure 1: An example OnUpdate Workflow image failed to render

Figure 2: The input parameters of the OnUpdate Custom Workflow Activity image failed to render

The images above show the configuration of an example OnUpdate Workflow for a custom entity called Expense. To make an OnUpdate Workflow for your own entity we will mimick the images by doing the following:

  1. Create a new workflow in your Dynamics 365 CE Organization that runs in the context of the entity you wish to use Artifact Management on.
  2. Select the checkbox by record fields change.
  3. Click the View link and select the fields you want to listen for on change with artifact rules.
  4. Add the MCS.ArtifactManagement.ProcessingOnChange Custom Workflow Activity as a step
  5. Click View Properties on the step once it shows.
  6. Specify the schema name of the lookup on the configured entity that points back to a case.
  7. Specify the schema name of configuration entity lookup that lives on the Artifact Entity.
  8. Activate the workflow.

Adding SDK Message Processing Steps

Figure 1: The Plugin Registration Tool focused on ProcessingDelete Plugin image failed to render

Figure 2: Registering a new step on ProcessingDelete Plugin image failed to render

When an entity is deleted that could have child Artifacts records it is desired that those child artifacts are deleted. Since artifacts have multiple relationships that could be considered parental, and Dynamics 365 doesn't support cascade delete for mulitple parents, the ProcessingDelete plugin was built to handle this use case.

To configure Artifact Management on your entity you will need to register a new step to the ProcessingDelete plugin as shown in Figure 2 above.. with the following changes:

  1. Primary entity should match the entity you are enabling Artifact Management for.
  2. Unsecure Configuration block should contain the lookup schema name of your entity that lives on the artifact entity.

After Configuration for New Entity(s)

After you have completed all the above steps for your new entity(s) there are two remaining steps for configuration:

  1. For each attribute selected during OnUpdate Workflow Creation, and for artifacts you want generated OnCreate, create Artifact Rule(s) (for assistance with creating artifact rules refer to Artifact Rule Explanation)
  2. Test your work by making a change to the entity in question to the attributes that should result in artifact generation.