Skip to main content

Blocks Insights

About Blocks

A ntw_logicblock entity record represents a logic block definition. The definition includes properties of the Block, such as the name of the Logic Block, the Project to which the Block is related, and its configuration in the form of a JSON (JavaScript Object Notation) document.

The two plugins FlowOn.Crm.LogicBlocks.Plugins.LogicBlockPlugin and FlowOn.Crm.LogicBlocks.Plugins.InvokeLogicBlockPlugin plays a pivotal role during the lifetime of a logic block definition.

FlowOn.Crm.LogicBlocks.Plugins.LogicBlockPlugin plugin supervises the customizations for Blocks. This Plugin springs into action whenever you create a new block, make changes, or delete it. The Plugin validates configuration and performs the necessary customizations in response to updates. This supervision manifests in a few plugin registration steps (Figure 1: FlowOn Block).

FlowOn Block Figure 1: Flux Block

Blocks Plugin Steps

MessageStageDescription
CreatePreValidationUpon creating a Logic Block, the Plugin performs a series of validations to ensure the integrity of the configuration. The Plugin blocks the creation of the Block in case of validation failures.
CreatePostOperationFollowing successful validation, this Plugin performs customizations by introducing a process action and registering a new plugin step only if the Is Action flag is true. (Figure 2: Block Create Customizations)
DeletePreValidationBefore the deletion of the Block, the Plugin performs a series of validations to ensure that this Block does not serve as a dependency for any other component.
DeletePreOperationFollowing successful validation, this Plugin removes the registered plugin registration step and the process action only if the isAction flag is true. (Figure 4: Block Delete Customizations)
UpdatePostOperationAfter updating a Logic Block, the Plugin updates the plugin registration step and the process action if the 'isAction' flag is true. If the 'isAction' flag is false, and the previous state of the 'isAction' flag was true before the update, the Plugin deletes the registration step and the process action. (Figure 3: Block Update Customizations)

Table 1: Blocks Plugin Steps

Block Creation

When a block is created and marked as 'isAction,' the Plugin generates a CRM process action with input and output arguments matching the Block's configuration. Dynamics subsequently creates a specialized SDK (Software Development Kit) message and registers a plugin registration step with the necessary configuration.

Figure 2: Block Create Customizations Figure 2: Block Create Customizations

Block Update & Deletion

In cases of updates, the Plugin adjusts the process action and plugin registration step configuration (Figure 3: Block Update Customizations). Please note that this Plugin is active only during block creation, modification, or management and does not intervene during execution.

Figure 3: Block Update Customizations Figure 3: Block Update Customizations

Likewise, upon deleting a Block, the Plugin removes the associated plugin registration step and any previously created workflow (Figure 4: Block Delete Customizations).

Figure 4: Block Delete Customizations

Figure 4: Block Delete Customizations

Each time a logic block executes through a process action, the FlowOn.Crm.LogicBlocks.Plugins.InvokeLogicBlockPlugin Plugin intercepts the call and runs the logic Block.

FlowOn Block Invoke Block Logic Plugin

FlowOn Block Invoke Block Logic Plugin Figure 5: FlowOn Block Invoke Block Logic Plugin

Process Action Request Life Cycle

In the diagram below, the process action commences by receiving the necessary parameters: the SDK message and Process action input arguments. Following successful execution, it returns a response.

Figure 6:  Process Action Request Life Cycle Figure 6: Process Action Request Life Cycle

What's Next

After exploring the internals of Blocks, let's now dive into the behind the scenes of flow logic.