iis setups _ dynamics ax workflow wanderings

Upload: tilak-raju

Post on 12-Oct-2015

116 views

Category:

Documents


0 download

DESCRIPTION

hi

TRANSCRIPT

  • 7/17/2014 IIS Setups | Dynamics AX Workflow Wanderings

    http://workflowax.wordpress.com/category/iis-setups/ 1/13

    Dynamics AX Workflow Wanderings

    Hints and Tips for Dynamics AX Workflow

    IIS service hanging when re-starting

    Ive been doing some changes on our workflow websites and restarted IIS,

    however the World Wide Web Publishing service got hung in the statusStopping and IIS manager couldnt force it to restart either.

    So if nothing seems to work and you unable to restart your physical server,you can easily force kill the IIS process with the following command in

    DOS: Taskkill /F /FI SERVICES eq w3svc

    Comments : Leave a Comment Tags: IIS, W3SVC, World Wide Web publishing service

    Categories : Dynamics AX 2009, IIS Setups, Workflow

    Installing Pre-requisite software forWorkflow error

    Ive just been installing Workflow on a client site running Windows Server2008 R2 and came across a strange error.

    When selecting the workflow component to install, it requested to install

    prerequisite software IIS and .NET 2.0 However when clicking yes, itfailed to install IIS and wouldnt allow me to continue. I managed to resolvethe error with fixes.

    1. Ensured that no other Server Role Manager sessions wererunning/installing roles. (I was receiving the following error message inthe IisInstall log file: Error (Id=0) Roles or features are currently beingadded or removed on this computer. Only one user can add or remove roles

    27 10 2011

    5 10 2011

  • 7/17/2014 IIS Setups | Dynamics AX Workflow Wanderings

    http://workflowax.wordpress.com/category/iis-setups/ 2/13

    or features at a time to prevent conflicting configurations. )2. I was also received the message Error (Id=0) ArgumentNotValid:

    Feature not valid: NET-XPS-Viewer. The name of the feature was notfound. which we managed to resolve by modifying the line to in the

    ServerManagerCmdInputIIS.XML file in the support folder of youAX2009 setup folder.

    I hope this helps somebody struggling with this issue.Happy Daxing

    Jonathan.

    Comments : 1 Comment

    Categories : Dynamics AX 2009, Idea's to remember, IIS Setups,Installation, Quick Fixes, Workflow, Workflow Errors

    How to run multiple Dyanamics AXworkflow websites on IIS 7

    Previously I have written up a post on how to run multiple workflowwebsites on the same server

    (http://workflowax.wordpress.com/2009/09/17/running-multiple-aos-on-the-same-box-all-using-workflow/). The instructions are pretty IIS 6.0specific, so here is an update on how to do this on IIS 7.

    Step 1 Create a new business connector configuration1. Click start, control panel, administrative tools, Microsoft Dynamics AX2009 Configuration.2. Select Busines Connector from Configuration Target

    3. Click Manage, Create Configuration.4. Provide an intuitive name for the business connector configuration e.g.AX2009_DEV. You will need to use this in a few minutes again, so make anote of it.5. Click ok.6. Select Connection tab, select the AOS that is already there and click edit.

    7. Provide the correct server name, instance name and TCP/IP port, clickok.

    10 12 2010

  • 7/17/2014 IIS Setups | Dynamics AX Workflow Wanderings

    http://workflowax.wordpress.com/category/iis-setups/ 3/13

    8. Click apply to save your new configuration.9. Select your previously selected configuration and click ok (this is so thatyour already existing website will still work).

    Step 2 Duplicate the website files

    1. Open up My Computer and navigate to c:/Program Files/MicrosoftDynamics AX/502. Duplicate the Workflow folder and rename the new folder to somethingintuative like WorkflowDev3. Edit the web.config file inside the newly created folder using Notepad orsimilar text editor.4. Replace the line with

    5. Save and exit notepad

    Step 3 Create your website application pool1. Open IIS Manager: Start, Control panel, Administrative Tools, InternetInformation Services (IIS) Manager2. Expand your server node, Click application pools.

    3. Click add Application Pool (on the right)4. Enter and Application pool name E.G.MicrosoftDynamicsAXWorkflow50Dev5. Select .Net Framework v2.0.507276. Select Classic from the Managed pipeline mode.7. Click ok to close.8. Select your newly created application pool, click advanced settings.

    9. Ensure that the managed Pipleine mode is set to classic.10. Under Process Model -> Identity, click , select custom account,click select, enter your bcproxy account details used for your previousworkflow website. e.g. domain\bcproxy. Click ok to close, click ok to closethe select window.11. Set the IdleTime-out (minutes) setting to 0.12. Set Regular Time Inteval (minutes) (under Recycling section) to 0.

    13. Click ok. Your application pool is now setup.

    Step 4 Create Application1. In IIS Manager, expand the Sites node, expand default website

    2. Right click on default website and click Add Application

    3. Provide a name for your application e.g.MicrosoftDynamicsAXWorkflow50Dev

    4. Select the application pool you created in step 35. Under the physical path node click and browse to the folder you

  • 7/17/2014 IIS Setups | Dynamics AX Workflow Wanderings

    http://workflowax.wordpress.com/category/iis-setups/ 4/13

    copied in step 2. e.g. C:/Program Files/Microsoft Dynamics

    AX/50/WorkflowDev, click ok6. Ensure that your connect as settings are set to Pass-through

    authentication.7. Click ok.

    Step 5 Select your website with AX.

    1. In Dynamics AX 2009, naviagate to Administration -> Setup -> WorkflowInfrastructure configuration wizard, under website select your new

    application that you created e.g.

    http://myserver:80/MicroftDynamicsAXWorkflow50Dev(http://myserver:80/MicroftDynamicsAXWorkflow50Dev)

    2. Validate the website and complete the wizard.

    You should now have multiple workflow websites running successfully inIIS 7.0

    For more information on setting up your workflow infrastructure in

    dyanmics Ax 2009 check out this post.

    (http://workflowax.wordpress.com/2010/01/12/workflow-walkthrough-infrastructure/)

    Happy Daxing!

    Comments : 4 Comments Tags: Workflow Website, IIS 7.0

    Categories : Business Connector, Workflow, Quick Fixes, Installation,

    Configurations, IIS Setups, Examples and Tutorials, Dynamics AX 2009,Walkthroughs

    No .NET Business connectorsession found.

    My quick fix for the day. If you are getting an error message No .NETBusiness connector session found. in your system event log, there may be

    a number of things to look at, however the first thing to check is whetherthe default business connector on your IIS machine is set up

    (http://workflowax.wordpress.com/2010/01/12/workflow-walkthrough-

    infrastructure/) and pointing to the correct AOS. This may occur ondevelopment servers with multiple AOS instances. You can take a look at

    this post (http://workflowax.wordpress.com/2009/09/17/running-multiple-

    2 11 2010

  • 7/17/2014 IIS Setups | Dynamics AX Workflow Wanderings

    http://workflowax.wordpress.com/category/iis-setups/ 5/13

    aos-on-the-same-box-all-using-workflow/) how to setup multiple workflowwebsites (http://workflowax.wordpress.com/2009/09/17/running-multiple-

    aos-on-the-same-box-all-using-workflow/) on the same machine in order toavoid this issue.

    Happy Daxing

    Comments : Leave a Comment

    Categories : Business Connector, Dynamics AX 2009, IIS Setups,

    Installation, Quick Fixes, Workflow, Workflow Errors

    Workflow Installation andConfiguration Document

    The last couple of weeks, I have been receiving a number of useful links and

    resources related to Workflow in Dynamics AX 2009. This week I waspointed to two excellent resources on workflow, from a the AXFactor

    (http://sumit-theaxfactor.spaces.live.com/) blog by Sumit Loya.

    (http://workflowax.files.wordpress.com/2010/07/installconfig.jpg)The first

    document deals with all the Installation and Configuration requirements forthe workflow infrastructure in Dynamics AX 2009. It is very thorough and

    deals with, amongst other things, required user accounts and permissions,all the security issues that you will come across in both IIS and Dynamics,

    15 07 2010

  • 7/17/2014 IIS Setups | Dynamics AX Workflow Wanderings

    http://workflowax.wordpress.com/category/iis-setups/ 6/13

    prerequisites for installation, installing the website, configuring batch inside

    AX and managing running Workflows. It is a definite must ready andhandy reference book. After reading this document I felt like removing my

    post on Installation and Configuratio(http://workflowax.wordpress.com/2010/01/12/workflow-walkthrough-

    infrastructure/)n, as Sumit is much more comprehensive and helpful.Thank-you for this excellent resource!!

    View Original blog post at the AXSumit here (http://sumit-theaxfactor.spaces.live.com/blog/cns!596957786228C73F!286.entry)

    Download from Axaptapedia here(http://www.axaptapedia.com/Image:Workflows_-

    _Installation_and_Configuration.zip)

    *UPDATE: Checkout the workflow development document too over here.(http://workflowax.wordpress.com/2010/07/29/workflow-development-

    manual/)

    Comments : 3 Comments Tags: AXFactor, Sumit Loya

    Categories : Additional Reading, Configurations, Dynamics AX 2009,Examples and Tutorials, IIS Setups, Installation, Workflow

    Workflow Walkthrough Infrastructure

    Ok. So far on this blog Ive been covering bugs, tricks and other issuesrelating to Dynamics AX workflow. However I havent yet provided any

    formal walk-throughs of workflow in its entirety. So here is my opportunityto add something of which I hope will be real value when creating newworkflow templates, configurations and setting up of the workflowinfrastructure.

    So lets start at the beginning shall we.

    Basic Requirements for Workflow to Beinstalled

    12 01 2010

  • 7/17/2014 IIS Setups | Dynamics AX Workflow Wanderings

    http://workflowax.wordpress.com/category/iis-setups/ 7/13

    1. Dynamics AX AOS with at least SP1 installed2. IIS server.3. .Net Business Connector (installation described during this tutorial)

    4. EP Licence (Not officially required, but needed for .Net BusinessConnector)

    Step 1 Workflow Website Installation

    Before creating our workflow templates or configuring pre-existing DAXtemplates, we need to setup the workflow infrastructure including the

    Windows Workflow Foundation Framework, .net business connector etc,relevant system users and a number of configurations within AX itself. Sofirst things first. Lets setup out Workflow Website containing Windows

    Workflow Foundation.

    1. Install Internet Information Services (IIS)2. Setup a default website on IIS

    3. Run the Dynamics AX server installation file on your IIS machine4. Select Add/Remove Components5. Select .NET Business Connector

    6. Click next.7. Select a Language for the .NET Business Connector.8. Click next.9. Click Finish when the .NET Business Connector has finished being

    installed.10. Run the Dynamics AX server installation file on your IIS machine again11. Select Add/Remove Components

    12. Select Workflow (Ensure that your active Dynamics AX .NET businessconnection configuration on your IIS machine (previous steps) ispointing to the correct AOS as the setup wizard will need to connect toyour AOS to make some changes)

    13. Click Next14. You will be requested to enter a username and password for the user

    that your business connector will use to login to your AX environment.

    If you have previously set this up in your environment, the usernamewill not be available to change. You can later set this up in yourenvironment by going to Administration -> Setup -> Security -> SystemService Accounts

    15. Select your default website that you would like to add you WorkflowVirtual directory/Application to. You can install this to your sharepointsite if you so wish.

    16. Click Next

  • 7/17/2014 IIS Setups | Dynamics AX Workflow Wanderings

    http://workflowax.wordpress.com/category/iis-setups/ 8/13

    17. Select the system account that your AOS is running as, so that the setupwizard will add this user to the list of users allowed to access the

    workflow website18. Click Next19. Click Install20. Click Finish when the Workflow Installation wizard has finished.

    Your workflow infrastructure should now all be ready.

    Should you wish to have multiple AOS environments all running

    Workflow, but only 1 IIS server, see this post(http://workflowax.wordpress.com/2009/09/17/running-multiple-aos-on-the-same-box-all-using-workflow/) for more details.

    Step 2 Configure your AOS

    1. Login to your Dynamics AX Environment as and administrator User.2. Ensure that your email server parameters are correctly setup

    (Administration -> Setup -> E-mail parameters)3. Setup your System Service Accounts (Administration -> Setup ->

    Security -> System Service Accounts)1. Business Connector Account (account used to login to your

    workflow website and other external tools)

    2. Workflow System Account3. Workflow Execution Account

    4. Setup a batch server (Administration -> Setup -> Server Configuration)5. Setup a workflow batch group (Administration -> Setup -> Batch

    Groups), give it a name like WF or WORKFLOW6. Run the workflow infrastructure configuration wizard (Administration -

    > Setup)

    1. In the first screen click Next2. Enter the full Workflow Website address that you created above if

    not already populated

    1. E.G. http://MYSERVER:80/MicrosoftDynamicsAXWorkflow50(http://MYSERVER:80/MicrosoftDynamicsAXWorkflow50)

    3. Click Validate, you should get a message such saying Workflowruntime URL is valid if not you have not setup either your business

    connector account successfully or the workflow website is notfunctioning properly.

    4. Click Next

    5. Select the batch group that you created above (this is for themessage processing batch job)

  • 7/17/2014 IIS Setups | Dynamics AX Workflow Wanderings

    http://workflowax.wordpress.com/category/iis-setups/ 9/13

    1. If this is greyed out, you can cancel the batch the wizard and go

    back and delete your already existing workflow messageprocessing batch job)

    6. Click Next7. Select the batch group that you created above (this is for the expired

    workitems batch job)1. If this is greyed out, you can cancel the batch the wizard and go

    back and delete your already existing due date workflow batch

    job)8. Select a recurrence time for how often you want workflow to check

    for expired workitems, by default this is every hour.9. Click Next

    10. Click Next to confirm, this will create the necessary batch jobs forworkflow workitem processing as well as due date checking.1. To confirm that the batch jobs were create you can check under

    (Basic -> Enquiries -> Batch Job). There should be 2 new batchjobs created and in a waiting state (Workflow Messageprocessing and Workflow Due date expirations)

    7. Setup your workflow per company

    1. Setup Workflow Email template (for workitem assignments) (Basic -> Setup -> E-mail Templates)1. Create a new Email template and name it Workflow or

    something similar, select default language and the name of theuser that you want to appear in the Sender and Sender addressfields in the email when the user receives a notification aboutnew workitem)

    2. Create at least one language template, select a subject andprovide the necessary contents for the email by clicking on thetemplate button. You will be able to provide both a text as well

    as an HTML based template.3. You can use a number of tags

    (http://workflowax.wordpress.com/2010/08/26/adding-custom-fields-to-workflow-emails/)with in your template (and email

    subject) that will allow you to open and link to the correctnotification or record within AX, or simply display moreinformation about the workitem that the user is being emailed

    about. E.G:1. LinkToAlert (//%View Alert (//%

  • 7/17/2014 IIS Setups | Dynamics AX Workflow Wanderings

    http://workflowax.wordpress.com/category/iis-setups/ 10/13

    2. Setup number sequences (Basic -> Setup -> Number Sequences)1. Create number sequences that will be used for your

    configurations as well as for your actual running instances2. E.G.

    1. Configuration Number sequence:1. 1. Number Sequence Code: Work_200

    2. Name: Work_200

    3. Smallest: 14. Largest: 9999995. Next: 16. Format: ######_200

    1. Instance Number sequence:1. Number Sequence Code: Work_2012. Name: Work_201

    3. Smallest: 14. Largest: 9999995. Next: 16. Format: ######_201

    3. Setup company (for each company) workflow parameters (Basic ->Setup -> Settings for Workflow)1. On the first tab select the email template that you have just

    created (Approval and task notifications)2. On the second tab (Administration), your workflow runtime

    (website) url should already be selected.3. On the third tab (Number sequences), select number sequences

    created above for:1. Configuration Id Work_2002. Instance Id Work_201

    4. Close the settings for workflow screen4. You company/companies should now be all ready for you to begin

    developing or configuring workflows.

    Keep your eyes open for the Workflow walk-throughs on Configurationsand Template developments. Please let me know if you have any furthercomments or tips that you have discovered during workflow infrastructure

    configuration.

    Enjoy Workflowing

    Further reading:Workflow Installation and Configuration(http://workflowax.wordpress.com/2010/07/15/workflow-installation-and-configuration-document/)

    Comments : 47 Comments

  • 7/17/2014 IIS Setups | Dynamics AX Workflow Wanderings

    http://workflowax.wordpress.com/category/iis-setups/ 11/13

    Tags: How to, Walkthroughs, Workflow Infrastructure Categories : Business Connector, Dynamics AX 2009, Examples andTutorials, IIS Setups, Installation, Workflow

    The request failed with HTTP status 405:Method Not Allowed.

    Recently on the Axapta-Knowledge-Village (http://www.mail-archive.com/[email protected]/msg20316.html)

    discussion board, the following workflow issue was raised, the user had anerror when trying to validate his workflow url with the following messagebeing displayed: The request failed with HTTP status 405: Method Not

    Allowed. He was running on the following System configuration:1. Windows 2008 R2 64 bit.2. SQL Server 20083. IIS 7

    To resolve this error. I believe the simple solution suggested by manoj is toset your IIS application Pools 32bit property to true

    IIS >Application pool of WF> rightclick advanced settings and change 32bit to TRUE.

    Comments : 7 Comments Tags: Windows 2008 64 bit Categories : Bugs, Configurations, IIS Setups, Installation, Workflow,

    Workflow Errors

    IIS Permissions for Dynamics AXworkflow and All that

    Ok, heres the scenario.

    One sets up a workflow for a client, does comprehensive testing on their testenvironment and then take it to their live environment. You then go

    through a checklist of all the workflow hoops that you must hop through

    11 12 2009

    15 10 2009

  • 7/17/2014 IIS Setups | Dynamics AX Workflow Wanderings

    http://workflowax.wordpress.com/category/iis-setups/ 12/13

    for the infrastructure to work correctly, setting up Business connectoraccount, batch jobs, IIS website etc, then you wait to see if all works

    correctly when the client submits their first record (as you dont want dirtydata). Then you get the dreaded call that Workflow is not working and thatsomebody is getting many emails saying vaguely that workflow failed tocommunicate as desired. So today I wrote a small test workflow thatenables one to run a record through from start to finish to see if all is well. If

    anyone is interested in getting hold of this just drop a comment or pop mean email. Its a really basic form with a single approval with everythingsetup, all thats left is to create a configuration.

    However all of that aside, I have a client (running separate machine for IISand AOS) that I didnt do this to and got the call awhile later requestingsupport. Their event logs were displaying the following on the AOSmachine

    Exception thrown in SysWorkflowEventDispatcher-onAcknowledgeWorkflowActivation

    SysWorkflowEventDispatcher-raiseWorkflowActivationEvent : Web service failed: workflow id WI000002AS Server was unable to process request. ---> Access is denied

    and the following on the IIS Machine:

    An unhandled exception occurred and the process was terminated.Application ID: /LM/W3SVC/1114387320/ROOT/MicrosoftDynamicsAXWorkflow50Process ID: 4776

    Exception: System.UnauthorizedAccessException

    Message: Access to the port is denied.

    StackTrace: at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)at System.Threading.Semaphore..ctor(Int32 initialCount, Int32 maximumCount, String name)at Microsoft.SharePoint.Publishing.BlobCache.GetCacheTokenThreadStart()

    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)at System.Threading.ThreadHelper.ThreadStart()

    The underlying connection was closed: An unexpected error occurred on a receive.

    We solved the error by adding the Business Connector user to the

    administrators group on the IIS Machine, and all came right. For themoment this is a temporary hack. Still investigating the precise permissionsneeded to get this to work with security properly in tact. Anyone have anyideas? Ill keep you posted on progress. So far checkout technet

  • 7/17/2014 IIS Setups | Dynamics AX Workflow Wanderings

    http://workflowax.wordpress.com/category/iis-setups/ 13/13

    (http://technet.microsoft.com/en-us/library/aa496652.aspx) for officialrequirements for business connector, apparently you only need IIS_WPG(IIS Worker Process Group) and STS_WPG (STS Worker Process Group),

    if running Windows SharePoint Services

    Cheers!

    Comments : 7 Comments

    Categories : Business Connector, IIS Setups, Quick Fixes, Testing,Workflow

    Blog at WordPress.com. The Freshy Theme.

    Follow

    Follow Dynamics AX Workflow Wanderings

    Powered by WordPress.com