Additional Blogs by Members
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Debugging MII Transaction

Applies to- 12.2.3 Build (177)


This document showcases the new feature of Debugging MII Transaction in MII v12.2                              

The document takes us step by step showing how to use breakpoint action and how to debug the MII transaction. It will be helpful for the developer to get more insight and debug the transaction for run time values at different logical points.

Author: Ruchir Batra

Created On: 31 May 2012

Table of Content

Initial Set Up /Introduction to Example Set Up

Configuring the Query

Configuring the Conditional Action Block

Configuring the Assignment Action Block

Complete Flow Diagram

Testing the Scenario

Conclusion/ Key Take Away

Initial Set Up /Introduction to Example Set Up

Open up the Work Bench found under Content Development from MII Main Menu.

Create a new transaction in the Work Bench (Catalog Tab). And create a local variable named value and giving it an initial value of 1. Its value will help us determining the process flow through the transaction.

In our example depicted below, we will be trying to fetch a value from query and then based on logical condition set in Conditional Action Block; we will trace the execution flow in the transaction.

During the same, we will assign the Create Breakpoint Action and see how it works for our scenario.

Configuring the Query

Under the Data Query Header on left below, one can find – SQL Query Block.

In Configuration Object Part- one can browse and assign the query.

In Configuration Link- We can assign any input for the query (if required). In our scenario- we will not be linking any input for the query.

We have named this block as Fetch_Value and upon configuration->We clicked Load and then browse through the query location path to attach the same.

Configuring the Conditional Action Block

We can configure the Conditional Action Block – found under Logic Header Tab on left side under Action as Main Header. We can assign any conditional value as an input and on execution it will check against the same condition which we have set.

Configuring the Assignment Action Block

The Assignment Action Block is used to assign any value. We can click Config Link to open Link Editor and then we can assign any value to any variable using it.

Complete Flow Diagram

  REF 1

The above REF Diagram showcases the complete process flow in the transaction.

Testing the Scenario

We have set up a scenario where in the first action block – SQL Query Block will fetch us the desired value from query and will test this value against the arbitrary value set in Conditional Action Block.

Then, based on condition being true or false in the Conditional Action Block, execution will pass to one of Assignment Block set to assign the value to the local Variable (Created in the beginning).

We will assign the Break Point at Conditional Block so that we can halt the execution and manually check how the output behaves (run time, debug mode) based on different conditional input set up in Conditional Action Block.


REF2 (Meant to showcase how to set a Breakpoint; Right click on action block and you will see the options as above)

REF3 (Refers to the debug mode execution of transaction)

On execution- we found:

If we run our transaction-

The First Action Block executes successfully and fetch us the result as desired.

Then the execution comes and halts for user action at Conditional Block since we have set up a Breakpoint against it. We can set up Breakpoint with its property like –Always, Based on Condition (If true), disabled (Never for particular action block) and so on.

In our case- we have set up the Breakpoint against Conditional Block with property as Always.

We can double click the Conditional Block to open the Property Window as seen in snapshot above. Then we clicked the Config Link Part and check the condition set. We can click evaluate to find its value at run time (i.e. now, during the execution run). Similarly, we can change the condition and update/evaluate to find the new output from the conditional block.

Hence- This way we can manipulate and check different conditional statement against the output received from our query and see how the output behaves in case of different conditions set.

All this happens while in debug mode- and once execution passes ahead, the developer can be sure of the process flow the execution should take.

This way – we can set up Breakpoint within the MII Transaction and debug the transaction at run time.

Similar to Create Breakpoint, we can also remove the Breakpoint in the very same fashion.

Each color seen during the debug mode conveys a particular meaning, such as orange stating the action run and exception thrown. And Green tracing us the path – the execution has taken place. And so on.

Along with it- we also have numerous options to trace the values as seen in REF 3 lower part (last line) which can help us trace the exact query, parameters it took, different variable values which happen at run time.

This is how the process flow takes place and debugging feature works in run time mode within a MII Transaction.

Conclusion/ Key Take Away

The above scenario showcase us how to use the debugging feature introduced in MII v12.2 and how developer can debug and take variable control at run time in order to have real time feedback on state on each action within the transaction.

-          Break Point Action (Debugging Feature) works only for transaction which are saved

-          It doesn’t work for secondary transaction. (ie – which are called from another transaction)

-          One cannot export a transaction with Break Point

-          Break Point are user specific