Dynamics AX
  RSS Feed  LinkedIn  Twitter
Want to turn you're data into a true asset? Ready to break free from the report factory?
Ready to gain true insights that are action focused for truly data informed decisions?
Want to do all of this across mutliple companies, instances of Dynamics and your other investments?
Hillstar Business Intelligence is the answer then! (www.HillstarBI.com)

Hillstar Business Intelligence for Microsoft Dynamics AX and NAV on Mobile, Desktop, Tablet


Let us prove to you how we can take the complexity out of the schema and truly enable users to answer the needed questions to run your business! Visit Hillstar Business Solutions at: www.HillstarBI.com

Friday, September 02, 2011

AX 2012 Services, Services & Services - Recap Post



With the release of Microsoft Dynamics AX 2012, I and a few other community bloggers have been really talking up services. This started with a dive into services and from there has grew and grew.

To this end, I thought it would be a good time, to take and do a wrap up article, if you will, that ties together all these efforts that have been going on, to take and give a single point of entry for finding out about all things services. There is actually a lot more, in-depth coverage that needs, and will take place for this topic. However, for your ease, and enjoyment, the following is a list of post & articles that have been created to date.

First, a nice introduction into services.: A Dive into services.

Next up, we have the set of post I did, covering different concepts and ideas of services, that was built from the dive post.:


Now in some of my posting, I did write about the SysOperations Framework, or Business Operations Framework as the actual official product label for that said framework is stated. I had planned on doing the same kind of intro post around this framework as well, as it relates to services.

However, in the midst of all the writing, learning, and sharing some other great community bloggers have covered this to a good extent already, and so I will link to those resources here.

SysOperations from Fellow Bloggers:
-AX2012: SysOperation part 1: Data Contracts and Service Operations
-AX2012: SysOperation part 2: SysOperationServiceController
-AX2012: SysOperation part 3: SysOperationAutomaticUIBuilder

And
-From RunBase to SysOperation : Business Operation Framework
-From RunBase to SysOperation : Business Operation Framework (Cont'd)

With all of this, it should be looked, really as a nice introduction to the concepts, and abilities of AX 2012, for making use of SOA, or services for internal and external use. This will only continue to grow, so it's ever so important that these concepts be understood now, and implemented in today's AX 2012 projects.

Look for more depth, and deeper dives into some of these concepts in the weeks to follow. That's all for now however, for those of you in the U.S. enjoy your long weekend! Till next time!




"Visit the Dynamics AX Community Page today!"


Labels: , , , , , , , , , ,

Wednesday, August 10, 2011

Microsoft Dynamics AX 2012 - A Dive into Services, Custom Services (Part I)



Recently I have been doing a dive into all the services, and service design within Microsoft Dynamics AX 2012. I started with a dive into services, and from there covered systems services, with a focus on the Metadata Service, and followed with a look at Document Services.

I continue my series, with this post, focusing on Custom Services. This is actually pretty new for AX, and has a lot of great possibilities when it comes to exposing business logic, that can be used within and externally of Microsoft Dynamics AX 2012.

Now let me state, that the intent of custom services is to represent simple DataContracts, and custom business logic. For any complex data entity needs, Document Services is the right path.

It's not to say the custom services, and document services can't be used together, in a scope of work. Encapsulated, and combine to offer abstraction --- were such concepts make sense. However the point to not be taking lightly. The reality of this goes back to what I was trying to point out, in my recent article on Just because you can, doesn't mean you should.

With that aside, lets look at the make up of a custom service example. To start, a custom service itself, is made up of three things.: X++ Class, with one-to-many SysEntryPointAttribute tagged methods,a Service Node with operations representing the given SysEntryPointAttribute tagged methods and finally a Service Group in which the Service Node is a part of and deployed ready for consumption.



Now, lets take a look at the class object in a little more detail, since this is where we start with custom services. With this class, one thing that is important to point out is the fact that this should have it's property of RunOn set to Server.



Doing this makes sure the scope of execution for the given entry points are actually set correctly. This is a must, since this code will be running on the server.

Moving from there, lets take a look at what a given SysEntryPointAttribute, metadata tagged method looks like.



The above is a really simple method, is simply takes a string parameter, and then combines that and returns back a string. The point to see here is the tag area, in which we tell AX 2012 that this is a Service Operation through the use of the SysEntryPointAttribute metadata tag.

From here, now we can move on to the service node, set it's properties to point to our given custom class, so we can see what operations we can make use of.





Now that we have set this, we can go back to the Operations for the given service, right click, and then left click on add operation.





If we now take and select to add the getHello operation from the list, and click add, we will then see this now show up under the possible operations for use with the given custom service.



Now that we have this service operation to make use of, we can add this service to our given custom service group, publish it, and then make use of it from within AX 2012 or outside of AX 2012.



Now with this, we see simply and quickly we can get a custom service up and running, with really little effort. It's all about the metadata Attributes that now exists in Microsoft Dynamics AX 2012 that enables this whole framework to take place.

For now that it's on the topic. I'm doing this part of dive into services as a series. There is a lot to cover in this area, with a lot being very, very new, so I want to make sure and have this broken into easily managed post. I will be linking back to this post, with Part II, when we dive into the use of DataContracts.

That's all for now, but check back soon as more to come! Till next time!



"Visit the Dynamics AX Community Page today!"


Labels: , , , , , , ,

Wednesday, July 27, 2011

Microsoft Dynamics AX 2012 - A Dive Into Services



With the release of Microsoft Dynamics AX 2012, services are a key role that enable many parts of AX. This includes from Office, to internal use, to extending and working with complex datasets, and even to expose custom busienss logic.

To help better understand services in AX 2012, lets first take and understand what services means. There are three distinct service context, which are.:
  • System Services - These are services that come as part of AX 2012 offering,
    like the Metadata Service, User Session Service & Query Service
  • Document Service - This carries similar concepts and design on previous version of AX, in that a document service is meant to wrap complex datasets, for CRUD based operations. There are some differences now, and we will review these.
  • Custom Services - These are meant to wrap simple datacontract needs, or to expose custom business logic. I will note here: These are never recommend to handle complex data operations. Use Document services for that.


System Services
System Services are meant to give a window into the Dynamics AX 2012 world. Part of that world involves Query Service, as well as the Metadata Service. These two services are meant to be very specific uses. The Query Service is meant to take and offer an ad-hoc ability to query datasets, from AX 2012. Now I must say this should be used with caution. If this query, or integration is meant to be re-used in any fashion, you should build a query object, and create a document service from it.

There is a pretty decent example on MSDN, that shows how to use a Windows Form, and Dataviews / grids, for showing off the power of AX 2012, and the Query Service, located here.: Walkthrough: Calling the Query Service with a User-Defined Query [AX 2012]

The meta data service is meant to give the ability for other LOB applications to query against to allow AX 2012 to self describe information about objects that reside within the system. Here again, the use should be limited.

Document Services
Document Services are meant to truly be the path, in which any real complex operations of CRUD, or Create, Read, Update & Delete, operations are meant to be executed via. The idea here, is that a Query Object, or set of Query objects created within the AOT, represent a document service, that is deployed, and consumed by either AX itself, or other LOB systems.

This includes both master data, like EcoResProduct (or Products), as well as Customer, Vendors, and event transactional data like Sales Orders and purchase orders. This has improved a lot since a AX 2009, and the ability to quickly deploy such services in AX 2012 is now such an easy task.

Custom Services
Custom services represent, to most C# developers, something that has been common for a little while. This is, DataContracts, and Service Oeprations. As mentioned above, this is not meant to represent complex data opertaions, but instead, to expose simple data contracts, as well as custom business logic through service operations.

Finally, There are some guidelines when thinking in terms of use of services, which include design patterns around "chatty" services and integrations.

Where possible, it should always be considered, to take and perform the least amount of calls as possible. This means instead of sending a single Entity Object that represents a Document Service create, for example, for a given table, per service call, the better approach would be to build up a collection of said objects, with a single call for the entire collection.

Of course, this might not be always applicable, where you look to transactional data needs, where the very nature of the integration leans towards possible one-off single calls. Still having this kind of design approach in mind, will help in *not* creating possible performance issues around your services related integrations and needs.

There are also other topics, that I will continue to dive into from this post, including the use of Query Objects being represented as OData feeds, and a deeper dive into the Business Operations Framework and the use of the SysOperations for enabling service use to replace the RunBaseBatch framework for business logic and reports.

That's all for now, but check back soon as I dive deeper into each of these topics, and show off real world examples for each. Just keep in mind, the idea is to abstract and extend via SOA, or service-oriented architecture. There should never be a reason, now, to ever go driectly to the AX 2012 database. All interactions, should always take place via the application layer, and typically through services.

Well that's all for now, but check back soon, as more to come! Till Next time!



"Visit the Dynamics AX Community Page today!"

Labels: , , , , , , , , , , , ,


Copyright 2005-2011, J. Brandon George - All rights Reserved