-
Notifications
You must be signed in to change notification settings - Fork 1
Configuration for New Entities
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:
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.
Figure 1: An example OnCreate Workflow
Figure 2: The input parameters of the OnCreate Custom Workflow Activity
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:
- 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.
- Specify that it executes on create synchronously.
- Add the MCS.ArtifactManagement.ProcessingOnCreate Custom Workflow Activity as a step
- Click View Properties on the step once it shows.
- Specify the schema name of the lookup on the configured entity that points back to a case.
- Specify the schema name of configuration entity lookup that lives on the Artifact Entity.
- Activate the workflow
Figure 1: An example OnUpdate Workflow
Figure 2: The input parameters of the OnUpdate Custom Workflow Activity
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:
- 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.
- Select the checkbox by record fields change.
- Click the View link and select the fields you want to listen for on change with artifact rules.
- Add the MCS.ArtifactManagement.ProcessingOnChange Custom Workflow Activity as a step
- Click View Properties on the step once it shows.
- Specify the schema name of the lookup on the configured entity that points back to a case.
- Specify the schema name of configuration entity lookup that lives on the Artifact Entity.
- Activate the workflow.
Figure 1: The Plugin Registration Tool focused on ProcessingDelete Plugin
Figure 2: Registering a new step on ProcessingDelete Plugin
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:
- Primary entity should match the entity you are enabling Artifact Management for.
- Unsecure Configuration block should contain the lookup schema name of your entity that lives on the artifact entity.
After you have completed all the above steps for your new entity(s) there are two remaining steps for configuration:
- 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)
- Test your work by making a change to the entity in question to the attributes that should result in artifact generation.