Product Configuration Synchronous Execution

This blog post describes an new way of interacting synchronously from code with the
Constraint-Based Product Configurator which has been introduced in Microsoft
Dynamics AX 2012 R3 CU8.

 

Scenario

The scenario that drove the introduction of this feature can be described as follows:

 

An external 3rd party sales configurator outside of Microsoft Dynamics AX 2012 is used to
assign values to a subset of attributes(a partially configured order), from
which the remaining mandatory attributes can have their values deduced using
the Microsoft Dynamics AX 2012 Configurator, thereby completing the order.

 

 

Once the all the values have been deduced, assuming all values are valid, they can be passed on
to the back end configuration module, which will create the BOM and potentially
the Route (if the model has a Route).

 

Implementation

Included in Microsoft Dynamics AX 2012 R3 CU 8 is a new derived version of the PCRuntimeConfigurator class, named PCRuntimeSynchronousConfigurator.

This class is designed, as the name indicates, for synchronous interaction with the .NET
Configurator component.

 

The configure method on the class is the method
which exposes the new functionality added to the .NET Configurator to Xpp. The
method takes three arguments; the model as xml, the attribute assignments as
xml and a the number of milliseconds which can be used before a timeout occur.
The return of the method is a IsConfigurationComplete enum value, from which
result of the configuration can be determined;

 

  • Complete
    • The configuration is complete
  • Incomplete
    • One or more mandatory attributes does not have a value
  • Timeout
    • The configurator was not able to complete the configuration within the given timeout limit
  • Contradiction
    • One or more constraints have been violated

 

Note:

The PCRuntimeSynchronuosConfigurator class exposes
the functionality required by the .NET configurator component to support the
above scenario but it is not yet integrated with any order (sales, production
etc) or product variant creation nor is it integrated with the BOM and Route
generation.

 

KB Article with number 3028719 should be Applied on top of R3 CU 8 as it addresses a stability issue in the solution.

 Example

 In this example values are passed from the simulated 3rd party configurator into Dynamics AX 2012 through a web service, as illustrated below:

 

 

To expose the PCRuntimeSynchronousConfigurator class through
a web service, we start by introducing a new class
PCTechDemoService
which implements a method with the SysEntryPointAttribute code attribute, which is
needed for a method to be exposed as a web service.

 

In this simple implementation the example method looks like this:

 

[SysEntryPointAttribute(true)]

public boolean configure(PCName _modelName, str _xmlValues)

{

    boolean ret;

    str values;

 

    PCRuntimeSynchronousConfigurator configurator  = PCRuntimeSynchronousConfigurator::construct();

    PCProductConfigurationModel productConfigurationModel  =  PCProductConfigurationModel::findByName(_modelName);

    values = ‘<Assignments>’ + _xmlValues  + ‘</Assignments>’;

   
if(configurator.configure(productConfigurationModel.getXML(), values,120000) == Microsoft.Dynamics.Ax.Frameworks.Controls.ProductConfiguration.IsConfigurationComplete::Complete)

    {

        ret = true;

    }

 

    return ret;

}

Now we can create a Service in the AOT which uses the PCTechDemoService
class and its configure method as an operation. To use this service, it needs
to be put in a service group, which can then be deployed.

 

 

To test the service, navigate to System administration > Services and Application Integration Framework > Inbound ports. Here we find our new PCTechDemoServiceGroup, copy the WSDL URI value.

 

 

 

Open Visual Studio Command prompt and type:

Wcftestclient <Your WSDL URI>

 

This will open the WCF test client where we can now see our web service.

 

For the demo data set I have used, I will use the following argument values

 

_modelName : 20001

_xmlValues : <Assignment xPath=”powerCableLength” value=”10″/><Assignment xPath=”videoSystem/television/size” value=”42″ />

 

Note: the xPath mechanism used to identify the attributes in model.

 

 

If you are familiar with the 20001(Home theater system) model, you will know that it has just two
mandatory attributes which are not assigned by defaults; the powerCableLength
on the root component and the size on the television component.

 

Attached you will find an Xpp project with code used for the example.

 

Enjoy

 

 

 

Demo.zip

Setting up the production input location

This new functionality is available with KB 2995227 and will be included in Microsoft Dynamics AX2012 R3 CU8. To find the HF you can use LCS Issue Search.

What’s new?

To support an efficient process for raw material picking in production, it is now possible to split warehouse work for raw material picking per route operation. As an example, this is useful in a so called bulk / pack production scenario. In this scenario there could be one operation for making the bulk material and one operation for bottling and packing. These two operations are both consuming materials, but will be carried out in different physical locations, maybe even different buildings. Splitting the work per operation will, in this case, secure a process where the warehouse worker is directed, by warehouse work, to deliver the picked materials to the exact locations, where the materials are consumed. This blog will explain how this is enabled by using the official demo data released for Microsoft Dynamics AX 2012 R3 CU8 Virtual Machine (VM).

The illustration below shows the Pellets production from the USPI Company:

 

The item numbers for the ingredients (or raw materials) as MW4004 – Polypropylene and MW4005 – Rubber are pre-fixed with MW and the four end items are pre-fixed with PW. PW4000 – Pellets is the formula item, and PW4001 – Chips and PW4002 – Blocks are co-products. PW4003 – Slag is a by-product

As it can be seen from the illustration, ingredients from the pellets production are consumed at two different operations. Let us see how work is now split per operation when releasing a batch order for the Pellets formula. First we create a batch order for Pellets and perform the following steps Estimate, Schedule and Release. In the Release step warehouse work is created:

 

In the work details form it can be seen that two warehouse works has been created in the release step. The first work is for allocating materials to the extruder operation, which is the first operation in the route. The materials are allocated to the production input location: EXT:

The next illustration shows the work details for the second work for the order. This work is for allocating materials to the Mixer operation. The materials are allocated to a production input location: MIX

Let us take a closer look how to enable this feature. First we need to set up the production input locations that will be applicable for the route operations. The Pellets formula has a production route with four operations

The first operation PPExtCut is consuming MW4004 – Polypropylene and MW4005 – Rubber. An applicable production input location for this operation is found through the Resource requirements for the operation. In the Resource requirements, criteria for finding an applicable resource or resource group during scheduling, is set up

The input location can be specified at the resource group but also on the relation between the resource group and the resource, as it can be seen in below illustration

In case no input locations can be found from the resource groups or resource group relations, then a default production input location is used as a fallback location. This default input location is setup on the warehouse

After setting up the input locations we need to specify which operations that are consuming which materials. This mapping is set up on the material lines using the field Oper. No. This is shown in the below illustration

If no operation is specified on the material line, then the production input location will be found from the resource group or resource group relation, applicable for the first operation in the production route. If no applicable input locations can be found, then the default output location for the warehouse is used. In the diagrams below the defaulting hierarchy is shown. The first diagram shows the rules that applies for finding the production input location for a material line that is mapped to the first route operation or does not have a location defined:

 

The second diagram shows the rules that applies for finding the production input location for a material line that is not mapped to the first operation but to one of the following operations in the production route:

 

In order to enable the split of warehouse work a minor change has been introduced to the work template for raw material picking. When a new template is created a Work break is automatically inserted. This work break is configured by the system to group work per route operation. It is possible to remove the work break, and in that case only one work will be generated when releasing to the warehouse from production. In that case the input location found from the first operation in the route will be used as production input location, and if none found on the route the default output location set up for the warehouse

If the hotfix is deployed to an existing installation, then the work template for raw material picking needs to be recreated in order to establish the work break. An alternative is to insert the work break manually in the existing work template.

Again looking at the work details for the released batch order for pellets, we should now understand how the input locations for the two sets of work are found

 

Summary

In CU8 work for raw material picking can now be split per route operation. On the resource groups and the relation between the resource group and the resource it is possible to setup a production input location to be used in warehouse work. Installing this hotfix on an existing installation will require you to recreate or update the work template for raw material picking. This new capability secures a more efficient picking process for production and batch orders, as the warehouse work will now direct the warehouse worker to the exact locations where the material is consumed.

 

 

 

 

Support for Recycled By-products in AX 2012 R3 CU8

This new functionality is available with KB 2989470 / HF 2989470 and will be included in Microsoft Dynamics AX2012 R3 CU8. To find the HF you can use LCS Issue Search.

What’s new?
To support recycled or recurrent products in process industry, it is now possible to use the same product as both input and output on a formula. As an example, this is useful in plastic molding where consumed plastic regrind can be recovered from the manufacturing process. Other examples are processes where you put metal scrap from the stamping/forming process in a foundry.
The recurring co-product solution in Microsoft Dynamics AX2009 had some limitations on the costing side and was not ported to AX2012. This new solution use by-products with a stronger support for costing.

Feature solution
This new feature enables the consumption and reuse of the same by-products in the production of formulas and batch orders, by allowing BOM circularity for output that has the production type, By-product.
For costing purposes a new Burden type, Recycled, was added to handle the cost of the recycled by-products. Use of the Recycled Burden type deducts the joint production cost that is allocated to the formula and co-products, by using the standard cost value of the recovered by-product.
By-product output from planned and firmed batch orders is ignored during planning. This is done to ensure that demand for the recycled product isn’t pegged against by-product output from the same order, or other orders from the same process or BOM chain. This means that the recycled by-product cannot be pegged until it is on-hand (posted from the batch order).
Finally as a small additional improvement on the Explosion form, it is now indicated when a formula output is a by-product. This is done by adding ‘(By-product)’ to the line.
 
Set up recycled by-products
In order to allow BOM circularity, the recycled item must use standard cost and use the production type By-product or in special cases Co-product. On the formula the recycled product input is a normal formula line, and the output on the same or other formulas is a co-product output of the Production type, By-product, and the Burden type, Recycled.

  1. Product 
    1. The recycled functionality only supports standard cost, so ensure that you select an Item model group that uses the Inventory model, Standard cost, on the General FastTab:
    2. Ensure that the Production type is By-product on the Engineer FastTab for the product:
       
      Note: Products with production type Co-product can also be used, but then you will have to change the Production type to By-product on the formula or batch order, to use the recycled by-product functionality.

  2. Input – formula consuming the recycled product
    The recycled product is added as a normal formula line on the formula:
  3. Output – formula producing the recycled product
    On the formula (can be the input, or another formula) that produces the recycled item, the recycled item must be added as a co-product output of the production type, By-product, with the Burden type, Recycled:

    We are aware that the name Burden is not full correct with the Recycled option added. However, the nature of a hotfix release didn’t leave room for renaming.

 

Let’s try an example to see the feature in action:
 
We have the following three products:
M1 – Main ingredient, Standard cost – $10/Kg, Purchase, 100 kg On-hand
B1 – By Product, Standard cost – $5/Kg, Purchase, 15 kg On-hand
F1 – Formula item, Standard cost, Production, 0 kg On-hand
 
To produce F1 we use the following formula:
F1-FORM, Formula Size: 10 Kg

With the following lines
M1, 20 kg
B1, 10 Kg

Co/By-Product lines
B1, Production type = By-product, Burden = Recycled, 8 Kg 

In AX it looks like this:

With the B1 added as By-product under the Co-products output:


First sales order

To generate a demand for F1 let’s create a sales order for 10 kg:

Running the explosion on the sales order will generate a batch order to produce the 10 kg because we don’t have any F1 on-hand:

Notice that the first line for B1 indicates that we get an additional co-product output of the type, By-product.
 
As both M1 and B1 are on hand, we can firm the planned batch order and start the production. (Planned orders -> Firm)
 
Processing the batch order
Let’s report the batch order as finished with the expected input and output:

What happened to the cost?
I have set a material overhead of 10%, so looking at the cost perspective we get the following.

Batch cost:
     M1 20 kg = 20 * $10 = $200
     B1 10 kg = 10 * $5 = $50
     Overhead 10% = 10% * ($200+$50) = $25
     Total = 200+50+25 = $275

B1 cost share (8kg): 8 * $5 = $40 (note this is fixed to the Std. Cost – no overhead)
F1 cost share (10kg): $275 – $40 = $235 (Incl. all $25 in overhead)

For the formula product – F1:

And for the by-product – B1:
 

Second sales order
Let’s create another sales order for 20 kg F1, to see how planning handles a shortage of the recycled by-product.

Running the explosion on the sales order will generate a planned batch order to produce the 20 kg. Notice the planned order for B1.

We still have plenty of M1: 

  • We have 80 kg and we need 40 kg for the additional order.

However, we are running short of B1:

  • Initially, we had 15 kg. The first batch order consumed 10 kg and output was 8 kg, so now we have 13 kg.
  • For the new order we need 20 kg, so a planned order for 7 kg is created to cover the missing ingredient.

Summary:
With HF 2989470 that is included in Microsoft Dynamics AX 2012 R3 CU8, it is now possible to recycle and reuse by-product output from batch orders.

  • The recycled product must use standard cost and have the production type, By-product or Co-product
  • On the formula, co-product output must be of the type, By-product, and have the Burden type, Recycled
  • Planning will now consider only on-hand inventory for by-products. So potential supply from batch orders is not used for pegging until the batch order output is posted.

Now available: Cumulative Update 7, featuring the product change case management

With the recent release of Cumulative Update 7 for Microsoft Dynamics AX 2012 R2, the case management functionality of Microsoft Dynamics AX has been enhanced for documenting and releasing product changes to production.

Many manufacturing companies will welcome this simple built in possibility of creating product change cases to document component substitutions in bills of materials or formulas, or changes in the production route, and of being able to visualize the impact of such component changes.

The new product change functionality provides enhanced support for approval and activation of the changes to bills of materials, formulas and routes that are associated with a product change case, which reduces the effort needed for releasing product changes to planning and production. This new capability also offers a new opportunity to integrate changes from an external PLM solution into Microsoft Dynamics AX with the context of the PLM change order with enhanced support for validation, approval and activation in production.

The diagram below illustrates the overall product change process, and highlights those elements (with black outline) that are supported by the new product change features in Cumulative Update 7 for Microsoft Dynamics AX 2012 R2.

Meet me at Convergence EMEA 2013 at the Manufacturing booth if you would like to see the feature in action.

We will soon share more details about this new functionality in this blog.

 

 

Download it now!

Microsoft Dynamics AX 2012 R2 Cumulative Update 7 (KB2885603) – build #6.2.1000.4051

Improved formula management in process manufacturing AX2012

Formula management is a key requirement for process manufacturers. In most cases, process manufacturers process raw materials that are found from natural sources which inherently means they have to deal with a lot more variability than discrete manufacturers. This variability could result from lack of control over physical properties of the materials. Which in turn means process conditions need to continually adjust in order to produce a finished product within certain range with some consistency. Natural ingredients, variable physical properties, altering process conditions and highly controlled & regulated environments mandate that process manufacturers manage their formulae with good discipline. Formula management in Dynamics AX is built on Bills of material which is the natural place it should be, however in previous versions the formula was less secure and there were several inconsistencies in the behaviour.

Usually in food & drink, chemicals and pharmaceuticals manufacturing, organization that creates and maintains formula or the secret sauce that makes a company successful can wield a large influence and by extension have a significant effect on the buying decision. Keeping this in mind, we decided to enhance the security on formula management while balancing it with ease of use to setup & maintain these formula. We improved some and added new capabilities that will hopefully help you influence the buying decision.

This post describes key enhancements made to formula management in process manufacturing AX2012. Help document that describes full details is available here.

Security of approved formula

In previous versions, formula lines could be created without a header and co-by products could be attached and deleted at will. While this is great from ease of use point of view, feedback that we received clearly showed that customers expect more stringent measures since most people used formula in a regulated environment. Therefore following enhancements were made in process manufacturing AX2012.

  1. Formula header is required before a version or lines can be entered
  2. Formula version is required before co-by definitions could be setup
  3. Formula version is required before lines could be setup so that per series can be defaulted from formula size on formula version
  4. Furthermore the BOM modification policies were made extensible to formula, this means the following
    1. When block editing is turned on, no fields on an approved formula or version or on co-by setup can be changed
    2. When block removal of approval is turned on, formula or version cannot be unapproved
    3. When block editing is off, fields can be changed on formula, version and on co-by setup any time

This allows stricter discipline in formula maintenance and makes it easier for design or product department or any other authority to secure the formula definitions from intentional or unintentional changes unless authorized.

Scalable formula

Consider the scenario where manufacturing site has a standard approved formula to produce a certain dye blend in certain size vat. Normally, the formula will be used every time the blend is scheduled to be produced. But not always, all the required ingredients may be available in right quantities. You can enter the quantity of short ingredients and the other ingredients will scale accordingly and will change the formula size. This will allow you to determine what quantity of dye blend can be produced. Similarly if the normal vat is busy with another process and you have an alternative vat, putting the size of the vat in the formula size will allow you to see the quantity of scalable ingredients required for this vat. This is a powerful capability that gives you flexibility to configure the production based on available ingredients and equipment without affecting existing production in progress.

Formula for different vat sizes

Taking the previous example a bit further, in most cases plants, processing lines do not have just one vat/vessel/equipment for processing something. They have multiple size equipment – for samples, for small orders, for medium to large orders for standard products. In previous versions it was only possible to have scalable ingredients tied to one formula size. If you created another version with another formula size, ingredients on the formula line will not scale. In process manufacturing AX2012 it is possible to setup multiple versions with different formula size. A new field "use for calculation" determines which formula size from which version is being used to scale the ingredients. So, in previous example, now it is possible to setup all versions for all vat sizes that you have. Depending on which vat is available at the time, you can switch the "use for calculation" flag and scalable ingredients will scale based on that vat size.

Step consumption

Please see this post for more details.

Electronic signatures

This capability has existed since AX2009, now it works together with BOM modification policy and the new security framework. As previously, you can setup if you require users to authenticate any changes to formula or versions. If you would like to capture authentication on change of any other fields on the formula or for that matter anywhere else in the application it can be setup. For more details on how to do this, please see the documentation.

Miscellaneous updates

Now it is possible to copy co-by lines when a formula is copied. Behaviour of Percent controlled items have been modified to ensure that use for calculation flag does not change the quantity of percent controlled items when a different vat is used for calculating consumption of scalable ingredients.

Cost calculation

Based on customer feedback, we have modified the previously implemented cost calculation for co-by products and now the new method is called Total cost methodology and among other aspects, it uses price of co-products to determine the ratio of total cost that should be allocated. For more details please see this link.

New capability of step consumption in process manufacturing AX2012

Let me provide some context behind the decision to introduce step consumption capability in Process Manufacturing  Dynamics AX2012.
Discrete manufacturing almost always involves linear consumption of ingredients – four tires are required to put together a car. Whereas in process manufactured products consumption can be linear and it can also be non-linear. As the home brewers know 5 Kg of malt gives 12 litres of beer and 10 Kg of malt gives 24 litres of beer but the bitterness is more in smaller lot, so if you want to keep same bitterness in bigger lots you need to add some extra malt, how much extra is non-linear – based on experience. Another industrial example will be use of carbon as a catalyst in plasticizer manufacturing. You can use 1 Kg of carbon to make up to 5 kiloliters of phthalates. Then you need 2 Kg of carbon up to 8 Kilo litres of phthalate (of course, it’s a different matter that phthalates are banned in many regions for some products, so you shouldn’t really be making them).

Many such reactions have non-linear consumption across different industries but sometimes it’s not essential to capture them in an ERP and at other times it is possible but cost intensive to capture and maintain the formulae. This is where step consumption comes useful. Setting up Bills of material is fairly straightforward when compared to setting up formulae. It isn’t because  formulae setup in AX is not user friendly, it’s just because the number of parameters required to setup a formulae are many more. In order to setup formulae with non-linear consumption in previous versions, the only possibility will be to setup many different formulae where every detail is same except the quantity of the ingredient that is consumed non-linearly. Since this would be extremely cumbersome in itself and furthermore because process manufacturers needed multiple set of versions – master formula, production formula,  distributed formula, batch card formula and so on, we decided to introduce the concept of step consumption into AX2012.

So for the non-linear consumption of malt, you will create two lines in the formula for malt product. On one line you will setup linear consumption, 5 kg for 12 litre, 10 kg for 24 litres and so on. On the second line you can change the formula to “STEP” on the setup tab. This will make the step consumption grid available. Here you can specify that an extra 0.1 kg of malt is needed when finished beer quantity is between 12 and 24 litres and an extra 0.15 kg of malt is needed when finished beer quantity is more than 24 litres and so on. So, this gives you flexibility to setup non-linear consumption in the same formula.

Formula lines

Fomrula lines setup tab

During production estimation system will look at the finished quantity of beer you want to manufacture and will automatically calculate the correct quantity of malt needed. In case of carbon example above, it can be achieved by using just one line on the formula lines for carbon where you can setup step consumption of carbon of 1 kg up to 5 KL and then of 2 kg between 5 – 8 KL and so on.

Hopefully this will be useful for your scenarios. In case you have suggestions for improvement please email me.